diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4ec1f4a..0fe74b2 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5830,7 +5830,8 @@ layout_var_decl (tree decl) && DECL_SIZE (decl) != NULL_TREE && ! TREE_CONSTANT (DECL_SIZE (decl))) { - if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST) + if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST + && !DECL_LOCAL_DECL_P (decl)) constant_expression_warning (DECL_SIZE (decl)); else { |