aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-10-30 15:51:23 -0400
committerJason Merrill <jason@gcc.gnu.org>2013-10-30 15:51:23 -0400
commitafbb631e67b011f5d68dabf3f42bfca846f27fc1 (patch)
tree966c81e45bdd23a66bd29a87d334ad73ae3ed845 /gcc
parentfc7f44e4c4be38a8c7832fff204cd0f4a61aad6b (diff)
downloadgcc-afbb631e67b011f5d68dabf3f42bfca846f27fc1.zip
gcc-afbb631e67b011f5d68dabf3f42bfca846f27fc1.tar.gz
gcc-afbb631e67b011f5d68dabf3f42bfca846f27fc1.tar.bz2
semantics.c (finish_compound_literal): Don't create a static variable inside cp_unevaluated_operand.
* semantics.c (finish_compound_literal): Don't create a static variable inside cp_unevaluated_operand. From-SVN: r204228
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/semantics.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f71c239..ba55d80 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2013-10-30 Jason Merrill <jason@redhat.com>
+ * semantics.c (finish_compound_literal): Don't create a static variable
+ inside cp_unevaluated_operand.
+
* init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
2013-10-30 Tobias Burnus <burnus@net-b.de>
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index e616196..bbdf81a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2516,6 +2516,7 @@ finish_compound_literal (tree type, tree compound_literal,
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
&& TREE_CODE (type) == ARRAY_TYPE
&& !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+ && !cp_unevaluated_operand
&& initializer_constant_valid_p (compound_literal, type))
{
tree decl = create_temporary_var (type);