public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/78157] Incorrect diagnostic for variable template declaration
[not found] <bug-78157-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-23 11:29 ` redi at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: redi at gcc dot gnu.org @ 2021-08-23 11:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78157
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=83342
Keywords|diagnostic |rejects-valid
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The "got 1 template parameters" bug was fixed by r252040 so now we print:
78157.C:4:47: error: conflicting declaration 'double A<int>::pi<double, T>'
template <> template <class T> double A<int>::pi<double, T> =
3.1415926535897932385;
^~~~~~~~~~~~~
78157.C:2:39: note: previous declaration as 'T A<int>::pi<T, U>'
template<class T, class U> static T pi;
^~
78157.C: In instantiation of 'double A<int>::pi<double, int>':
78157.C:6:25: required from here
78157.C:6:25: error: explicit instantiation of 'A<int>::pi<double, int>' but no
definition available [-fpermissive]
template double A<int>::pi<double, int>;
^~~~~~~~~~~~~~~
That seems like it might be PR 83342. In any case, this is a C++ front end bug
now, not just a diagnostic one.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-23 11:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-78157-4@http.gcc.gnu.org/bugzilla/>
2021-08-23 11:29 ` [Bug c++/78157] Incorrect diagnostic for variable template declaration 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).