https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066
--- Comment #18 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Thu May 14 11:42:53 2015 New Revision: 223193 URL: https://gcc.gnu.org/viewcvs?rev=223193&root=gcc&view=rev Log: PR c/66066 PR c/66127 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal. (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and use it. If FOR_INT_CONST, require that all evaluated operands be INTEGER_CSTs. * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic rather than with 0. * gcc.dg/pr14649-1.c: Add -Wpedantic. * gcc.dg/pr19984.c: Likewise. * gcc.dg/pr66066-1.c: New test. * gcc.dg/pr66066-2.c: New test. * gcc.dg/pr66066-3.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr66066-1.c trunk/gcc/testsuite/gcc.dg/pr66066-2.c trunk/gcc/testsuite/gcc.dg/pr66066-3.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr14649-1.c trunk/gcc/testsuite/gcc.dg/pr19984.c