Ignore:
Timestamp:
Jul 14, 2026, 10:03:22 PM (2 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Parents:
a12816e7
Message:

turn on -Wdangling-pointer conditionally for gcc >= 12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/enum_tests/planet.cfa

    ra12816e7 rceb4cc1  
    3737//      Planet rp = fromInt( prng( countof( Planet ) ) );       // select random orbiting body
    3838
     39        #if __GNUC__ >= 12                                                                      // valid GNU compiler diagnostic ?
    3940        #pragma GCC diagnostic push
    4041        // FIX ME: false positive with gcc > 11, so disable.
    4142        #pragma GCC diagnostic ignored "-Wdangling-pointer"
     43        #endif // __GNUC__ >= 12
     44
    4245        Planet rp = fromInt( countof( Planet ) - 1 );           // non-random for test suite
     46
     47        #if __GNUC__ >= 12                                                                      // valid GNU compiler diagnostic ?
    4348        #pragma GCC diagnostic pop
     49        #endif // __GNUC__ >= 12
    4450
    4551        choose( rp ) {                                                                          // implicit breaks
Note: See TracChangeset for help on using the changeset viewer.