Discussion:
What is the right way to specify -Wno-format-contains-nul?
Bruce Korb
2012-08-09 21:37:43 UTC
Permalink
It seems that AM_PROG_CC
Huh? There is no such think like 'AM_PROG_CC'. I guess you mean
AC_PROG_CC.
Yes, thank you. Wrong forum, too. (autoconf not automake)
How can -Wall cause the compiler to die? Have you added -Werror to
$(AM_CFLAGS) maybe?
Me? No. My clients? Sometimes.
This would go against the principle that "the user is always right (when
he is explicit)"
(Actually, gcc probably ought not override a specifically set option
with a "-Wall", but this the wrong forum for that...)
In that forum, it seems that some folks think that "-Wall" appearing after
"-Wno-some-obscure-warning-thingy" over-rides it, and others think it
nonsensical. I'm in the latter camp, obviously. I am explicit in that
this "format-contains-nul" should never have been warned about in the
first place and someone specifying CFLAGS a la:

./configure CFLAGS="-Dxxx -Wall -Werror"

ought to work, even given gcc's pickishness about format strings.
And, yes, in this particular case, I'd like to just say any user
turning on that warning is wrong -- whether deliberate or accidentally
with -Wall. So I'll fix it in GCC and we'll have it fixed in user
space in a few years. :)

Cheers - Bruce

Loading...