public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57136] New: Should redeclaration of class template with function pointer rather than function be an error?
@ 2013-05-01 15:30 kjw.chiu at gmail dot com
2021-07-27 2:05 ` [Bug c++/57136] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: kjw.chiu at gmail dot com @ 2013-05-01 15:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57136
Bug #: 57136
Summary: Should redeclaration of class template with function
pointer rather than function be an error?
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kjw.chiu@gmail.com
'g++ -std=c++11 -Wall' compiles this without complaint:
template <void F(int)> class A;
template <void (*F)(int)> class A;
template <typename T, void F(T)> class B;
template <typename T, void (*F)(T)> class B;
clang++ issues an error for the redeclaration of class
B, but not for the redeclaration of class A. I filed
this as a bug at LLVM, where I was told that this is
correct, and that the rule is, if I understood it
correctly:
If a template parameter depends on a previous
template parameter, then it must be token-by-token
equivalent in any redeclaration.
I simply filing here for informative purposes. I have
not attempted to confirm this in the C++11
specification.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/57136] Should redeclaration of class template with function pointer rather than function be an error?
2013-05-01 15:30 [Bug c++/57136] New: Should redeclaration of class template with function pointer rather than function be an error? kjw.chiu at gmail dot com
@ 2021-07-27 2:05 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-27 2:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57136
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
clang started to accept this code in clang 10.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-27 2:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-01 15:30 [Bug c++/57136] New: Should redeclaration of class template with function pointer rather than function be an error? kjw.chiu at gmail dot com
2021-07-27 2:05 ` [Bug c++/57136] " pinskia 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).