From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 347703858C39; Tue, 20 Jun 2023 22:28:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 347703858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687300107; bh=AoP20bqGnU86a2yRgDaTRXLvDsVwdWELod0xsL8WdSg=; h=From:To:Subject:Date:From; b=M0B7WY8UXgYm3wMZnAYc4fl8qALfCq0VAmRwDv9ebCmfvia3rIhq40cuC1pWZrR0t 38G+SctCKE8tkF3/LbLH75kmO0yC9/U219hkiVcq4H/lE4lgXSxNpxEVlOGqm9gRHI wR/ARxqMa2Z2i+7zd/P8D2FL/IL0ipboV3JJCDks= From: "csaba_22 at yahoo dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110330] New: GCC does not diagnose ambiguous function introduced from base class Date: Tue, 20 Jun 2023 22:28:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: csaba_22 at yahoo dot co.uk X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110330 Bug ID: 110330 Summary: GCC does not diagnose ambiguous function introduced from base class Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: csaba_22 at yahoo dot co.uk Target Milestone: --- The following code struct Foo{}; struct Bar{}; struct Base { Foo func1(const Foo , const Bar =3D Bar{}) const { return {}; }; }; struct Derived : public Base { using Base::func1; Foo func1(const Foo ) const { return {}; }; }; int main() { Foo foo; Derived der; der.func1(foo); } is rejected by ICX and clang, but accepted by GCC (up to 13.1). https://godbolt.org/z/4M3rrs3r4 The consensus at https://stackoverflow.com/questions/76517300/gcc-does-not-see-function-intr= oduced-from-base-class-as-ambiguous seems to be that this is a bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D84832 was shown as a possible duplicate, although the problem there wasn't ambiguity.=