Changeset a22e8b4 for tests/forall.cfa


Ignore:
Timestamp:
Jan 29, 2025, 11:41:32 AM (12 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
161b98e
Parents:
49510db
Message:

Removed the warnings from more tests. I think '(void)var;' might be working better than 'attribute((unused)) var;'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/forall.cfa

    r49510db ra22e8b4  
    4040        forall( T, U ) void f( T, U ) { sout | "fTU"; }
    4141
    42         int x;
    43         float y;
    44         int * z;
    45         float * w;
     42        int x = 0;
     43        float y = 0;
     44        int * z = 0;
     45        float * w = 0;
    4646
    4747        f( x, x );
     
    132132                typedef int TD2;
    133133                struct S2 {};
    134                 X RT2( T, X ) {
    135                         int TD2;
     134                X RT2( T, X x ) {
     135                        int TD2; (void)TD2;
     136                        return x;
    136137                }
    137138        }
     
    146147                typedef int TD3;
    147148        }
    148         static {
    149                 struct S5 {};
     149        struct S5 {};
     150        inline {
    150151                void RT5( T ) {
    151152                        struct S6 {};
    152                         int TD2;
     153                        int TD2; (void)TD2;
    153154                }
    154155        }
     
    168169static inline {
    169170        forall( T ) {
    170                 int RT6( T p );
     171                int RT6( T ) { return 0; }
    171172        }
    172173        forall( T, U ) {
    173                 int RT7( T, U );
    174         }
    175 }
    176 static forall( T ) {
    177         int RT8( T );
    178 }
    179 forall( T ) inline static {
     174                int RT7( T, U ) { return 0; }
     175        }
     176}
     177inline forall( T ) {
     178        int RT8( T ) { return 0; }
     179}
     180forall( T ) inline {
    180181        int RT9( T ) { T t; return 3; }
    181182}
     
    226227        &tr += 1;
    227228        tp += 1;
    228         T & tx = tp[1];
     229        T & tx = tp[1]; (void)tx;
    229230
    230231        T t;
     
    239240        &tr += 1;
    240241        tp += 1;
    241         T & tx = tp[1];
     242        T & tx = tp[1]; (void)tx;
    242243}
    243244
    244245forall( T & ) void check_dtype() {
    245         T & tr = *0p;
    246         T * tp = 0p;
     246        T & tr = *0p; (void)tr;
     247        T * tp = 0p; (void)tp;
    247248}
    248249
Note: See TracChangeset for help on using the changeset viewer.