diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-09 13:39:47 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-09 13:39:47 +0000 |
commit | 8bed0f723ce65f7836e95cedfbf83b12e8a556f0 (patch) | |
tree | 495a436ebff265f19619b5634321f25601675805 /gcc/cp/error.c | |
parent | bf810855422e4f54c4a34b6ac80ed20f414858ad (diff) | |
download | gcc-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.c | 4 |
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) |