diff options
author | Marek Polacek <polacek@redhat.com> | 2013-08-30 10:24:49 +0200 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2013-08-30 10:24:49 +0200 |
commit | 1a986fd51aa96fbd0d66f4d52739356374912563 (patch) | |
tree | f5310553e69c8a35180556d9af7e66bdecac7f92 /gcc/cp/init.c | |
parent | 61fb959b676db6ca9ef0da335dfef0d8ec08e113 (diff) | |
parent | f85c9de6ba5165bc1b941ceb09e4e8ffb1c7eb0f (diff) | |
download | gcc-ubsan.tar.gz |
Merge branch 'master' of git+ssh://gcc.gnu.org/git/gcc into ubsanubsan
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3ec32c580ac..156b4a1e082 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1464,7 +1464,8 @@ build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain) TREE_READONLY (exp) = 0; TREE_THIS_VOLATILE (exp) = 0; - if (init && TREE_CODE (init) != TREE_LIST + if (init && init != void_type_node + && TREE_CODE (init) != TREE_LIST && !(TREE_CODE (init) == TARGET_EXPR && TARGET_EXPR_DIRECT_INIT_P (init)) && !(BRACE_ENCLOSED_INITIALIZER_P (init) |