From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 91E50385801E; Sun, 20 Jun 2021 09:08:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91E50385801E From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization Date: Sun, 20 Jun 2021 09:08:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2021 09:08:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D43933 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |8.3.1 --- Comment #3 from Andrew Pinski --- Looks like it has been fixed on the trunk: t7.cc: In constructor =E2=80=98A::A()=E2=80=99: t7.cc:13:10: error: call of overloaded =E2=80=98QString(int)=E2=80=99 is am= biguous 13 | A::A() : a(0), b(0) { } | ^~~~ t7.cc:4:3: note: candidate: =E2=80=98QString::QString(char)=E2=80=99 4 | QString(char); | ^~~~~~~ t7.cc:3:3: note: candidate: =E2=80=98QString::QString(const QString&)=E2=80= =99 3 | QString(const QString&); | ^~~~~~~ t7.cc:2:3: note: candidate: =E2=80=98QString::QString(const char*)=E2=80=99 2 | QString(const char*); | ^~~~~~~ t7.cc:13:16: error: call of overloaded =E2=80=98QString(int)=E2=80=99 is am= biguous 13 | A::A() : a(0), b(0) { } | ^~~~ t7.cc:4:3: note: candidate: =E2=80=98QString::QString(char)=E2=80=99 4 | QString(char); | ^~~~~~~ t7.cc:3:3: note: candidate: =E2=80=98QString::QString(const QString&)=E2=80= =99 3 | QString(const QString&); | ^~~~~~~ t7.cc:2:3: note: candidate: =E2=80=98QString::QString(const char*)=E2=80=99 2 | QString(const char*); | ^~~~~~~ It was broken in GCC 8.3 though: t7.cc: In constructor =E2=80=98A::A()=E2=80=99: t7.cc:13:19: error: call of overloaded =E2=80=98QString(int)=E2=80=99 is am= biguous A::A() : a(0), b(0) { } ^=