This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add macros for diagnostic control, use them in locale/weightwc.h


On 11/18/2014 03:00 PM, Joseph Myers wrote:
Checking it means reviewing if the warning still appears...  We don't want to introduce lots of build failures every time GCC branches and the mainline version increases.
In that case, we can do the equivalent of the following instead:

   #if __GNUC_PREREQ (4, 7)
   # if !__GNUC_PREPREQ (4, 10)
   #  pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
   # else
   #  pragma GCC diagnostic warning "-Wmaybe-uninitialized"
   # endif
   #endif


That is, we can check the "4.9" without causing build failures in 5.0. That should be better than having an unchecked 4.9 sitting in the source.

(The above should use _Pragma not #pragma given your other comments, but this doesn't affect the main point here.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]