From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C6F43858D37; Thu, 6 Oct 2022 20:05:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C6F43858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665086705; bh=lZoHSXAKUubIWAQzEFFIjQuwKMojd+aExhjmcTpeu0g=; h=From:To:Subject:Date:From; b=hGt7tC9fe0Lr7jlen2FywFS4WZ1pBKUDyTbCUxRLagCaT2JU0KfbrZLqNSP1Utv7S B98821COnmfYFl8sjPL8TYUJb7GACW9UHMG+Dl+4hRc1OfiLnhLVllM11+FfLV/dly YQg3U1gBcq3uf2l7iaGCo/AYDmr1xydG0ZHOW8Rc= From: "physhivam at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107175] New: overloaded resolution has a bug incase of deleted functions Date: Thu, 06 Oct 2022 20:05:05 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: physhivam at gmail dot com 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=3D107175 Bug ID: 107175 Summary: overloaded resolution has a bug incase of deleted functions Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: physhivam at gmail dot com Target Milestone: --- Hey, I was trying to build clang's libcxx on my ubuntu 22.04 and it has gcc-11.2 by default most prolly, but while building libcxx there was an err= or about using the deleted function but it seems that overloaded resolution in gcc-11 has a bug namespace N { struct S {}; void func(S); } namespace ADL { void func() =3D delete; } template void call_func(T t) { using ADL::func; func(t); } int main() { call_func(N::S{}); } error:=20 : In instantiation of 'void call_func(T) [with T =3D N::S]': :18:12: required from here :14:7: error: use of deleted function 'void ADL::func()' 14 | func(t); | ~~~~^~~ :8:8: note: declared here 8 | void func() =3D delete; | ^~~~ Compiler returned: 1 https://godbolt.org/z/GPTPYaobb , it consider wrong overloaded function , although the bug is fixed in the most recent version but I guess this needs= to be backport in the previous version where gcc starts support for c++11, as = many of the previous versions are the default versions on several machines.=