diff options
Diffstat (limited to 'gcc/cp/semantics.c')
| -rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c0e68d1..ebc213d 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2663,7 +2663,8 @@ finish_id_expression (tree id_expression, expression. Enumerators and template parameters have already been handled above. */ if (integral_constant_expression_p - && !DECL_INTEGRAL_CONSTANT_VAR_P (decl)) + && ! DECL_INTEGRAL_CONSTANT_VAR_P (decl) + && ! builtin_valid_in_constant_expr_p (decl)) { if (!allow_non_integral_constant_expression_p) { |
