re PR c++/37087 (Segfault on compiling template defined in wrong namespace.)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 12 Aug 2008 19:38:02 +0000 (19:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 12 Aug 2008 19:38:02 +0000 (19:38 +0000)
commit905319d95e57f935e3f7fab102901334ee0afa02
treef5ba16fa5d24529bdc3f1e9c02895e3b3e7ea501
parent4d2b059d5e51c6cd6cca3cc775268039657d3317
re PR c++/37087 (Segfault on compiling template defined in wrong namespace.)

/cp
2008-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/37087
* parser.c (cp_parser_class_head): Early return error_mark_node in
case of global qualification of class name or qualified name that
does not name a class.

/testsuite
2008-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/37087
* g++.dg/template/crash80.C: New.
* g++.old-deja/g++.other/decl5.C: Adjust.

From-SVN: r139034
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/crash80.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/decl5.C