pragma change breaks build
Joseph Myers
joseph@codesourcery.com
Mon Apr 27 17:15:00 GMT 2015
On Mon, 27 Apr 2015, David Miller wrote:
>
> This change:
>
> 2015-04-19 Paul Eggert <eggert@cs.ucla.edu>
>
> * stdlib/setenv.c (__add_to_environ):
> Dump core quickly if setenv (..., NULL, ...) is called.
> This time, do it the right way, and pacify GCC with a pragma.
>
> Breaks, rather than fixes, the build for me. I don't think we can
> universally assume that this pragma facility is available:
>
> setenv.c:27:9: error: unknown option after Β‘#pragma GCC diagnosticΒ’ kind [-Werror=pragmas]
> setenv.c:27:9: error: unknown option after Β‘#pragma GCC diagnosticΒ’ kind [-Werror=pragmas]
The issue here is -Wmaybe-uninitialized not being supported by older GCC.
That is, if the warnings appear with 4.6, a conditional call using
-Wuninitialized instead is needed (and otherwise, condition it on
__GNUC_PREREQ (4, 7) as in resolv/res_send.c).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list