https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61472
Bug ID: 61472 Summary: added default-argument in later declaration of function template not caught Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: filip.roseen at gmail dot com Created attachment 32923 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32923&action=edit testcase.cpp template<class T> void f(int); template<class T> void f(int=3); int main () { } ----------------------------- `gcc` inaccurately accepts the above snippet, which is violating the following sentence from [dcl.fct.default]p4: > For non-template functions, default arguments can be added in later > declarations of a function in the same scope. -----------------------------