[Bug c/2803] casts in asm act as lvalues
astrange at ithinksw dot com
gcc-bugzilla@gcc.gnu.org
Mon May 25 20:26:00 GMT 2009
------- Comment #12 from astrange at ithinksw dot com 2009-05-25 20:26 -------
I noticed this is still accepted by gcc 4.5; one stuck into ffmpeg and broke
the build with another compiler.
For instance, this only fails in c():
int as(int a)
{
asm ("" : : "m"((int)a));
}
int c(int a)
{
return *&((int)a);
}
> /usr/local/gcc45/bin/gcc -S test.c
test.c: In function 'c':
test.c:8: error: lvalue required as unary '&' operand
--
astrange at ithinksw dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |astrange at ithinksw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2803
More information about the Gcc-bugs
mailing list