From: Ulrich Drepper Date: Fri, 26 Oct 2001 23:35:32 +0000 (+0000) Subject: (__attribute_used__): Define. X-Git-Tag: cvs/glibc-2-2-5~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3640b91f7416080e4f16c93f7a59d6849ac6dc9;p=thirdparty%2Fglibc.git (__attribute_used__): Define. --- diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 02454ee4dae..45d2ac36624 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -160,6 +160,15 @@ # define __attribute_pure__ /* Ignore */ #endif +/* At some point during the gcc 3.1 development the `used' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (3,1) +# define __attribute_used__ __attribute__ ((__used__)) +#else +# define __attribute_used__ __attribute__ ((__unused__)) +#endif + /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings.