[Bug c++/48920] typename specifier should not ignore non-type names

2021-12-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #8 from Andrew Pinski  ---
Dup of bug 32066.

*** This bug has been marked as a duplicate of bug 32066 ***

[Bug c++/48920] typename specifier should not ignore non-type names

2021-12-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-12-08
 Status|UNCONFIRMED |NEW

--- Comment #7 from Andrew Pinski  ---
Confirmed with:
namespace A {
  struct B { };
  int B;
};

typename A::B a;

[Bug c++/48920] typename specifier should not ignore non-type names

2021-12-08 Thread schaub.johannes at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

--- Comment #6 from Johannes Schaub  ---
Well then you can replace the class with a nameepace, I think, to remove the
class-scope complication. I think GCC would still incorrectly apply typename
lookup.

[Bug c++/48920] typename specifier should not ignore non-type names

2021-12-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||accepts-invalid

--- Comment #5 from Andrew Pinski  ---
Hmm, MSVC rejects this for a different reason from clang (and a different
reason from what the report is requesting):
(7): error C2761: 'int A::B': redeclaration of member is not allowed

[Bug c++/48920] typename specifier should not ignore non-type names

2020-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

Marek Polacek  changed:

   What|Removed |Added

 CC||michele.caini at gmail dot com

--- Comment #4 from Marek Polacek  ---
*** Bug 78286 has been marked as a duplicate of this bug. ***

[Bug c++/48920] typename specifier should not ignore non-type names

2019-11-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

--- Comment #3 from Eric Gallager  ---
(In reply to Jonathan Wakely from comment #2)
> For the first testcase [basic.scope.class] says no diagnostic required,
> doesn't it?

ok but what about adding an optional one though?

[Bug c++/48920] typename specifier should not ignore non-type names

2012-12-26 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920



--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2012-12-26 
13:21:27 UTC ---

For the first testcase [basic.scope.class] says no diagnostic required, doesn't

it?


[Bug c++/48920] typename specifier should not ignore non-type names

2011-05-06 Thread schaub.johannes at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920

--- Comment #1 from Johannes Schaub schaub.johannes at googlemail dot com 
2011-05-06 23:47:33 UTC ---
(In reply to comment #0)
 […] As a perhaps related issue, the following looks well-formed:
 
 templatetypename T
 void f(typename T::B) { }
 
 templatetypename T
 void f(struct T::B) { }
 
 GCC rejects it as a redefinition. The dependent parameter types of both look
 different.

The Itanium ABI does not include any way to distinguish these two cases, so I
suspect GCC can do nothing about this. And if one were to include typename as
a hint into the mangling, I can see how this quickly can get out of hand.