aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-03-05 22:17:13 +0000
committerJason Merrill <jason@redhat.com>2019-03-05 22:17:13 +0000
commitf419ea3acb24e52a820e42690cdd9dc5790fce41 (patch)
tree96f919af96a1d63fd5318191f716d125ff4b1c04 /gcc/cp/cp-tree.h
parent5473ebdc280bd5e609dddaa8218143617a81b258 (diff)
* class.c (is_really_empty_class): Add ignore_vptr parm.
While looking at PR86485, I noticed that many uses of is_really_empty_class were overlooking that it returned true for a class with only a vptr; initialization of such a class is not trivial. Marek's P1064 patch fixed one place in constexpr.c to also check for a vtable, but there are several others that still don't. This patch requires callers to explicitly choose which behavior they want. Currently the uses in constexpr.c want to consider the vptr, and other uses don't. * class.c (is_really_empty_class): Add ignore_vptr parm. (trivial_default_constructor_is_constexpr): Pass it. * call.c (build_over_call): Pass it. * constexpr.c (cxx_eval_constant_expression): Pass it instead of checking TYPE_POLYMORPHIC_P. (cxx_eval_component_reference, potential_constant_expression_1): Pass it. * cp-gimplify.c (simple_empty_class_p): Pass it. * init.c (expand_aggr_init_1): Pass it. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@269402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 663a23b4043..15e39e1b545 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6267,7 +6267,7 @@ extern void finish_struct_1 (tree);
extern int resolves_to_fixed_type_p (tree, int *);
extern void init_class_processing (void);
extern int is_empty_class (tree);
-extern bool is_really_empty_class (tree);
+extern bool is_really_empty_class (tree, bool);
extern void pushclass (tree);
extern void popclass (void);
extern void push_nested_class (tree);