diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-10-25 16:26:10 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-10-25 16:26:10 +0000 |
commit | b02ef56d8d792059f39bef1d9b853d9a2af0aa3b (patch) | |
tree | 5df10956abfcc99ccbea7d543e1f2f6ec16fd939 /gcc/cp | |
parent | 347593705483c3f425942501ae1a20485fa66ac6 (diff) | |
download | gcc-b02ef56d8d792059f39bef1d9b853d9a2af0aa3b.zip gcc-b02ef56d8d792059f39bef1d9b853d9a2af0aa3b.tar.gz gcc-b02ef56d8d792059f39bef1d9b853d9a2af0aa3b.tar.bz2 |
re PR c++/58878 (Template parameter name can be hidden in a template member function defined inside the class specifier)
/cp
2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58878
* pt.c (check_template_shadow): Don't skip declarations in inline
member templates.
/testsuite
2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58878
* g++.dg/template/pr58878.C: New.
From-SVN: r204071
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dfe4a3f..297d015 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-10-25 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58878 + * pt.c (check_template_shadow): Don't skip declarations in inline + member templates. + 2013-10-25 Tobias Burnus <burnus@net-b.de> PR other/33426 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cbb0339a..224be8b 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3511,7 +3511,8 @@ check_template_shadow (tree decl) name inside a class. We check TPFI to avoid duplicate errors for inline member templates. */ if (decl == olddecl - || TEMPLATE_PARMS_FOR_INLINE (current_template_parms)) + || (DECL_TEMPLATE_PARM_P (decl) + && TEMPLATE_PARMS_FOR_INLINE (current_template_parms))) return true; error ("declaration of %q+#D", decl); |