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

2017-10-16 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #6 from Paolo Carlini  ---
Dup.

*** This bug has been marked as a duplicate of bug 15339 ***

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

2017-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

--- Comment #5 from Jonathan Wakely  ---
*** Bug 61472 has been marked as a duplicate of this bug. ***

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

2017-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

--- Comment #4 from Jonathan Wakely  ---
Fixed in GCC 5.1.0:

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

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

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

2014-06-11 Thread filip.roseen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

--- Comment #1 from Filip Roséen filip.roseen at gmail dot com ---
Created attachment 32922
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32922action=edit
testcase-real.cpp

The previously attached `testcase.cpp` contains a code snippet for a related,
but different, bug.

See the newly attached testcase.cpp for contents matching the code in the
original post.

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

2014-06-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-06-11
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
We diagnose this if the function template is instantiated. I'm not sure if
we're required to diagnose it for uninstantiated templates.


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

2014-06-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61471

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org ---
Oops, I messed up my test - we don't diagnose this even at instantiation