This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61471] redeclaration of default-argument in function template declaration not caught


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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed in GCC 5.1.0:

d.cc:2:31: error: redeclaration of ‘template<class T> void f(int)’ may not have
default arguments [-fpermissive]
 template<class T> void f(int=3); // ill-formed
                               ^

If we don't have one, we should add a testcase for this and close it.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]