Hi,

I'm trying to define a macro intended to be used in OpenSolaris kernel code on 
a sparc architecture :

#define MAGIC(service) do { \
        asm("sethi %0,%%g0" : : "g" (service)); \
} while (0)

But if i try to insert the MAGIC call (MAGIC(1000); for instance)in kernel code 
(inside disp.c) and recompile the kernel using SUN Studio compiler i get these 
compiler errors:

../../sun -nostdinc -I../../common -DGLREG -c -o /tmp/.cwCAA91q32h.o 
../../common/disp/disp.c
../../common/disp/disp.c: In function `idle_enter':
../../common/disp/disp.c:551: error: syntax error before ':' token

It seem to complain about the ':' and I don't know how to correct it. I have 
tried millions of variants derived from examples on the web, but with no 
success.

>From what I have read earlier, cc should support this kind of syntax, but now 
>I'm unsure.

Regards,
Mladen
--
This message posted from opensolaris.org

Reply via email to