re PR c++/18747 ("template<> int i;" accepted)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 31 Aug 2012 21:35:33 +0000 (21:35 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 31 Aug 2012 21:35:33 +0000 (17:35 -0400)
commit1dec70fa4cc518b6d823be7b643a39697cb4c625
tree1524695c56ed99a3ea06e58c582ae2814eb03a05
parentbe279f86519217092f8ddd89f4cc0688720d1730
re PR c++/18747 ("template<> int i;" accepted)

PR c++/18747
* pt.c (check_template_variable): New.
(num_template_headers_for_class): Split out...
* decl.c (grokdeclarator): ...from here.
(start_decl): Remove redundant diagnostic.
* cp-tree.h: Declare them
* parser.c (cp_parser_single_declaration): Call check_template_variable.
.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r190842
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/error50.C [new file with mode: 0644]