summaryrefslogtreecommitdiffstats
path: root/gcc/cp
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-15 05:07:03 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-15 05:07:03 +0000
commitfc8794bd4bc309760717479665b140511402043e (patch)
treed9aca4b5e88cfec2be75e4b784a5e1bb5090fb6a /gcc/cp
parentb71608ed85b345b3e2974285d02c8bb9e64833f0 (diff)
downloadppe42-gcc-fc8794bd4bc309760717479665b140511402043e.tar.gz
ppe42-gcc-fc8794bd4bc309760717479665b140511402043e.zip
* class.c (build_vtbl_initializer): Fix typo in comment.
* typeck.c (expr_sizeof): Don't crash on errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/typeck.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c7f6eeedbaf..6589da1d997 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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).
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index ff6f34cf15d..b8d2a915024 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 08d6deea1ae..eca1c292515 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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
OpenPOWER on IntegriCloud