diff options
| author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-10-28 14:57:30 +0000 |
|---|---|---|
| committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-10-28 07:57:30 -0700 |
| commit | 2d00b4f20784406dfb07a1260c0646ec3cdda75a (patch) | |
| tree | 2b9e21405b7812352bdee2a9f35ca85a99a701b0 /gcc/cp/decl.c | |
| parent | 1b9f940b0c10e9694dfc15c1822d44eb04dbce3c (diff) | |
| download | gcc-2d00b4f20784406dfb07a1260c0646ec3cdda75a.zip gcc-2d00b4f20784406dfb07a1260c0646ec3cdda75a.tar.gz gcc-2d00b4f20784406dfb07a1260c0646ec3cdda75a.tar.bz2 | |
re PR c++/23426 (Too large array problem gives two error message)
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-28 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/23426
* g++.dg/other/large-size-array.C: New test.
From-SVN: r105936
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) |
