From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58F103858C35; Sun, 3 Dec 2023 20:38:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58F103858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701635928; bh=JjTMgeI5cjEvJLlZou29WBndmB0LeCtm8ExRNI1czaQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p8oXWDGEOD0ncereZKzO6icHSoEOJlYtFGwHiNL59g8i5YoXt6fmJtChUsL7pMuga 7FErSsefhnwEj22B4yWv+DCLIKCSIQm3iUDLTXxoTFn/NAP3zMv5LIaxOKQLfr3Kgt js6gy2JtzYhehtXvAcuC2JLew+Z6EmT7FVorivw4= From: "eng.ahmad.nour at gmail dot com" 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: Sun, 03 Dec 2023 20:38:48 +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: eng.ahmad.nour at gmail dot com 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: 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 #2 from Ahmad Nour --- (In reply to Andrew Pinski from comment #1) > Confirmed, I thought I had saw an issue filed that is very smilar to this. >=20 >=20 > Note clang provides the context: >=20 > :5:7: note: in instantiation of member function > 'std::vector>::vector' requested here > 5 | class NonCopyable > | ^ > :14:18: note: in implicit copy constructor for 'NonCopyable' first > required here > 14 | NonCopyable b(a); > | ^ Thanks for confirmation. I tried with clang-12 -Wall -Wextra main.cpp, but I didn't get that hint/no= te. Am I missing something?=