aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 886fbb8..bb5246a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -10253,6 +10253,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case DO_STMT:
case FOR_STMT:
case WHILE_STMT:
+ case DECL_EXPR:
if (flags & tf_error)
error ("expression %qE is not a constant-expression", t);
return false;