warning message with GNU compiler

Jim Wilson wilson@specifixinc.com
Wed May 5 03:19:00 GMT 2004


Keren Zik-Meirom wrote:
> I am trying to generate a warning message in case where an object of particular enumeration type is assigned something other that one of its constant, from the tests I've made I could not reproduce it.

We don't have a warning option for that.  The ISO C language does not 
place restrictions on what values can be assigned to a variable of type 
enum.

You didn't specify the language you are using.  C++ rules are different 
from C rules, but I am not very familiar with C++ rules.  I don't see a 
C++ option for this either.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc-bugs mailing list