This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-Wtraditional, integer constants and C99
- To: gcc at gcc dot gnu dot org
- Subject: -Wtraditional, integer constants and C99
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Mon, 18 Sep 2000 22:25:30 +0100 (BST)
-Wtraditional gives warnings about integer constants that changed their
sign between traditional C and C89. In C99, decimal integer constants
with no 'u' or 'U' suffix again cannot be unsigned: so, when in C99 mode
and implementing the C99 type rules, but with -Wtraditional specified,
should the compiler make any attempt to give warnings relating to the C89
rules, or only to compare the C99 type with the traditional one? (The
simplest solution is just to compare the C99 type with the traditional
one; but this would reduce the value of -Wtraditional as a portability
tool when C99 mode is eventually made the default.)
--
Joseph S. Myers
jsm28@cam.ac.uk