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

Subversion Repositories openrisc

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

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
/* -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.