[Bug c/45289] gcc lacks a "posix" option for "-std" since POSIX 2008 defines special behavior
matz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 16 00:55:00 GMT 2010
------- Comment #8 from matz at gcc dot gnu dot org 2010-08-16 00:55 -------
Well, okay, (3) indeed is valid ISO C (no warning) and works on POSIX 2008.
I'd find it very awkward to write such work-around for (1) just so the
warning in strict ISO C mode is silenced. I find this case different from
other cases where such warnings about standard violations are explicitely
wanted even though perhaps the code happens to work. I think it's different
from those cases because POSIX (mostly concerned with portability) is a
standard too, one that we'd probably like to adhere to on some systems.
Hence, I still would suggest to not warn about solution (1), even in ISO C
mode.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45289
More information about the Gcc-bugs
mailing list