aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constexpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r--gcc/cp/constexpr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index af6b39e..5dc59a4 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -4462,6 +4462,11 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict,
}
return false;
+ case TYPE_DECL:
+ case TAG_DEFN:
+ /* We can see these in statement-expressions. */
+ return true;
+
default:
if (objc_is_property_ref (t))
return false;