Commit 03da5286 by Jason Merrill Committed by Jason Merrill

re PR c++/4934 (Seg fault on legal code)

        PR c++/4934
        * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
        set before checking it.

From-SVN: r51972
parent f1526122
2002-04-06 Jason Merrill <jason@redhat.com>
PR c++/4934
* error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
set before checking it.
PR c++/525
* init.c (build_member_call): Use build_scoped_ref.
(resolve_offset_ref): Likewise.
......
......@@ -1729,7 +1729,7 @@ dump_expr (t, flags)
break;
case CONVERT_EXPR:
if (VOID_TYPE_P (TREE_TYPE (t)))
if (TREE_TYPE (t) && VOID_TYPE_P (TREE_TYPE (t)))
{
print_left_paren (scratch_buffer);
dump_type (TREE_TYPE (t), flags);
......
// PR c++/4934
// dump_expr didn't know how to deal with a CONVERT_EXPR with no type.
template<unsigned> struct A {};
template<typename T> struct B { A<sizeof(+int())> a; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment