This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Revisiting generalized lvalues
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Michael Krasnik <mike at genlogic dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 29 Oct 2005 17:30:09 +0200
- Subject: Re: Revisiting generalized lvalues
- References: <43639370.2020504@genlogic.com>
* Michael Krasnik:
> #ifdef PRODUCTION
> #define X_ABC(x) ( check( x ), x->abc )
> #else
> #define X_ABC(x) x->abc
> #endif
>
> which expands
>
> X_ABC(x) = y;
>
> to:
>
> ( check( x ), x->abc ) = y;
> Eliminating this construct makes macros much less flexible
> and requires much more work for creating self-verifying
> frameworks, which is a big issue for small companies with
> large codebase.
There seems to be a trivial fix: modifiy the check function to return
its argument.