From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3EC0A3858D37; Tue, 5 Dec 2023 21:02:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EC0A3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701810122; bh=MJfb/rKiG8qECbrFLzdTszWggH1ERhJTH4POej2JHl0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZWTELBFmX1jnJzpLET5woQwTpCiMf0uxmM7Aq4IC1MleQid8mj5M8UsoyiggcLaat ECrBoCBzMV3miHdxgPH+h6DG+qAAvZlOIzbHt9YWwTjgwQ67tfVGORrEtD4WXxDFxp hVkPySl1DGCcAtttJxgHtvjh5Ic0kYYjiNIugwjE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112838] Compiler is unable to show the exact error location when calling copy ctor for a non-copyable object Date: Tue, 05 Dec 2023 21:02:01 +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: 10.5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112838 --- Comment #8 from Andrew Pinski --- (In reply to Ahmad Nour from comment #7) > (In reply to Andrew Pinski from comment #3) > > (In reply to Ahmad Nour from comment #2) > > >=20 > > > Thanks for confirmation. > > > I tried with clang-12 -Wall -Wextra main.cpp, but I didn't get that > > > hint/note. Am I missing something? > >=20 > > Oh I tried with -std=3Dc++20 which provided that note. Sorry about tha= t. But > > it might be the case that adding this for -std=3Dc++17 might be hard ... >=20 > Hmmmmm this is what I'm getting with c++20. I can't find that note where = it > points to line #13 >=20 > >> clang-12 -Wall -Wextra main.cpp -std=3Dc++20 well clang-12 was released 2 years ago ... I am trying to say that clang already fixed this case for -std=3Dc++20 in a newer clang version and GCC s= hould fix this too, that is what PR 109551 is about. Note compiler developers te= nd to try to the trunk (mainline) sources of each compiler to see if what other compilers do and don't really look into older releases of the other compile= r to see when it was added especially when it comes to diagnostic improvments.=