aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-04-13 16:11:20 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-04-13 16:11:20 -0400
commit5655267ca161de13e553dbfc0b7e58962fbb2443 (patch)
treee3b6ab9a03bc4e6ddada960bd1a94788283c70ad /gcc/cp/decl.c
parent88b5d499b5bc3e18c87917aedb817c98b027f47a (diff)
downloadgcc-5655267ca161de13e553dbfc0b7e58962fbb2443.zip
gcc-5655267ca161de13e553dbfc0b7e58962fbb2443.tar.gz
gcc-5655267ca161de13e553dbfc0b7e58962fbb2443.tar.bz2
Pass empty class parameters like C.
* call.c (pass_as_empty_struct, empty_class_arg): New. (type_passed_as, build_x_va_arg): Use pass_as_empty_struct. (build_call_a): Use empty_class_arg. * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New. * decl.c (cxx_init_decl_processing): Create empty_struct_type. From-SVN: r234959
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 380bc79..5ca426b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4180,6 +4180,10 @@ 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);