This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52130] New: missing check for matching underlying type during instantiation of enum member of class template


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

             Bug #: 52130
           Summary: missing check for matching underlying type during
                    instantiation of enum member of class template
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: richard-gccbugzilla@metafoo.co.uk


g++ incorrectly accepts this code in c++11 mode:

template<typename T> struct S { enum E : int; };
template<typename T> enum S<T>::E : T { e };
S<char>::E x = S<char>::e;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]