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 Tue, 18 Nov 2014, Paul Eggert wrote:

> Also, the distinction between GCC version "4, 7" (which is checked) and
> version "4.9" (which is not) is bothersome. Inevitably the unchecked version
> numbers will become wrong.  If we're going to have a "4.9" at all, we should
> check it.

Checking it means reviewing if the warning still appears when GCC 5 
becomes the minimum supported version for building glibc.  The relevant 
version to compare the 4.9 with is the minimum version for building glibc 
(which is not currently available in C code in glibc), not the version 
actually being used to build glibc.

> +#pragma GCC diagnostic push

No, as stated in 
<https://sourceware.org/ml/libc-alpha/2014-11/msg00326.html> it's desired 
to go via internal macros for this.

> +/* Seen on x86_64 (inlined from fnmatch_loop.c:internal_fnwmatch):
> +   "'*((void *)&str+4)' may be used uninitialized in this function".  */
> +#if __GNUC_PREREQ (4, 7) && !__GNUC_PREPREQ (4, 10)
> +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
> +#endif

No, __GNUC_PREPREQ (4, 10) is wrong.  We don't want to introduce lots of 
build failures every time GCC branches and the mainline version increases.  
We have no evidence that the warning does not appear with GCC 5; the 
assertion is simply that it was observed with 4.9.

-- 
Joseph S. Myers
joseph@codesourcery.com


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