Re: Revisiting generalized lvalues

2005-10-29 Thread Michael Krasnik
Andrew Pinski wrote: I don't know if it's too late, but there is yet another reason for the use of generalized lvalues besides just ignorance: using them in macros that verify pointer and struct usage in a large framework. A comma expression makes it very convenient, for example (just a general i

Re: Revisiting generalized lvalues

2005-10-29 Thread Michael Krasnik
Florian Weimer wrote: * 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 require

Re: Revisiting generalized lvalues

2005-10-29 Thread Florian Weimer
* 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

Re: Revisiting generalized lvalues

2005-10-29 Thread Andrew Pinski
> > I don't know if it's too late, but there is yet another reason > for the use of generalized lvalues besides just ignorance: > using them in macros that verify pointer and struct usage > in a large framework. A comma expression makes it very > convenient, for example (just a general idea): > >

Revisiting generalized lvalues

2005-10-29 Thread Michael Krasnik
I don't know if it's too late, but there is yet another reason for the use of generalized lvalues besides just ignorance: using them in macros that verify pointer and struct usage in a large framework. A comma expression makes it very convenient, for example (just a general idea): #ifdef PRODUCT