This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH]: Define "bool" as _Bool when bootstrapping with gcc >= 4.4


On Fri, Sep 24, 2010 at 5:03 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Fri, 24 Sep 2010, Manuel López-Ibáñez wrote:
>
>> >> 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.

I have opened PR c/45780 [1] as proposed by Manuel and took the
liberty to quote this entire message there.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45780

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]