re PR c++/31923 (g++ accepts a storage-class-specifier on a template explicit special...
authorSimon Baldwin <simonb@google.com>
Mon, 18 Jun 2007 22:09:14 +0000 (22:09 +0000)
committerSimon Baldwin <simonb@gcc.gnu.org>
Mon, 18 Jun 2007 22:09:14 +0000 (22:09 +0000)
commit736b81007e965d4d1141dca6e45837d756741ddb
treeebe83019aac080d1a8f2fefc14cab3473f2d4579
parentd448952a83fa71a5658c2f775e7c86316821f4fe
re PR c++/31923 (g++ accepts a storage-class-specifier on a template explicit specialization)

gcc/cp/ChangeLog
2007-06-15  Simon Baldwin <simonb@google.com>

        PR c++/31923
        * parser.c (cp_parser_single_declaration): Added check for storage
        class other than sc_none in parsed declaration, and a flag to indicate
        if the call is part of an explicit template specialization parse.
        * (cp_parser_explicit_specialization): Specialization check flag added
        to call to cp_parser_single_declaration(), set true.
        * (cp_parser_template_declaration_after_export): Specialization check
        flag added to call to cp_parser_single_declaration(), set false.
        * pt.c (check_explicit_specialization): Added code to copy visiblity
        and linkage from the templated function to the explicit specialization.

gcc/testsuite/ChangeLog
2007-06-15  Simon Baldwin <simonb@google.com>

        PR c++/31923
        * g++.dg/template/error25.C: New.
        * g++.dg/template/spec35.C: New.

From-SVN: r125829
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/error25.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/spec35.C [new file with mode: 0644]