This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: C++ frontend: Don't warn about shifts which will not be run
On Fri, 12 Jun 2009, Ian Lance Taylor wrote:
> Suppose we eliminate skip_evaluation from the C and C++ frontends, since
> it seems to be poorly named, and replace it with "c_parsing_sizeof_arg"
> (which would also apply to typeof and alignof; better names solicited)
> and "c_never_executed". This is pretty much what I did, at least in the
> C frontend, but the different names would I hope make it more clear what
> the variables represented. The effect would be similar: certain
> warnings should not be issued when one or the other of these is true.
I don't see any use for these as separate flags. C already has variables
in_sizeof, in_typeof, in_alignof that record nesting levels to manage the
constraints that rely on knowing whether something was only used inside
sizeof-non-VLA (c99-static-1.c etc.). I'd rather have something like
c_inhibit_evaluation_warnings, meaning "inhibit warnings about certain
conditions that apply when code is executed, because the code currently
being processed is not expected to be executed", and where C++ uses
skip_evaluation in a different sense rename that to reflect the actual
standard concept involved.
Joseph S. Myers