re PR c++/28861 (ICE on invalid in-class specialization)
PR c++/28861 * decl.c (shadow_tag): Return error_mark_node if maybe_process_partial_specialization failed. * g++.dg/template/spec32.C: New test. * g++.dg/parse/crash9.C: Adjust error markers. From-SVN: r117117
This commit is contained in:
parent
7ffb61d503
commit
d2a8ac2cf2
5 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-09-21 Lee Millward <lee.millward@codesourcery.com>
|
||||
|
||||
PR c++/28861
|
||||
* decl.c (shadow_tag): Return error_mark_node
|
||||
if maybe_process_partial_specialization failed.
|
||||
|
||||
2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
PR target/27650
|
||||
|
|
|
@ -3745,7 +3745,8 @@ shadow_tag (cp_decl_specifier_seq *declspecs)
|
|||
|
||||
}
|
||||
|
||||
maybe_process_partial_specialization (t);
|
||||
if (maybe_process_partial_specialization (t) == error_mark_node)
|
||||
return NULL_TREE;
|
||||
|
||||
/* This is where the variables in an anonymous union are
|
||||
declared. An anonymous union declaration looks like:
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2006-09-21 Lee Millward <lee.millward@codesourcery.com>
|
||||
|
||||
PR c++/28861
|
||||
* g++.dg/template/spec32.C: New test.
|
||||
* g++.dg/parse/crash9.C: Adjust error markers.
|
||||
|
||||
2006-09-21 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
* gcc.dg/dfp/decfloat-constants.c: Remove 'dg-do compile', fix typo.
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
// contains error.
|
||||
|
||||
template <typename> struct A {};
|
||||
template <typename> struct A<INVALID> : A<int> { }; // { dg-error "not declared|invalid" }
|
||||
template <typename> struct A<INVALID> : A<int> { }; // { dg-error "not declared|invalid|token|extra" }
|
||||
|
|
6
gcc/testsuite/g++.dg/template/spec32.C
Normal file
6
gcc/testsuite/g++.dg/template/spec32.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
//PR c++/28861
|
||||
|
||||
struct A
|
||||
{
|
||||
template<template<int> class B> struct B<0>; // { dg-error "name of class shadows" }
|
||||
};
|
Loading…
Add table
Reference in a new issue