diff options
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 1f496b5..7b13633 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -2763,7 +2763,8 @@ non_const_var_error (tree r) inform (DECL_SOURCE_LOCATION (r), "%q#D is volatile", r); else if (!DECL_INITIAL (r) - || !TREE_CONSTANT (DECL_INITIAL (r))) + || !TREE_CONSTANT (DECL_INITIAL (r)) + || !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (r)) inform (DECL_SOURCE_LOCATION (r), "%qD was not initialized with a constant " "expression", r); |