This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]