[GCC 4.0.2] syntax error with the operand 'asm'

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GCC 4.0.2] syntax error with the operand 'asm'

franha
Hi,

I use GCC 4.0.2 as a cross compiler(target:powerpc), and I have errors when I compile a simple c file witch contain the operand 'asm' used like that :

extern void __reset(void);

---reset.c----------------------------
#pragma section code_type ".reset"

#pragma force_active on
__declspec(section ".reset")

asm void reset(void);

asm void reset(void)
{
nofralloc
b __reset
}
#pragma force_active reset
---------------------------------

command line to compile: $ /gnutools/bin/powerpc-elf-eabi-gcc -c ../reset.c

the result of the compilation is :

../reset.c:6: error: syntax error before string co
../reset.c:10: error: syntax error before 'void'

are there any options to use GCC 4.0.2 ? I had not got this erreur with GCC 3.4.0!

Thanks in advance