OSDN Git Service

PR c/39613
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Apr 2009 00:20:08 +0000 (00:20 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Apr 2009 00:20:08 +0000 (00:20 +0000)
commit482c1ea047598b36a0e4bc3c479722a67d157aef
treeb5b2a508e50ee656a2b499eeebe913843eff682f
parent29f517e3272a651202edd2cb55f6d7ceb3ccd2ab
PR c/39613
* c-typeck.c (do_case): If case label is not an INTEGER_CST, fold
it and pedwarn if this results in an INTEGER_CST.

testsuite:
* gcc.dg/case-const-1.c, gcc.dg/case-const-2.c,
gcc.dg/case-const-3.c: New tests.

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