Changeset ceb4cc1


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

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/vec/vec.hfa

    ra12816e7 rceb4cc1  
    118118        }
    119119
     120        #if __GNUC__ >= 12                                                                      // valid GNU compiler diagnostic ?
    120121        #pragma GCC diagnostic push
    121122        // FIX ME: false positive with gcc > 11, so disable.
    122123        #pragma GCC diagnostic ignored "-Wdangling-pointer"
     124        #endif // __GNUC__ >= 12
    123125
    124126        // Refract incident vector v with respect to surface with normal n eta is the ratio of indices of refraction between
     
    136138        }
    137139
     140        #if __GNUC__ >= 12                                                                      // valid GNU compiler diagnostic ?
    138141        #pragma GCC diagnostic pop
     142        #endif // __GNUC__ >= 12
    139143
    140144        // Given a perturbed normal and a geometric normal, flip the perturbed normal if the geometric normal is pointing
  • 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.