[Bug c++/55809] g++ doesn't differentiate elaborated type specifier and typename specifier in dependent types

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

--- Comment #4 from Andrew Pinski  ---
MSVC gives:
(3): error C2995: 'void f(void)': function template has already been
defined
(2): note: see declaration of 'f'
(2): error C3861: 'f': identifier not found

ICC gives:

(11): error: more than one instance of overloaded function "f" matches
the argument list:
function template "void f>()"
function template "void f>()"
  int main() { f(); f(); }
   ^

clang accepts it.

[Bug c++/55809] g++ doesn't differentiate elaborated type specifier and typename specifier in dependent types

2019-11-22 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55809

--- Comment #3 from Nathan Sidwell  ---
I think it's ill-formed.

the parameter is a non-type template parameter, using a qualified-id containing
a dependent type.  As such typename T::X * is correct.  Using class there is
ill-formed.

typename and class are only synonyms when naming a type-parameter-key.

[Bug c++/55809] g++ doesn't differentiate elaborated type specifier and typename specifier in dependent types

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

Eric Gallager  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||nathan at gcc dot gnu.org
Summary|Doesn't differentiate   |g++ doesn't differentiate
   |elaborated type specifier   |elaborated type specifier
   |and typename specifier in   |and typename specifier in
   |dependent types |dependent types

--- Comment #2 from Eric Gallager  ---
cc-ing C++ FE maintainers for their interpretation