OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vla-19.c] - Blame information for rev 604

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Test diagnostics for variably modified function return types.  PR
2
   39564.  */
3
/* { dg-do compile } */
4
/* { dg-options "-std=c99" } */
5
 
6
int a;
7
 
8
void
9
f1 (void)
10
{
11
  typedef int T[a];
12
  extern T *g1 (void); /* { dg-error "non-nested function with variably modified type" } */
13
}
14
 
15
void
16
f2 (void)
17
{
18
  extern int (*g2 (void))[a]; /* { dg-error "non-nested function with variably modified type" } */
19
}
20
 
21
void
22
f3 (void)
23
{
24
  typedef int T[a];
25
  T *g3 (void); /* { dg-error "non-nested function with variably modified type" } */
26
}
27
 
28
void
29
f4 (void)
30
{
31
  int (*g4 (void))[a]; /* { dg-error "non-nested function with variably modified type" } */
32
}

powered by: WebSVN 2.1.0

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