This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61471] redeclaration of default-argument in function template declaration not caught
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Oct 2017 10:31:15 +0000
- Subject: [Bug c++/61471] redeclaration of default-argument in function template declaration not caught
- Auto-submitted: auto-generated
- References: <bug-61471-4@http.gcc.gnu.org/bugzilla/>
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.