mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-20 12:41:17 +08:00
re PR c++/13438 (internal compiler error: tree check: expected identifier_node, have integer_cst in c_parse_error at c-common.c:5921)
PR c++/13438 * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE, CPTI_UNION_TYPE, CPTI_ENUM_TYPE. (record_type_node): Remove. (union_type_node): Likewise. (enum_type_node): Likewise. * decl.c: Remove mention of above tree nodes in comment. * lex.c (cxx_init): Do not assign to record_type_node, union_type_node, or enum_type_node. Simplify handling of class_type_node. PR c++/13438 * g++.dg/parse/error8.C: New test. From-SVN: r74931
This commit is contained in:
parent
439a7e544d
commit
9e62871ee9
@ -1,5 +1,15 @@
|
||||
2003-12-21 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
|
||||
CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
|
||||
(record_type_node): Remove.
|
||||
(union_type_node): Likewise.
|
||||
(enum_type_node): Likewise.
|
||||
* decl.c: Remove mention of above tree nodes in comment.
|
||||
* lex.c (cxx_init): Do not assign to record_type_node,
|
||||
union_type_node, or enum_type_node. Simplify handling of
|
||||
class_type_node.
|
||||
|
||||
PR c++/11554
|
||||
* init.c (sort_mem_initializers): Add warning.
|
||||
|
||||
|
@ -521,9 +521,6 @@ enum cp_tree_index
|
||||
CPTI_BASE_DESC_TYPE,
|
||||
|
||||
CPTI_CLASS_TYPE,
|
||||
CPTI_RECORD_TYPE,
|
||||
CPTI_UNION_TYPE,
|
||||
CPTI_ENUM_TYPE,
|
||||
CPTI_UNKNOWN_TYPE,
|
||||
CPTI_VTBL_TYPE,
|
||||
CPTI_VTBL_PTR_TYPE,
|
||||
@ -602,9 +599,6 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
|
||||
#define base_desc_type_node cp_global_trees[CPTI_BASE_DESC_TYPE]
|
||||
|
||||
#define class_type_node cp_global_trees[CPTI_CLASS_TYPE]
|
||||
#define record_type_node cp_global_trees[CPTI_RECORD_TYPE]
|
||||
#define union_type_node cp_global_trees[CPTI_UNION_TYPE]
|
||||
#define enum_type_node cp_global_trees[CPTI_ENUM_TYPE]
|
||||
#define unknown_type_node cp_global_trees[CPTI_UNKNOWN_TYPE]
|
||||
#define vtbl_type_node cp_global_trees[CPTI_VTBL_TYPE]
|
||||
#define vtbl_ptr_type_node cp_global_trees[CPTI_VTBL_PTR_TYPE]
|
||||
|
@ -140,7 +140,7 @@ tree error_mark_list;
|
||||
tree ptm_desc_type_node;
|
||||
tree base_desc_type_node;
|
||||
|
||||
tree class_type_node, record_type_node, union_type_node, enum_type_node;
|
||||
tree class_type_node;
|
||||
tree unknown_type_node;
|
||||
|
||||
Array type `vtable_entry_type[]'
|
||||
|
16
gcc/cp/lex.c
16
gcc/cp/lex.c
@ -405,21 +405,7 @@ cxx_init (void)
|
||||
|
||||
current_function_decl = NULL;
|
||||
|
||||
class_type_node = build_int_2 (class_type, 0);
|
||||
TREE_TYPE (class_type_node) = class_type_node;
|
||||
ridpointers[(int) RID_CLASS] = class_type_node;
|
||||
|
||||
record_type_node = build_int_2 (record_type, 0);
|
||||
TREE_TYPE (record_type_node) = record_type_node;
|
||||
ridpointers[(int) RID_STRUCT] = record_type_node;
|
||||
|
||||
union_type_node = build_int_2 (union_type, 0);
|
||||
TREE_TYPE (union_type_node) = union_type_node;
|
||||
ridpointers[(int) RID_UNION] = union_type_node;
|
||||
|
||||
enum_type_node = build_int_2 (enum_type, 0);
|
||||
TREE_TYPE (enum_type_node) = enum_type_node;
|
||||
ridpointers[(int) RID_ENUM] = enum_type_node;
|
||||
class_type_node = ridpointers[(int) RID_CLASS];
|
||||
|
||||
cxx_init_decl_processing ();
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
2003-12-21 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/13438
|
||||
* g++.dg/parse/error8.C: New test.
|
||||
|
||||
PR c++/11554
|
||||
* testsuite/g++.dg/warn/ctor-init-1.C: New test.
|
||||
|
||||
|
4
gcc/testsuite/g++.dg/parse/error8.C
Normal file
4
gcc/testsuite/g++.dg/parse/error8.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/13438
|
||||
|
||||
struct A { friend typename struct B; }; // { dg-error "" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user