From d3640b91f7416080e4f16c93f7a59d6849ac6dc9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 26 Oct 2001 23:35:32 +0000 Subject: (__attribute_used__): Define. --- misc/sys/cdefs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'misc') diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 02454ee..45d2ac3 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. -- cgit v1.1