This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch [3.4/3.3] G++ eliminate use of conditional expressions as lvalues
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Thu, 03 Apr 2003 19:16:45 +0100
- Subject: Re: Patch [3.4/3.3] G++ eliminate use of conditional expressions as lvalues
- Organization: SuperH UK Ltd.
Patch fixes:
> 11 ISO C forbids use of conditional expressions as lvalues
`current_binding_level' contains a ?:, so it can't be used as an
lvalue. I wrote a macro `set_current_binding_level' to use instead.
No real functional change.
I think that is overkill. All you need to do is apply the
distributive law to the * and ?: operators:
#define current_binding_level \
(*(cfun && cp_function_chain->bindings \
? &cp_function_chain->bindings \
: &scope_chain->bindings))
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658