[Bug c++/49156] New: [C++0x] Error reporting routines re-entered

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 25 09:25:00 GMT 2011


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

           Summary: [C++0x] Error reporting routines re-entered
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


from a comment on PR 47336


template<typename T> T declval();

template<typename T>
struct S {

  template<typename U>
    static U get(const volatile T&);

  template<typename U>
    static decltype(*declval<U>()) get(...);

  typedef decltype(get<T>(declval<T>())) type;
};

struct X { };

S<X>::type x;



err.cc: In instantiation of ‘S<X>’:
err.cc:17:5:   instantiated from here
err.cc:12:42: error: no matching function for call to ‘S<X>::get(X)’
err.cc:12:42: note: candidates are:
err.cc:7:35: note: template<class U> static U S::get(const volatile T&) [with U
= U, T = X]

Internal compiler error: Error reporting routines re-entered.



More information about the Gcc-bugs mailing list