[Bug c/83222] [8 regression] Inconsistent "initializer element is not constant" error
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 30 23:43:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83222
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Nov 30 23:43:10 2017
New Revision: 255285
URL: https://gcc.gnu.org/viewcvs?rev=255285&root=gcc&view=rev
Log:
PR c/83222
* c-tree.h (decl_constant_value_1): Declare.
* c-typeck.c (decl_constant_value_1): New function.
(decl_constant_value): Use it.
* c-fold.c (c_fully_fold_internal): If in_init, use
decl_constant_value_1 instead of decl_constant_value.
* gcc.c-torture/compile/pr83222.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr83222.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-fold.c
trunk/gcc/c/c-tree.h
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list