macro with variable args

Vincent R. forumer@smartmobili.com
Mon Jun 22 18:57:00 GMT 2009


Hi,

Still using symbian toolchain and I want to port an application that makes
uses of macro with variable args :

#ifdef HAVE___ATTRIBUTE__
# ifdef __GNUC__

#  if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 &&
__GNUC_MINOR__ >= 3))
#   define EINA_ARG_NONNULL(idx, ...) __attribute__ ((nonnull(idx, ##
__VA_ARGS__)))
#  else
#   define EINA_ARG_NONNULL(idx, ...)
#  endif

# else /* no __GNUC__ */
#  define EINA_ARG_NONNULL(idx, ...)
# endif
#else /* no HAVE___ATTRIBUTE__ */
# define EINA_ARG_NONNULL(idx, ...)
#endif


I have the following error when compiling the line : 
Creation Time	Description	Resource	Path	Location	Type
1245696681615	argument expected while expanding macro 'EINA_ARG_NONNULL'
(got 1, wanted >=2)	eina_magic.h	eina/src/include	line 44	C/C++ Problem
when compiling the line :

EAPI void eina_magic_string_set(Eina_Magic magic, const char *magic_name)
EINA_ARG_NONNULL(2);


and symbian sdk is using the followung gcc version :
$ arm-none-symbianelf-gcc --version
arm-none-symbianelf-gcc.exe (GCC) 3.4.3 (release) (CodeSourcery ARM Q1C
2005)


Does it mean this gcc version doesn't support macro with variable arguments
? Is there any workaround ?









More information about the Gcc-help mailing list