diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d22d49dd15a..d93e152ab9c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-03 Andrew Pinski + + PR c++/17797 + * typeck.c (build_reinterpret_cast): Return if the inner type + is error_mark_node. + 2004-10-01 Jan Hubicka * semantics.c (expand_body): Update call of tree_rest_of_compilation. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 85337735f07..8b9bdd3c523 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4711,6 +4711,9 @@ build_reinterpret_cast (tree type, tree expr) intype = TREE_TYPE (expr); + if (intype == error_mark_node) + return error_mark_node; + if (TREE_CODE (type) == REFERENCE_TYPE) { if (! real_lvalue_p (expr))