Summary: Warning for arithmetic operations involving C99 _Bool
Pasted from the thread that introduced _Bool in place of "GCC bool":
> >> It can be done ultimately, but as a prerequisite, we should have
> >> warnings in -Wextra for all of
> >> ? boolvar++; ++boolvar;
> >> ? boolvar--; --boolvar;
> >> ? boolvar = nonbool;
> >> ? boolvar & nonbool; boolvar &= nonbool;
> >> ? boolvar | nonbool; boolvar |= nonbool;
> >> ? boolvar ^ nonbool; boolvar ^= nonbool;
> > Fair enough. I have CCed Manuel, perhaps he is interested in this warning.
> I am not sure it fits in -Wconversion. -Wbool-arith perhaps?
It sounds like a warning for a -Wc90-c99-compat or similar option
(possibly in a more specific option such as -Wbool-arith) - pure C99 code
has little use for such a warning, it's about code that might be compiled
either with C99 _Bool, or with C90 unsigned char, and so needs to avoid
cases where they are incompatible. Such an option, similar in spirit to
-Wtraditional, could also allow you to get warnings in C99 mode for things
currently diagnosed with -std=c90 -pedantic.
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.