summaryrefslogtreecommitdiffstats
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-04 07:48:37 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-04 07:48:37 +0000
commit41e80e4be4c840e827127434fc3997190978b0ba (patch)
treee6dcbf0a389b511b9751f2e3fbcbf9af76269446 /gcc/c-parse.in
parent5319bf9fed71040d70154bf09fc390cd8b7f5ad5 (diff)
downloadppe42-gcc-41e80e4be4c840e827127434fc3997190978b0ba.tar.gz
ppe42-gcc-41e80e4be4c840e827127434fc3997190978b0ba.zip
* 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'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index c0bf10798ee..5536e64bf32 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -2214,12 +2214,15 @@ label: CASE expr_no_commas ':'
error_with_decl (duplicate, "this is the first default label");
}
position_after_white_space (); }
- | identifier ':'
+ | identifier ':' maybe_attribute
{ tree label = define_label (input_filename, lineno, $1);
stmt_count++;
emit_nop ();
if (label)
- expand_label (label);
+ {
+ expand_label (label);
+ decl_attributes (label, $3, NULL_TREE);
+ }
position_after_white_space (); }
;
OpenPOWER on IntegriCloud