diff options
author | Jason Merrill <jason@redhat.com> | 2016-04-14 12:23:06 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-04-14 12:23:06 -0400 |
commit | 9f285ccb77a109ba94788f71ac83d4d46299ea9f (patch) | |
tree | 0d922603fa3db1c9a198d7caeec6b41056443321 /gcc/cp/decl.c | |
parent | 52fbb073e9310d2e1f83a4124a24ec83db1b6fd1 (diff) | |
download | gcc-9f285ccb77a109ba94788f71ac83d4d46299ea9f.zip gcc-9f285ccb77a109ba94788f71ac83d4d46299ea9f.tar.gz gcc-9f285ccb77a109ba94788f71ac83d4d46299ea9f.tar.bz2 |
Revert empty class parameter passing ABI changes.
From-SVN: r234977
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 42e853f..65b5733 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4180,10 +4180,6 @@ cxx_init_decl_processing (void) nullptr_node = build_int_cst (nullptr_type_node, 0); } - empty_struct_type = make_node (RECORD_TYPE); - finish_builtin_struct (empty_struct_type, "__empty_struct", - NULL_TREE, NULL_TREE); - abort_fndecl = build_library_fn_ptr ("__cxa_pure_virtual", void_ftype, ECF_NORETURN | ECF_NOTHROW); @@ -14375,34 +14371,16 @@ store_parm_decls (tree current_function_parms) they end in the correct forward order. */ specparms = nreverse (specparms); - /* Don't warn about the ABI of a function local to this TU. */ - bool warned = !TREE_PUBLIC (current_function_decl); - bool saw_nonempty = false; for (parm = specparms; parm; parm = next) { next = DECL_CHAIN (parm); if (TREE_CODE (parm) == PARM_DECL) { - tree type = TREE_TYPE (parm); if (DECL_NAME (parm) == NULL_TREE - || !VOID_TYPE_P (type)) + || !VOID_TYPE_P (parm)) pushdecl (parm); else error ("parameter %qD declared void", parm); - /* If this isn't the last parameter, maybe warn about ABI change - in passing empty classes. */ - if (processing_template_decl) - continue; - if (TREE_ADDRESSABLE (type) - || !is_really_empty_class (type)) - saw_nonempty = true; - else if (!warned - && (saw_nonempty - || varargs_function_p (current_function_decl))) - { - mark_for_abi_warning (current_function_decl, type); - warned = true; - } } else { |