This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Warning about int<-->enum conversions?
- From: Nicholas Nethercote <njn25 at cam dot ac dot uk>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 8 Jul 2004 13:36:50 +0100 (BST)
- Subject: Warning about int<-->enum conversions?
Hi,
Does GCC have a flag that would make it give warnings if an enum value is
mixed up with an int? Like this:
void f ( int );
typedef enum { AA, BB, CC } T;
f (AA) -- complain please
int x = CC; -- ditto
I couldn't find any in the man page, but GCC has so many options that I
thought I might have missed it if it exists.
Thanks.
N