aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-22 22:28:23 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-22 22:28:23 -0400
commitf714b8e580722542ba86e414e6aa0ee4b415709f (patch)
treea1cd507e21d45954e2308119870ea972899742bc /gcc
parent1743ca29c36c08b7cd482adbd1979e3da58a3082 (diff)
downloadgcc-f714b8e580722542ba86e414e6aa0ee4b415709f.zip
gcc-f714b8e580722542ba86e414e6aa0ee4b415709f.tar.gz
gcc-f714b8e580722542ba86e414e6aa0ee4b415709f.tar.bz2
(finish_struct): A data member with the same name as the class doesn't suppress constructors.
(finish_struct): A data member with the same name as the class doesn't suppress constructors. (dont_allow_type_definitions): New variable set when types cannot be defined. (finish_struct): Use it. (build_vfn_ref): Deleted signature specific code, we don't call this function anymore from build_signature_method_call. From-SVN: r10038
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/class.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b4fb8d2..9a373c3 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -91,6 +91,8 @@ int current_lang_stacksize;
tree lang_name_c, lang_name_cplusplus;
tree current_lang_name;
+char *dont_allow_type_definitions;
+
/* When layout out an aggregate type, the size of the
basetypes (virtual and non-virtual) is passed to layout_record
via this node. */
@@ -466,8 +468,6 @@ build_vfn_ref (ptr_to_instptr, instance, idx)
}
if (IS_AGGR_TYPE (TREE_TYPE (instance))
- && !IS_SIGNATURE_POINTER (TREE_TYPE (instance))
- && !IS_SIGNATURE_REFERENCE (TREE_TYPE (instance))
&& (TREE_CODE (instance) == RESULT_DECL
|| TREE_CODE (instance) == PARM_DECL
|| TREE_CODE (instance) == VAR_DECL))
@@ -2783,6 +2783,12 @@ finish_struct (t, list_of_fieldlists, warn_anon)
return t;
}
+ if (dont_allow_type_definitions)
+ {
+ pedwarn ("types cannot be defined %s",
+ dont_allow_type_definitions);
+ }
+
/* Append the fields we need for constructing signature tables. */
if (IS_SIGNATURE (t))
append_signature_fields (list_of_fieldlists);
@@ -3038,8 +3044,10 @@ finish_struct (t, list_of_fieldlists, warn_anon)
TREE_TYPE (x) = build_pointer_type (TREE_TYPE (x));
}
+#if 0
if (DECL_NAME (x) == constructor_name (t))
cant_have_default_ctor = cant_synth_copy_ctor = 1;
+#endif
if (TREE_TYPE (x) == error_mark_node)
continue;