------- Comment #9 from manu at gcc dot gnu dot org  2008-02-15 10:36 -------
It is not clear whether we want such a warning or not (and in 6 years, just 2
people have suggested it not too loudly). But if we do:

* -Wstrict-enums seems a better name. It should be consistent and not handle
only assignments but also argument passing.
* An explicit cast should suppress the warning.
* The warning should not be enabled by -Wall and probably neither by -Wextra
because enums are *correctly* used as integers by C programmers.

It is also unclear whether we want to warn for any integer/enum assigned to a
different enum type or just for integers/enums outside the range of a
particular enum type.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-Wenum-assignment : Warn if |warn if an enum is being
                   |an enum is being assigned a |assigned a non enum value
                   |non enum value              |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7654

Reply via email to