OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr17844-1.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* -fshort-enums should affect only the type with which an enum is
/* -fshort-enums should affect only the type with which an enum is
    compatible, not the type of the enumeration constants which should
    compatible, not the type of the enumeration constants which should
    still be int.  Bug 17844.  */
    still be int.  Bug 17844.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-fshort-enums" } */
/* { dg-options "-fshort-enums" } */
 
 
enum e { A, B };
enum e { A, B };
 
 
enum e ev;
enum e ev;
unsigned char uv;
unsigned char uv;
enum e *ep = &uv;
enum e *ep = &uv;
unsigned char *up = &ev;
unsigned char *up = &ev;
 
 
int i;
int i;
__typeof__(A) te;
__typeof__(A) te;
int *ip = &te;
int *ip = &te;
__typeof__(B) *tep = &i;
__typeof__(B) *tep = &i;
 
 
int x[((sizeof(A) == sizeof(int)) ? 1 : -1)];
int x[((sizeof(A) == sizeof(int)) ? 1 : -1)];
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.