statement expressions and extended asm bug?

Jamie Lokier jamie@shareable.org
Fri Mar 19 16:10:00 GMT 2004


Segher Boessenkool wrote:
> >>    static inline void increment (int * ptr) { *ptr++; return 0; }
> >>    func (increment (&a), increment (&a));
> >
> >No, it is just as undefined.  The compiler is free to call
> >either the "left" or the "right" increment() first.
> 
> Erm.  Well of course you return 0 in any case, so evaluation order
> doesn't change the meaning of this example.  But it's invalid
> code anyway, now that I took a second look at it ;-)

Oh, typo :)  It should say "static inline int".

-- Jamie



More information about the Gcc mailing list