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++/30854] New: [4.3 Regression] Wrong number of arguments printed for constructor


On mainline we get a wrong diagnostic for the follwoing code snippet:

================
struct A
{
  A();
};

A a = -A();
================

bug.cc:6: error: no match for 'operator-' in '-A(0u)'

Note, that the constructor has no arguments, but 'A(0u)' is printed
in the error message. This gets even more confusing if you add a
constructor A(unsigned) to A.


-- 
           Summary: [4.3 Regression] Wrong number of arguments printed for
                    constructor
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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