aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-01-18 04:52:50 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-01-18 04:52:50 +0000
commit97d953bb76cb7c3c8d2765c262eee2bd10faa0a1 (patch)
tree1b05d0df8c00c3ce8876b1fb27c59e89e582ed5f /gcc/cp
parent12530dbee37f016821a4ac9a6f5521b4d7b170bd (diff)
downloadgcc-97d953bb76cb7c3c8d2765c262eee2bd10faa0a1.zip
gcc-97d953bb76cb7c3c8d2765c262eee2bd10faa0a1.tar.gz
gcc-97d953bb76cb7c3c8d2765c262eee2bd10faa0a1.tar.bz2
class.c (fixed_type_or_null): Don't clear NONNULL.
* class.c (fixed_type_or_null): Don't clear NONNULL. Document calling convention. (resolves_to_fixed_type_p): Document calling convention. * rtti.c (build_x_typeid): Initialize NONNULL. From-SVN: r31481
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/class.c9
-rw-r--r--gcc/cp/rtti.c2
3 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8fe890e..b6be202 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2000-01-17 Mark Mitchell <mark@codesourcery.com>
+ * class.c (fixed_type_or_null): Don't clear NONNULL. Document
+ calling convention.
+ (resolves_to_fixed_type_p): Document calling convention.
+ * rtti.c (build_x_typeid): Initialize NONNULL.
+
* cp-tree.h (build_shared_int_cst): New function.
* call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
* class.c (modify_vtable_entry): Likewise.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5539176..7203a32 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5154,16 +5154,14 @@ finish_struct (t, attributes)
or not.
*NONNULL is set iff INSTANCE can be known to be nonnull, regardless
- of our knowledge of its type. */
+ of our knowledge of its type. *NONNULL should be initialized
+ before this function is called. */
static tree
fixed_type_or_null (instance, nonnull)
tree instance;
int *nonnull;
{
- if (nonnull)
- *nonnull = 0;
-
switch (TREE_CODE (instance))
{
case INDIRECT_REF:
@@ -5266,7 +5264,8 @@ fixed_type_or_null (instance, nonnull)
or not.
*NONNULL is set iff INSTANCE can be known to be nonnull, regardless
- of our knowledge of its type. */
+ of our knowledge of its type. *NONNULL should be initialized
+ before this function is called. */
int
resolves_to_fixed_type_p (instance, nonnull)
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index a90da0d..2aee67c 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -255,7 +255,7 @@ build_x_typeid (exp)
{
tree cond = NULL_TREE;
tree type;
- int nonnull;
+ int nonnull = 0;
if (! flag_rtti)
{