cp/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* pt.c (do_decl_instantiation): If the VAR_DECL is not a
class member error out and return.
testsuite/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* g++.dg/template/crash71.C: New.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r129710
+2007-10-28 Paolo Carlini <pcarlini@suse.de>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/30659
+ * pt.c (do_decl_instantiation): If the VAR_DECL is not a
+ class member error out and return.
+
2007-10-27 Jakub Jelinek <jakub@redhat.com>
* error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
VAR_DECLs so we do the lookup here. Probably, grokdeclarator
should handle VAR_DECLs as it currently handles
FUNCTION_DECLs. */
+ if (!DECL_CLASS_SCOPE_P (decl))
+ {
+ error ("%qD is not a static data member of a class template", decl);
+ return;
+ }
result = lookup_field (DECL_CONTEXT (decl), DECL_NAME (decl), 0, false);
if (!result || TREE_CODE (result) != VAR_DECL)
{
+2007-10-28 Paolo Carlini <pcarlini@suse.de>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/30659
+ * g++.dg/template/crash71.C: New.
+
2007-10-28 Tobias Schlüter <tobi@gcc.gnu.org>
PR fortran/32147
--- /dev/null
+// PR c++/30659
+
+extern "C" template A<char> foo(); // { dg-error "forbids|static data|expected" }