blob: 83093c9291a400bc2250a598aa46e4ac56383fae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* 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" } */
}
|