https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61584

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Krauss from comment #2)
> Currently, enum promotions are incompatible between C and C++ modes.

Does that matter?

> Furthermore, when C++ requires promotion to signed int but the underlying
> type is unsigned int, integer overflow may occur.

How? If there are values of the enumeration that would overflow a signed int
then it won't be promoted to a signed int.

> I think this adds up to a bug and the C++ behavior should get its own bullet
> at the end of that manual page.

Saying what?

The only issue I see here is that EDG chooses int where GCC and Clang choose
unsigned int, even in the --g++ mode, but that's not a GCC bug.

Reply via email to