]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/13140 (declaration in global namespace, definition inside named or anon...
authorMark Mitchell <mark@codesourcery.com>
Thu, 15 Sep 2005 16:03:32 +0000 (16:03 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 15 Sep 2005 16:03:32 +0000 (16:03 +0000)
commit9c12301f5b2d91a5b6ccdaf7d323d7ca3a09e041
treeafc83bbd1a00cee91c0be29bdd545cafdb20f9d9
parentc629e611eb78853f8ccd85173b758cabbdc0e56b
re PR c++/13140 (declaration in global namespace, definition inside named or anon namespace)

PR c++/13140
* decl.c (check_class_member_definition_namespace): New function.
(grokfndecl): Use it.
(grokvardecl): Likewise.
(grokdecl): Improve documentation.
* pt.c (check_explicit_instantiation_namespace): New function.
(register_specialization): Call check_specialization_namespace
when replacing an implicitly instantiated function.
(check_explicit_specialization): Ensure that DECL_CONTEXT is set
correctly for namespace-scope specializations.
(do_decl_instantiation): Use
check_explicit_instantiation_namespace.
(do_type_instantiation): Likewise.

PR c++/13140
* g++.dg/parse/class2.C: New test.
* g++.dg/template/explicit8.C: Likewise.
* g++.dg/template/spec25.C: Likewise.

* testsuite/testsuite_character.h: Specialize character<>
templates in __gnu_cxx, not in __gnu_test.

From-SVN: r104310
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/class2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/explicit8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/spec25.C [new file with mode: 0644]
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/testsuite_character.h