diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-11-24 09:56:27 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-11-24 09:56:27 +0000 |
commit | 3d7e9ba41e50b16c6d77392d3fd85a8f46c9f13e (patch) | |
tree | e29c6c7e6a06f5d5b8ade1047c3741700c311261 /gcc/cp | |
parent | f4f6bd8d3004f34f1cd7294f0810c98cb49bea7e (diff) | |
download | gcc-3d7e9ba41e50b16c6d77392d3fd85a8f46c9f13e.zip gcc-3d7e9ba41e50b16c6d77392d3fd85a8f46c9f13e.tar.gz gcc-3d7e9ba41e50b16c6d77392d3fd85a8f46c9f13e.tar.bz2 |
semantics.c (finish_id_expr): If type is error_mark, return error_mark.
cp:
* semantics.c (finish_id_expr): If type is error_mark, return
error_mark.
testsuite:
* g++.other/crash24.C: Adjust and remove XFAIL.
* g++.other/crash37.C: New test.
From-SVN: r37702
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec50f9e..b3a5dfd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-11-24 Nathan Sidwell <nathan@codesourcery.com> + + * semantics.c (finish_id_expr): If type is error_mark, return + error_mark. + 2000-11-23 Nathan Sidwell <nathan@codesourcery.com> * pt.c (lookup_template_class): Simplify loop exit constructs. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index b372fdd..8d22ce2 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1534,6 +1534,8 @@ finish_id_expr (expr) if (TREE_CODE (expr) == IDENTIFIER_NODE) expr = do_identifier (expr, 1, NULL_TREE); + if (TREE_TYPE (expr) == error_mark_node) + expr = error_mark_node; return expr; } |