mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-11 13:01:20 +08:00
re PR c/17844 (-fshort-enums: ISO/IEC 9899:1999 : wrong size of identifier in enumerator list)
PR c/17844 * gcc.dg/pr17844-1.c: New test. From-SVN: r88829
This commit is contained in:
parent
3d5c655fab
commit
fbc0150dbc
@ -1,3 +1,8 @@
|
||||
2004-10-09 Joseph S. Myers <jsm@polyomino.org.uk>
|
||||
|
||||
PR c/17844
|
||||
* gcc.dg/pr17844-1.c: New test.
|
||||
|
||||
2004-10-09 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/17906
|
||||
|
20
gcc/testsuite/gcc.dg/pr17844-1.c
Normal file
20
gcc/testsuite/gcc.dg/pr17844-1.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* -fshort-enums should affect only the type with which an enum is
|
||||
compatible, not the type of the enumeration constants which should
|
||||
still be int. Bug 17844. */
|
||||
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fshort-enums" } */
|
||||
|
||||
enum e { A, B };
|
||||
|
||||
enum e ev;
|
||||
unsigned char uv;
|
||||
enum e *ep = &uv;
|
||||
unsigned char *up = &ev;
|
||||
|
||||
int i;
|
||||
__typeof__(A) te;
|
||||
int *ip = &te;
|
||||
__typeof__(B) *tep = &i;
|
||||
|
||||
int x[((sizeof(A) == sizeof(int)) ? 1 : -1)];
|
Loading…
x
Reference in New Issue
Block a user