C++ inlne asm bug
Zoltan Hidvegi
hzoli@austin.ibm.com
Sat May 27 14:32:00 GMT 2000
In C++ when using inline asm with clobbers string concatenation does
not work for the clobber part. E.g. on Intel the following compiles
as a C program, but fails to compile as C++:
void
voo(void)
{
__asm__ __volatile__("" : : : "di" "");
}
I know it is meaningless, the original asm I was using which faild was
on rs6k PowerPC:
#define LFD(X,Y) __asm__ __volatile__("lfd " #X ",0(%0)" : : "r"(Y) : "fr" #X)
void
foo(double *p)
{
LFD(14,p);
}
Again, this works in C but not in C++.
This bug is present in gcc-2.95 as well as in the April 18 snapshot.
Zoli
More information about the Gcc-bugs
mailing list