[Bug c++/77812] [5/6/7 Regression] incorrectly rejects valid C++ code that uses enum in template instantiation

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 20 11:44:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77812

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r181359.
Note, on:
enum f { R, G, B }; 
struct g {}; 

template <typename>
void e ();

template <typename>
void f ()
{
  e<enum f> (); 
}

template <typename>
void g ()
{
  e<struct g> (); 
}

void h ()
{
  f<int> ();
  g<int> ();
}
we actually reject even the instantiation of g with -std=c++98, while clang++
accepts it with all -std= versions.


More information about the Gcc-bugs mailing list