Changeset 0497b6ba


Ignore:
Timestamp:
Dec 15, 2024, 10:14:13 PM (2 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
d344a63, f9a0dd0
Parents:
a16f2b6
Message:

update tests for attribute and semantic warnings

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/attr-priority.txt

    ra16f2b6 r0497b6ba  
    1 attr-priority.cfa:7:1 warning: invalid attribute: constructor priorities from 101 to 200 are reserved for the implementation
    2 attr-priority.cfa:12:1 warning: invalid attribute: destructor priorities from 101 to 200 are reserved for the implementation
     1attr-priority.cfa:7:1 warning: invalid attribute: constructor priorities from 101 to 200 are reserved for the implementation.
     2attr-priority.cfa:12:1 warning: invalid attribute: destructor priorities from 101 to 200 are reserved for the implementation.
    33attr-priority.cfa:8:1 error: Invalid application of existing declaration(s) in expression Applying untyped:
    44  Name: malloc
  • tests/.expect/attributes.x64.txt

    ra16f2b6 r0497b6ba  
    13371337    return _X4_retS3Vad_1;
    13381338}
     1339__attribute__ (( noreturn )) void _X4fredFv___1(void){
     1340    __attribute__ ((unused)) signed int _X1ii_2;
     1341    switch ( 3 ) {
     1342        case 2:
     1343            {
     1344                {
     1345                    ((void)4);
     1346                }
     1347
     1348            }
     1349        case 1:
     1350            {
     1351                {
     1352                    ((void)3);
     1353                }
     1354
     1355            }
     1356    }
     1357
     1358}
     1359__attribute__ ((noreturn)) void _X4maryFv___1(void){
     1360    struct __attribute__ ((aligned(64))) S {
     1361        signed int _X1ii_2;
     1362    };
     1363    inline void _X12_constructorFv_S1S_autogen___2(__attribute__ ((unused)) struct S *_X4_dstS1S_2){
     1364        {
     1365            ((void)((*_X4_dstS1S_2)._X1ii_2) /* ?{} */);
     1366        }
     1367
     1368    }
     1369    inline void _X12_constructorFv_S1SS1S_autogen___2(__attribute__ ((unused)) struct S *_X4_dstS1S_2, __attribute__ ((unused)) struct S _X4_srcS1S_2){
     1370        {
     1371            ((void)((*_X4_dstS1S_2)._X1ii_2=_X4_srcS1S_2._X1ii_2) /* ?{} */);
     1372        }
     1373
     1374    }
     1375    inline void _X11_destructorFv_S1S_autogen___2(__attribute__ ((unused)) struct S *_X4_dstS1S_2){
     1376        {
     1377            ((void)((*_X4_dstS1S_2)._X1ii_2) /* ^?{} */);
     1378        }
     1379
     1380    }
     1381    inline struct S _X16_operator_assignFS1S_S1SS1S_autogen___2(__attribute__ ((unused)) struct S *_X4_dstS1S_2, __attribute__ ((unused)) struct S _X4_srcS1S_2){
     1382        __attribute__ ((unused)) struct S _X4_retS1S_2;
     1383        {
     1384            ((void)((*_X4_dstS1S_2)._X1ii_2=_X4_srcS1S_2._X1ii_2));
     1385        }
     1386
     1387        {
     1388            ((void)_X12_constructorFv_S1SS1S_autogen___2((&_X4_retS1S_2), (*_X4_dstS1S_2)));
     1389        }
     1390
     1391        return _X4_retS1S_2;
     1392    }
     1393    inline void _X12_constructorFv_S1Si_autogen___2(__attribute__ ((unused)) struct S *_X4_dstS1S_2, signed int _X1ii_2){
     1394        {
     1395            ((void)((*_X4_dstS1S_2)._X1ii_2=_X1ii_2) /* ?{} */);
     1396        }
     1397
     1398    }
     1399    __attribute__ ((unused)) signed int _X1ii_2;
     1400    switch ( 3 ) {
     1401        case 2:
     1402            {
     1403                {
     1404                    ((void)4);
     1405                }
     1406
     1407            }
     1408        case 1:
     1409            {
     1410                {
     1411                    ((void)3);
     1412                }
     1413
     1414            }
     1415    }
     1416
     1417}
  • tests/attributes.cfa

    ra16f2b6 r0497b6ba  
    1010// Created On       : Mon Feb  6 16:07:02 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 20:33:07 2023
    13 // Update Count     : 39
     12// Last Modified On : Sun Dec 15 17:45:39 2024
     13// Update Count     : 49
    1414//
    1515
     
    162162};
    163163
     164[[ noreturn ]] void fred() {
     165        int [[unused]] i;
     166        switch ( 3 ) {
     167          case 2:
     168                4;
     169//              __attribute__(( fallthrough ))
     170//              [[fallthrough]]
     171          case 1:
     172                3;
     173        }
     174}
     175
     176@[ noreturn ] void mary() {
     177        @[aligned(64)] struct S { int i; };
     178        int @[unused] i;
     179        switch ( 3 ) {
     180          case 2:
     181                4;
     182//              __attribute__(( fallthrough ))
     183//              [[fallthrough]]
     184          case 1:
     185                3;
     186        }
     187}
     188
    164189// Local Variables: //
    165190// tab-width: 4 //
  • tests/warnings/.expect/self-assignment.txt

    ra16f2b6 r0497b6ba  
    77  reference to signed int
    88... with resolved type:
    9   reference to signed int
     9  reference to signed int.
    1010warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of:
    1111  Variable Expression: s: instance of struct S with body
     
    1515  reference to instance of struct S with body
    1616... with resolved type:
    17   reference to instance of struct S with body
     17  reference to instance of struct S with body.
    1818warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of:
    1919  Member Expression, with field:
     
    2828  reference to signed int
    2929... with resolved type:
    30   reference to signed int
     30  reference to signed int.
    3131warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of:
    3232  Member Expression, with field:
     
    4646  reference to signed int
    4747... with resolved type:
    48   reference to signed int
     48  reference to signed int.
Note: See TracChangeset for help on using the changeset viewer.