aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-31 08:10:57 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-31 08:10:57 +0100
commitfbdbe8b06a1c5626ad6360a4af33cb638c14cda1 (patch)
tree6f3b3270e66eb2e75172648e9848a118150d9d5e /gcc/cp/cp-tree.h
parente4c431266f9aaf604edfca68e852ae8efe966e8e (diff)
downloadgcc-fbdbe8b06a1c5626ad6360a4af33cb638c14cda1.zip
gcc-fbdbe8b06a1c5626ad6360a4af33cb638c14cda1.tar.gz
gcc-fbdbe8b06a1c5626ad6360a4af33cb638c14cda1.tar.bz2
re PR c++/90947 (Simple lookup table of array of strings is miscompiled)
PR c++/90947 * tree.h (type_initializer_zero_p): Remove. * tree.c (type_initializer_zero_p): Remove. cp/ * cp-tree.h (type_initializer_zero_p): Declare. * decl.c (reshape_init_array_1): Formatting fix. * tree.c (type_initializer_zero_p): New function. Moved from ../tree.c, use next_initializable_field, formatting fix. Return false for TYPE_NON_AGGREGATE_CLASS types. From-SVN: r277656
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 42e03a3..42d5111 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -7382,6 +7382,11 @@ extern tree cxx_copy_lang_qualifiers (const_tree, const_tree);
extern void cxx_print_statistics (void);
extern bool maybe_warn_zero_as_null_pointer_constant (tree, location_t);
+/* Analogous to initializer_zerop but also examines the type for
+ which the initializer is being used. Unlike initializer_zerop,
+ considers empty strings to be zero initializers for arrays and
+ non-zero for pointers. */
+extern bool type_initializer_zero_p (tree, tree);
/* in ptree.c */
extern void cxx_print_xnode (FILE *, tree, int);