This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, committed] PR c++/29089
- From: Roger Sayle <roger at eyesopen dot com>
- To: Dirk Mueller <dmuell at gmx dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Oct 2006 12:53:05 -0700 (MST)
- Subject: Re: [PATCH, committed] PR c++/29089
On Sun, 29 Oct 2006, Dirk Mueller wrote:
> another simple one from the huge diagnostic buglist of the c++ frontend.
> compiled and manually tested, committed as obvious.
I hate to be the bearer of bad news, but neither this nor your previous
obvious patch for PR29033 adhere to required the GNU/GCC code coding style
> - pedwarn ("ISO C++ forbids %sing an enum",
> - (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
> - ? "increment" : "decrement");
> + pedwarn ((code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR) ?
> + "ISO C++ forbids incrementing an enum" :
> + "ISO C++ forbids decrementing an enum");
The GNU coding rules require that when wrapping lines, operators appear
on the second line, indented/aligned under the start of the expression.
is acceptable, as is
? b : c
and at a stretch even
a ? b
and the (in my opinion slightly uglier)
a ? b
But your usage of
and previously of
a ? b :
And placing a "?" on a line by itself is "right out" :-).
Sorry for any inconvenience. I hope this helps.