statement expressions and extended asm bug?
Kai Henningsen
kaih@khms.westfalen.de
Fri Mar 19 22:38:00 GMT 2004
gni@gecko.de (Gunther Nikl) wrote on 17.03.04 in <20040317102933.GA15236@lorien.int.gecko.de>:
> On Tue, Mar 16, 2004 at 09:56:00PM +0200, Kai Henningsen wrote:
> > gni@gecko.de (Gunther Nikl) wrote on 15.03.04 in
> > <20040315112744.GA86063@lorien.int.gecko.de>:
> >
> > > #define f1() \
> > > ({ register int _d0 __asm("d0"); \
> > > __asm volatile ("moveq #11,d0" : "=r" (_d0) : /**/ : "fp0", "fp1",
> > > "cc",
> > > "memory"); \ _d0; })
> >
> > If the problem is the possibility of returning lvalues from statement
> > expressions, what would happen with the following?
> >
> > #define f1() \
> > ({ register int _d0 __asm("d0"); \
> > __asm volatile ("moveq #11,d0" : "=r" (_d0) : /**/ : "fp0", "fp1",
> > "cc",
> > "memory"); \ _d0 + 0; })
> >
> > (The only change is at the end.)
>
> No difference, GCC seems to remove the addition.
Well, if that doesn't work, then the whole lvalue argument seems to be a
red herring.
That seems to demonstrate that it is in fact the sequence point thing.
MfG Kai
More information about the Gcc
mailing list