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++/49156] New: [C++0x] Error reporting routines re-entered


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.


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