This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: warning message with GNU compiler
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