This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question regarding C++ and inline assembler...
- To: gcc at gcc dot gnu dot org
- Subject: Question regarding C++ and inline assembler...
- From: Scott Bambrough <scottb at netwinder dot org>
- Date: Thu, 27 Jan 2000 14:45:03 -0500
- Organization: Rebel.com
The following code fragment generates a error when compiled as C++ code, but not
as C code.
int main (int argc, char **argv)
{
__asm__ ("mov r0, #0", ::: "r0"); /* error in C++, not C */
__asm__ ("mov r0, #0", : : : "r0"); /* fine in C and C++ */
}
Shouldn't the C++ compiler be able to cope with no whitespace between the colons
when compiling the inline assembler?
Scott
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org