diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-29 21:05:58 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-29 21:05:58 +0000 |
commit | 92fccaaa535d5555bda8058c165fe3b2e0528c88 (patch) | |
tree | d2e910056e5bca216a5240901b18a528d2b8fe28 /gcc/c-decl.c | |
parent | e00076da6d4b2beea95861f41ef32d6aaac272d3 (diff) | |
download | gcc-92fccaaa535d5555bda8058c165fe3b2e0528c88.tar.gz |
007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* c-decl.c (pop_scope): Replace warnings with call to
warn_for_unused_label.
* c-common.h (warn_for_unused_label): Declare.
* c-common.c (warn_for_unused_label): Define.
cp/
* decl.c (pop_label): Replace warning with call to
warn_for_unused_label.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f669a4729da..2f9ffc3b622 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -761,13 +761,9 @@ pop_scope (void) error ("label %q+D used but not defined", p); DECL_INITIAL (p) = error_mark_node; } - else if (!TREE_USED (p) && warn_unused_label) - { - if (DECL_INITIAL (p)) - warning (0, "label %q+D defined but not used", p); - else - warning (0, "label %q+D declared but not defined", p); - } + else + warn_for_unused_label (p); + /* Labels go in BLOCK_VARS. */ TREE_CHAIN (p) = BLOCK_VARS (block); BLOCK_VARS (block) = p; |