This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Possible C++ bug: Are C enum tags unsigned?
According to Eli Zaretskii:
> > 449: else if (index < -TOTAL_KEYWORDS)
>
> The problem is in your code [...]
Hey, it's not _my_ code. :-) But I get your point.
> The only operations which can meaningfully be used with an enum are
> assignment, equality, and inequality. And you cannot mix enum with
> other data types [...]
But I vaguely recall a rule in ANSI C that enum values decay to int
when you use them. Is my memory being over-specific about the type?
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K