aboutsummaryrefslogtreecommitdiff
path: root/gcc/gansidecl.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-01-04 07:48:37 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-01-04 07:48:37 +0000
commit736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c (patch)
treee6dcbf0a389b511b9751f2e3fbcbf9af76269446 /gcc/gansidecl.h
parentfbc7f4a22d02ba59c589d13a50a7866d333e5e22 (diff)
downloadgcc-736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c.zip
gcc-736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c.tar.gz
gcc-736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c.tar.bz2
c-common.c (decl_attributes): Allow applying attribute `unused' on a LABEL_DECL.
* c-common.c (decl_attributes): Allow applying attribute `unused' on a LABEL_DECL. * c-parse.in (label): Parse attributes after a label, and call `decl_attributes' to handle them. * gansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define. * genrecog.c (OUTPUT_LABEL, write_tree_1, write_tree): When generating labels, mark them with ATTRIBUTE_UNUSED_LABEL. * invoke.texi: Note that labels can be marked `unused'. From-SVN: r24478
Diffstat (limited to 'gcc/gansidecl.h')
-rw-r--r--gcc/gansidecl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h
index 3ba99f5..ce9cda3 100644
--- a/gcc/gansidecl.h
+++ b/gcc/gansidecl.h
@@ -38,6 +38,14 @@ Boston, MA 02111-1307, USA. */
# define __attribute__(x)
#endif
+#ifndef ATTRIBUTE_UNUSED_LABEL
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 92)
+# define ATTRIBUTE_UNUSED_LABEL
+# else
+# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
+# endif /* GNUC < 2.92 */
+#endif /* ATTRIBUTE_UNUSED_LABEL */
+
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */