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++/48284] New: [C++0x] incorrect demangling of decltype operand in diagnostic


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

           Summary: [C++0x] incorrect demangling of decltype operand in
                    diagnostic
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


template<typename C>
auto g(C& c) -> decltype (c.f()) { return c.f(); }

template<typename C>
auto g(C& c) -> decltype (c.f()) { return c.f(); }


x.C:5:32: error: redefinition of 'template<class C> decltype (c->f()) g(C&)'
x.C:2:32: error: 'template<class C> decltype (c->f()) g(C&)' previously
declared here

The diagnostics show c->f() instead of c.f()

Same result for 4.5 and 4.6, I didn't try 4.7


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