public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107408] New: Inaccurate "error: too many template-parameter-lists" diagnostic for missing template argument list
@ 2022-10-26  8:39 redi at gcc dot gnu.org
  2022-10-26  8:39 ` [Bug c++/107408] " redi at gcc dot gnu.org
  2022-10-26  8:40 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-26  8:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107408

            Bug ID: 107408
           Summary: Inaccurate "error: too many template-parameter-lists"
                    diagnostic for missing template argument list
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

template<class T> struct S
{
  template<class U> S(U);
};

template<class T> template<class U> S::S(U) { }

This prints:

t.C:6:38: error: too many template-parameter-lists
    6 | template<class T> template<class U> S::S(U) { }
      |                                      ^~


The caret is in the right location, but the diagnostic message is misleading.
The problem is a missing template argument list, it should be S<T>::S(U)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-26  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  8:39 [Bug c++/107408] New: Inaccurate "error: too many template-parameter-lists" diagnostic for missing template argument list redi at gcc dot gnu.org
2022-10-26  8:39 ` [Bug c++/107408] " redi at gcc dot gnu.org
2022-10-26  8:40 ` redi at gcc dot gnu.org

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).