[Bug c++/15339] [DR217] Adding default arguments to function templates in redeclarations should be forbidden

paolo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Aug 2 19:42:00 GMT 2014


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

--- Comment #16 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Sat Aug  2 19:41:32 2014
New Revision: 213519

URL: https://gcc.gnu.org/viewcvs?rev=213519&root=gcc&view=rev
Log:
/cp
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/15339
    * decl.c (check_redeclaration_no_default_args): New.
    (duplicate_decls): Use it, handle default arguments
    in redeclarations of function templates.

/testsuite
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/15339
    * g++.dg/other/default9.C: New.
    * g++.dg/other/default10.C: Likewise.
    * g++.dg/other/default3.C: Remove xfail.

Added:
    trunk/gcc/testsuite/g++.dg/other/default10.C
    trunk/gcc/testsuite/g++.dg/other/default9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/other/default3.C



More information about the Gcc-bugs mailing list