From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D48223858D1E; Wed, 4 May 2022 20:39:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D48223858D1E From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100825] function signature constraints are not a part of mangled name Date: Wed, 04 May 2022 20:39:49 +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: 11.1.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: 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: Wed, 04 May 2022 20:39:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100825 --- Comment #12 from Jonathan Wakely --- At the very least, GCC should give better errors instead of just letting the assembler complain. Clang tells you where the conflicting definitions come from, e.g. for the code in comment 1: 1.C:7:23: error: definition with same mangled name '_Z3fooIiEvv' as another definition template void foo() requires true {} //2 ^ 1.C:1:23: note: previous definition is here template void foo() {} //1 ^ 1 error generated. Similarly with EDG: eccp: diagnostics generated from compilation of 1.int.c: 1.C:7:65: error: redefinition of =E2=80=98_Z3fooIiEvv=E2=80=99 7 | template void foo() requires true {} //2 | ^= =20=20=20=20=20=20=20 1.C:1:65: note: previous definition of =E2=80=98_Z3fooIiEvv=E2=80=99 with t= ype =E2=80=98void(void)=E2=80=99 1 | template void foo() {} //1 | ^= =20=20=20=20=20=20=20 eccp: end of diagnostics from compilation of 1.int.c eccp: gcc compilation of 1.int.c returned an exit status of 1 These are both much better than the result with GCC: /tmp/ccnRtmjt.s: Assembler messages: /tmp/ccnRtmjt.s:59: Error: symbol `_Z3fooIiEvv' is already defined=