LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   warning: ISO C does not permit named variadic macros (https://www.linuxquestions.org/questions/programming-9/warning-iso-c-does-not-permit-named-variadic-macros-775505/)

knobby67 12-14-2009 03:34 AM

warning: ISO C does not permit named variadic macros
 
Hi all,
after a great deal of trouble I managed to get directFB to cross compile for a ARM. However when I try to use it in my code all the libs seems OK (eg if I use the -ldirectfb etc) in my makefile they link, however when I include the directfb.h in my headers I get a large number of errors
most are
warning: ISO C does not permit named variadic macros

eg
/root/DirectFBArm/staging/usr/include/directfb/direct/messages.h:96:17: warning: ISO C does not permit named variadic macros

and a large number of
/root/DirectFBArm/staging/usr/include/directfb/direct/clock.h:34: error: ISO C++ does not support 'long long'

I compiled both libs and my example with the same compiler ARM 4.3 version.
Can anyone advise what to do? Is there a switch I can add to my makefile?
Thanks :)

PS I've tried -std=c99 which does appear to fix the long long but not the variadic

ozanbaba 12-14-2009 11:30 AM

Quote:

Originally Posted by knobby67 (Post 3790637)
Hi all,
after a great deal of trouble I managed to get directFB to cross compile for a ARM. However when I try to use it in my code all the libs seems OK (eg if I use the -ldirectfb etc) in my makefile they link, however when I include the directfb.h in my headers I get a large number of errors
most are
warning: ISO C does not permit named variadic macros

eg
/root/DirectFBArm/staging/usr/include/directfb/direct/messages.h:96:17: warning: ISO C does not permit named variadic macros

and a large number of
/root/DirectFBArm/staging/usr/include/directfb/direct/clock.h:34: error: ISO C++ does not support 'long long'

I compiled both libs and my example with the same compiler ARM 4.3 version.
Can anyone advise what to do? Is there a switch I can add to my makefile?
Thanks :)

PS I've tried -std=c99 which does appear to fix the long long but not the variadic

this could be a compiler bug;

http://crustytoothpaste.ath.cx/~bmc/...ariadic-macros
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455356

knudfl 12-14-2009 11:38 AM

Using an "arm-gcc-4.3" :

If the code you compile is from before 2008,
it may need a fix for gcc-4.3 .
Or use "arm-gcc-4.1" or --gcc-3.x ,
depending on the code age.

.....
You might want to read the gcc porting guide
to gcc 4.3
http://gcc.gnu.org/gcc-4.3/porting_to.html

and to gcc 4.4
http://gcc.gnu.org/gcc-4.4/porting_to.html
.....

knobby67 12-16-2009 03:17 AM

Thanks all, I'll give them a try. I've found that dropping --padantic works, but am not happy doing this


All times are GMT -5. The time now is 12:15 PM.