This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: -Wc++-compat warning about ++/-- with enum value
Steve Kargl <sgk@troutmask.apl.washington.edu> writes:
> Sure, -Wc++-compat prevents someone from committing code that,
> for example, uses ++ on an enum-specifer entity. That someone,
> now needs to find a C++ reference that explains the issue and
> how to code around the problem.
I don't see this as equivalent to a requirement to learn C++. If you
have any questions -Wc++-compat warnings, please feel free to ask me or
the gcc@ mailing list. There are many things that a gcc maintainer
needs to know.
>> > More to the point, including -Wc++-compat in CFLAGS can make it
>> > impossible to do a binary search to determine what revision
>> > caused a regression. Try backing out only the Fortran portion of
>> > r146855 and rebuild.
>>
>> I don't understand how this is different from any other compiler
>> warning. Warnings do change over time. For example, the same thing
>> could have occurred when we toughened up -Wparentheses.
>>
>> Note that -Wc++-compat has been in CFLAGS since at least gcc 4.2, so
>> what is new is not -Wc++-compat, but the fact that -Wc++-compat is
>> getting tougher.
>
> Here's the problem. There was a regression in fortran io,
> and one recent change that touched trans-io.c was r146855.
> It was found that r146855 was the cause, but one can't
> determine this from reverting the change to trans-io.c.
I understand the problem. I'm just saying that there is nothing
specific to -Wc++-compat about this problem. It is a general problem
when warning options change. Despite the existence of this problem, we
do change warning options.
I apologize if I broken fortran io with r146855. This is the first I've
heard of the problem.
I will note that if you fully reverted r146855, which affected many
files in the compiler, then bootstrap would have succeeded.
Ian