aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-05-07 10:28:12 +0000
committerJason Merrill <merrill@gnu.org>1995-05-07 10:28:12 +0000
commit497dc802f64d0554fb81dfd9f1699587762bc254 (patch)
tree451982850aa8004f1a568aa3ad2353eab4ed82f6 /gcc
parent8d75e50998068ad68b41954524301fd855b2b425 (diff)
downloadgcc-497dc802f64d0554fb81dfd9f1699587762bc254.zip
gcc-497dc802f64d0554fb81dfd9f1699587762bc254.tar.gz
gcc-497dc802f64d0554fb81dfd9f1699587762bc254.tar.bz2
(expand_function_end): Don't warn about unused
anonymous or artificial parms. From-SVN: r9585
Diffstat (limited to 'gcc')
-rw-r--r--gcc/function.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 83a6962..7715740 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5241,7 +5241,8 @@ expand_function_end (filename, line, end_bindings)
for (decl = DECL_ARGUMENTS (current_function_decl);
decl; decl = TREE_CHAIN (decl))
- if (! TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL)
+ if (! TREE_USED (decl) && TREE_CODE (decl) == PARM_DECL
+ && DECL_NAME (decl) && ! DECL_ARTIFICIAL (decl))
warning_with_decl (decl, "unused parameter `%s'");
}