diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-01-04 07:48:37 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-01-04 07:48:37 +0000 |
commit | 736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c (patch) | |
tree | e6dcbf0a389b511b9751f2e3fbcbf9af76269446 /gcc/c-common.c | |
parent | fbc7f4a22d02ba59c589d13a50a7866d333e5e22 (diff) | |
download | gcc-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/c-common.c')
-rw-r--r-- | gcc/c-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index cfa4b78..008663e 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -521,7 +521,8 @@ decl_attributes (node, attributes, prefix_attributes) TREE_USED (type) = 1; else if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL - || TREE_CODE (decl) == FUNCTION_DECL) + || TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == LABEL_DECL) TREE_USED (decl) = 1; else warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); |