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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vla-19.c] - Rev 826

Compare with Previous | Blame | View Log

/* Test diagnostics for variably modified function return types.  PR
   39564.  */
/* { dg-do compile } */
/* { dg-options "-std=c99" } */
 
int a;
 
void
f1 (void)
{
  typedef int T[a];
  extern T *g1 (void); /* { dg-error "non-nested function with variably modified type" } */
}
 
void
f2 (void)
{
  extern int (*g2 (void))[a]; /* { dg-error "non-nested function with variably modified type" } */
}
 
void
f3 (void)
{
  typedef int T[a];
  T *g3 (void); /* { dg-error "non-nested function with variably modified type" } */
}
 
void
f4 (void)
{
  int (*g4 (void))[a]; /* { dg-error "non-nested function with variably modified type" } */
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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