summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 13:39:47 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 13:39:47 +0000
commit8bed0f723ce65f7836e95cedfbf83b12e8a556f0 (patch)
tree495a436ebff265f19619b5634321f25601675805 /gcc/cp/error.c
parentbf810855422e4f54c4a34b6ac80ed20f414858ad (diff)
downloadgcc-8bed0f723ce65f7836e95cedfbf83b12e8a556f0.tar.gz
/cp
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58362 * error.c (location_of): Don't handle PARM_DECLs specially. /testsuite 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58362 * g++.dg/warn/Wunused-parm-5.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index a51984e2eb4..02ec6c7608f 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2789,9 +2789,7 @@ lang_decl_name (tree decl, int v, bool translate)
location_t
location_of (tree t)
{
- if (TREE_CODE (t) == PARM_DECL && DECL_CONTEXT (t))
- t = DECL_CONTEXT (t);
- else if (TYPE_P (t))
+ if (TYPE_P (t))
{
t = TYPE_MAIN_DECL (t);
if (t == NULL_TREE)