aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-01-30 08:49:58 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-01-30 08:49:58 +0100
commitfe509359cf5ff58edd84bb1f28323af6dc4dd4b4 (patch)
tree8b48e406dd9b023b4e99192f8c9d245457c2b4fe /gcc/c/c-tree.h
parent2ab6839bccb22a04c6df2000858c36d0ffa313ce (diff)
downloadgcc-fe509359cf5ff58edd84bb1f28323af6dc4dd4b4.zip
gcc-fe509359cf5ff58edd84bb1f28323af6dc4dd4b4.tar.gz
gcc-fe509359cf5ff58edd84bb1f28323af6dc4dd4b4.tar.bz2
re PR c/89061 (GCC 9 introduces false positive in -Wjump-misses-init)
PR c/89061 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define. * c-decl.c (decl_jump_unsafe): Return false for C_DECL_COMPOUND_LITERAL_P decls. (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P. * gcc.dg/pr89061.c: New test. From-SVN: r268381
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r--gcc/c/c-tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index 0070f0d..b69ef33 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -96,6 +96,10 @@ along with GCC; see the file COPYING3. If not see
#pragma omp threadprivate. */
#define C_DECL_THREADPRIVATE_P(DECL) DECL_LANG_FLAG_3 (VAR_DECL_CHECK (DECL))
+/* Set on VAR_DECLs for compound literals. */
+#define C_DECL_COMPOUND_LITERAL_P(DECL) \
+ DECL_LANG_FLAG_5 (VAR_DECL_CHECK (DECL))
+
/* Nonzero for a decl which either doesn't exist or isn't a prototype.
N.B. Could be simplified if all built-in decls had complete prototypes
(but this is presently difficult because some of them need FILE*). */