[PATCH c/c++/ada/middle-end 1/2]: Merging meaning of CONVERT_EXPR and NOP_EXPR v.3

Paolo Bonzini bonzini@gnu.org
Fri Aug 22 08:52:00 GMT 2008


> If I understand it correctly semicolon is special type of statement
> (null statement in C standard) - currently handled by gcc as NOP_EXPR
> (void, int (0)) statement that is empty statement. (void) 0 is
> represented as cast to void statement - currently handled by gcc as
> CONVERT_EXPR (void, int (0)) - non empty statement. If you enable
> pedantic warnings (-W -Wall -pedantic) that first example is compiled
> without warning but second example with warning. The warning goes from
> empty_if_body_warning function in c-common.c. When I merge the meaning
> of CONVERT/NOP expr I need to preserve this distinction.

I see.  I wonder if empty_if_body_warning isn't easier to implement 
directly within the parser.

Paolo



More information about the Gcc-patches mailing list