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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [array-quals-2.c] - Diff between revs 298 and 338

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

Rev 298 Rev 338
/* Test that pointers to arrays of differently qualified types aren't
/* Test that pointers to arrays of differently qualified types aren't
   permitted in conditional expressions, and that qualifiers aren't
   permitted in conditional expressions, and that qualifiers aren't
   lost in forming composite types.  */
   lost in forming composite types.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "" } */
typedef const char T[1];
typedef const char T[1];
typedef const char T2[1];
typedef const char T2[1];
typedef volatile char U[1];
typedef volatile char U[1];
T *p;
T *p;
T2 *p2;
T2 *p2;
U *q;
U *q;
void *f(void) { return 1 ? p : q; } /* { dg-warning "pointer type mismatch in conditional expression" } */
void *f(void) { return 1 ? p : q; } /* { dg-warning "pointer type mismatch in conditional expression" } */
T *g(void) { return 1 ? p : p2; }
T *g(void) { return 1 ? p : p2; }
 
 

powered by: WebSVN 2.1.0

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