diff options
Diffstat (limited to 'gcc/cp')
| -rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
| -rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dee7410..d2ec158 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> + + PR C++/23426 + * decl.c (start_decl): Check that the decl is an + error_mark_node before getting the type. + Remove the check for the decl's type being an + error_mark_node. + 2005-10-21 Mark Mitchell <mark@codesourcery.com> PR c++/24260 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 2431877..ef61d17 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3640,14 +3640,12 @@ start_decl (const cp_declarator *declarator, deprecated_state = DEPRECATED_NORMAL; - if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE) + if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE + || decl == error_mark_node) return error_mark_node; type = TREE_TYPE (decl); - if (type == error_mark_node) - return error_mark_node; - context = DECL_CONTEXT (decl); if (context) |
