This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: -Wc++-compat warning about ++/-- with enum value
"Joseph S. Myers" <email@example.com> writes:
> On Thu, 14 May 2009, Ian Lance Taylor wrote:
>> 2009-05-14 Ian Lance Taylor <firstname.lastname@example.org>
>> * c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
>> ++ or -- with a variable of enum type.
> As with other C warnings I think this should have two separate calls to
> warning_at with separate sentences for increment and decrement rather than
> saying "increment/decrement", and should not say "pre/post" (other C
> diagnostics don't say that, and don't divide things up into for
> diagnostics to distinguish the pre and post cases). OK with that change.
> "increment of enumeration value is invalid in C++"
> "decrement of enumeration value is invalid in C++"
Thanks. I made that change and committed.