diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-23 02:28:23 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-23 02:28:23 +0000 |
commit | 71577f5a476a9acaf2017b61b12ccdb469fb9b00 (patch) | |
tree | a1cd507e21d45954e2308119870ea972899742bc /gcc/cp/class.c | |
parent | d068be109afeb89ca36ea5050f9b5ff775f42672 (diff) | |
download | gcc-71577f5a476a9acaf2017b61b12ccdb469fb9b00.tar.gz |
(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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b4fb8d26236..9a373c3c2c7 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; |