OSDN Git Service

* c-decl.c (build_enumerator): Allow values folding to integer
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Apr 2009 23:30:10 +0000 (23:30 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Apr 2009 23:30:10 +0000 (23:30 +0000)
commitbcb531e5df5240080c757a6b3b1f55d396215eda
tree35521b0d5e431f68faee7dbbfd427e26918ae543
parente807498288ab20ac58d32ac81072b70d09a0e1b1
* c-decl.c (build_enumerator): Allow values folding to integer
constants but not integer constant expressions with a pedwarn if
pedantic.

testsuite:
* gcc.dg/enum-const-1.c, gcc.dg/enum-const-2.c,
gcc.dg/enum-const-3.c: New tests.
* gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu99-const-expr-1.c: Use
-pedantic-errors.  Update expected diagnostics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146789 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/enum-const-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/enum-const-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/enum-const-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gnu89-const-expr-1.c
gcc/testsuite/gcc.dg/gnu99-const-expr-1.c