public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-100825-4-jW58Ms3b3M@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100825-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100825 --- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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 <class> void foo() requires true {} //2 ^ 1.C:1:23: note: previous definition is here template <class> 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 ‘_Z3fooIiEvv’ 7 | template <class> void foo() requires true {} //2 | ^ 1.C:1:65: note: previous definition of ‘_Z3fooIiEvv’ with type ‘void(void)’ 1 | template <class> void foo() {} //1 | ^ 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
next prev parent reply other threads:[~2022-05-04 20:39 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-29 11:54 [Bug c++/100825] New: " vopl at bk dot ru 2021-05-29 12:22 ` [Bug c++/100825] " vopl at bk dot ru 2021-05-31 11:08 ` vopl at bk dot ru 2021-06-01 9:47 ` redi at gcc dot gnu.org 2021-06-01 10:44 ` vopl at bk dot ru 2021-06-01 11:30 ` redi at gcc dot gnu.org 2021-06-01 13:41 ` vopl at bk dot ru 2021-06-02 16:26 ` rs2740 at gmail dot com 2021-06-09 16:56 ` nickolay.merkin at gmail dot com 2021-06-09 17:25 ` redi at gcc dot gnu.org 2021-08-02 9:02 ` redi at gcc dot gnu.org 2021-08-02 9:29 ` redi at gcc dot gnu.org 2022-05-04 20:39 ` redi at gcc dot gnu.org [this message] 2023-01-06 6:35 ` pinskia at gcc dot gnu.org 2023-04-07 19:50 ` richard-gccbugzilla at metafoo dot co.uk 2023-10-06 2:02 ` jason at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100825-4-jW58Ms3b3M@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).