[PATCH] Warn about bogus conditional operators

Tom Tromey tromey@redhat.com
Sat Jan 17 17:38:00 GMT 2009


>>>>> "Andi" == Andi Kleen <andi@firstfloor.org> writes:

Andi> +void
Andi> +warn_for_omitted_condop (tree cond) 
[...]
Andi> +      warning (OPT_Womitted_conditional_op, 
Andi> +	       "Omitting middle operand in ?: with computed "
Andi> +	       "boolean conditional has unexpected meaning");

I'd like it if warn_for_omitted_condop took an explicit location, and
then passed that on to warning.  It is easy to do now and saves Aldy
from having to implement it on his branch.

thanks,
Tom



More information about the Gcc-patches mailing list