class.c (build_vtbl_initializer): Fix typo in comment.
authorMark Mitchell <mark@codesourcery.com>
Wed, 15 Nov 2000 05:07:03 +0000 (05:07 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 15 Nov 2000 05:07:03 +0000 (05:07 +0000)
* class.c (build_vtbl_initializer): Fix typo in comment.
* typeck.c (expr_sizeof): Don't crash on errors.

From-SVN: r37471

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/typeck.c

index c7f6eeedbaf0c322f6cc9ebb6ce462d6ac8aedb2..6589da1d997125a8d715796ec1bb1d6292d8a6a2 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        * lang-specs.h: Add %2 after %(cc1_options).
index ff6f34cf15d69a369b777da630b67dfd8fdda184..b8d2a915024f88f7d39ae59e811353bf9b118552 100644 (file)
@@ -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);
   /* Clean up.  */
   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.  */
   for (vbase = CLASSTYPE_VBASECLASSES (t); 
        vbase; 
index 08d6deea1aef71ab32b0f8efda7008581683bc5e..eca1c292515df977c9657a5a23e511cd576e1a59 100644 (file)
@@ -1621,12 +1621,12 @@ expr_sizeof (e)
   if (is_overloaded_fn (e))
     {
       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))
     {
       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
      member unless you're in a non-static member of X.  So hand off to