Commit 79cda2d1 by Mark Mitchell Committed by Mark Mitchell

class.c (build_vtbl_initializer): Fix typo in comment.

	* class.c (build_vtbl_initializer): Fix typo in comment.
	* typeck.c (expr_sizeof): Don't crash on errors.

From-SVN: r37471
parent 5a7c1037
2000-11-14 Mark Mitchell <mark@codesourcery.com>
* class.c (build_vtbl_initializer): Fix typo in comment.
* typeck.c (expr_sizeof): Don't crash on errors.
2000-11-14 Jim Wilson <wilson@redhat.com> 2000-11-14 Jim Wilson <wilson@redhat.com>
* lang-specs.h: Add %2 after %(cc1_options). * lang-specs.h: Add %2 after %(cc1_options).
......
...@@ -7251,7 +7251,7 @@ build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo, non_fn_entries_p) ...@@ -7251,7 +7251,7 @@ build_vtbl_initializer (binfo, orig_binfo, t, rtti_binfo, non_fn_entries_p)
build_vcall_and_vbase_vtbl_entries (binfo, &vid); build_vcall_and_vbase_vtbl_entries (binfo, &vid);
/* Clean up. */ /* Clean up. */
VARRAY_FREE (vid.fns); VARRAY_FREE (vid.fns);
/* Clear BINFO_VTABLE_PAATH_MARKED; it's set by /* Clear BINFO_VTABLE_PATH_MARKED; it's set by
build_vbase_offset_vtbl_entries. */ build_vbase_offset_vtbl_entries. */
for (vbase = CLASSTYPE_VBASECLASSES (t); for (vbase = CLASSTYPE_VBASECLASSES (t);
vbase; vbase;
......
...@@ -1621,12 +1621,12 @@ expr_sizeof (e) ...@@ -1621,12 +1621,12 @@ expr_sizeof (e)
if (is_overloaded_fn (e)) if (is_overloaded_fn (e))
{ {
pedwarn ("ISO C++ forbids applying `sizeof' to an expression of function type"); pedwarn ("ISO C++ forbids applying `sizeof' to an expression of function type");
e = char_type_node; return c_sizeof (char_type_node);
} }
else if (type_unknown_p (e)) else if (type_unknown_p (e))
{ {
incomplete_type_error (e, TREE_TYPE (e)); incomplete_type_error (e, TREE_TYPE (e));
e = char_type_node; return c_sizeof (char_type_node);
} }
/* It's illegal to say `sizeof (X::i)' for `i' a non-static data /* It's illegal to say `sizeof (X::i)' for `i' a non-static data
member unless you're in a non-static member of X. So hand off to member unless you're in a non-static member of X. So hand off to
......
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