Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[From Arnaud Giersch] Use Gcc attribute __unused__ instead of unused for _XBT_GNU_UNUSED.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Jul 2010 14:06:49 +0000 (14:06 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Jul 2010 14:06:49 +0000 (14:06 +0000)
This allows to use unused as macro name in user code, as for example:

#ifdef __GNUC__
#define unused __attribute__((__unused__))
#else
#define unused
#endif

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7976 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/misc.h

index 94900ff..36bc11c 100644 (file)
@@ -18,7 +18,7 @@
 # define _XBT_GNUC_FORMAT( arg_idx )                \
                   __attribute__((__format_arg__ (arg_idx)))
 # define _XBT_GNUC_NORETURN __attribute__((__noreturn__))
-# define _XBT_GNUC_UNUSED  __attribute__((unused))
+# define _XBT_GNUC_UNUSED  __attribute__((__unused__))
 # define _XBT_GNUC_CONSTRUCTOR __attribute__((__constructor__))
 # define _XBT_GNUC_DESTRUCTOR __attribute__((__destructor__))
 # undef _XBT_NEED_INIT_PRAGMA