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++/57014] pretty-printer prints anonymous for template-parameter with a name Date: Tue, 10 Aug 2021 11:02:19 +0000 [thread overview] Message-ID: <bug-57014-4-sUlLobaq4k@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57014-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57014 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-08-10 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Confirmed. Here's the relevant code: template<int> struct B { void F2(int, int, int = 0); }; template<int N> void B<N>::F2(int = 0, int, int) {} 57014.C:6:22: error: redeclaration of ‘void B<<anonymous> >::F2(int, int, int)’ may not have default arguments [-fpermissive] 6 | template<int N> void B<N>::F2(int = 0, int, int) {} | ^~~~ 57014.C:6:40: error: default argument missing for parameter 2 of ‘void B<<anonymous> >::F2(int, int, int)’ 6 | template<int N> void B<N>::F2(int = 0, int, int) {} | ^~~ 57014.C:6:31: note: ...following parameter 1 which has a default argument 6 | template<int N> void B<N>::F2(int = 0, int, int) {} | ^~~~~~~ It would be nice if later declarations that name a template parameter could be used to "fill in" any unnamed template parameters from the original declaration, so that pretty printing isn't so ugly.
next parent reply other threads:[~2021-08-10 11:02 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-57014-4@http.gcc.gnu.org/bugzilla/> 2021-08-10 11:02 ` redi at gcc dot gnu.org [this message] 2021-08-12 12:07 ` redi 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-57014-4-sUlLobaq4k@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).