summaryrefslogtreecommitdiff
path: root/misc/sys
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-10-26 23:35:32 +0000
committerUlrich Drepper <drepper@redhat.com>2001-10-26 23:35:32 +0000
commitd3640b91f7416080e4f16c93f7a59d6849ac6dc9 (patch)
treedbdb800805d05f61b962b5117c4acce4713a25b5 /misc/sys
parenta5fcd166476e87027ff28953f6f487ee218b60c1 (diff)
(__attribute_used__): Define.
Diffstat (limited to 'misc/sys')
-rw-r--r--misc/sys/cdefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 02454ee4da..45d2ac3662 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.