URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
149 |
jeremybenn |
/* Test for arrays of incomplete and function types: a constraint violation
|
2 |
|
|
in C99 only, though undefined (DR#047) before.
|
3 |
|
|
*/
|
4 |
|
|
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
|
5 |
|
|
/* { dg-do compile } */
|
6 |
|
|
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
|
7 |
|
|
|
8 |
|
|
typedef void func (void);
|
9 |
|
|
struct s;
|
10 |
|
|
|
11 |
|
|
extern int a[][]; /* { dg-bogus "warning" "warning in place of error" } */
|
12 |
|
|
/* { dg-error "array" "\[\]\[\] var" { target *-*-* } 11 } */
|
13 |
|
|
|
14 |
|
|
void f (int [][]); /* { dg-bogus "warning" "warning in place of error" } */
|
15 |
|
|
/* { dg-error "array" "\[\]\[\] arg" { target *-*-* } 14 } */
|
16 |
|
|
|
17 |
|
|
extern struct s b[]; /* { dg-bogus "warning" "warning in place of error" } */
|
18 |
|
|
/* { dg-error "array" "struct \[\] var" { target *-*-* } 17 } */
|
19 |
|
|
|
20 |
|
|
void g (struct s []); /* { dg-bogus "warning" "warning in place of error" } */
|
21 |
|
|
/* { dg-error "array" "struct \[\] arg" { target *-*-* } 20 } */
|
22 |
|
|
|
23 |
|
|
extern func c[]; /* { dg-bogus "warning" "warning in place of error" } */
|
24 |
|
|
/* { dg-error "array" "func \[\] var" { target *-*-* } 23 } */
|
25 |
|
|
|
26 |
|
|
void h (func []); /* { dg-bogus "warning" "warning in place of error" } */
|
27 |
|
|
/* { dg-error "array" "func \[\] arg" { target *-*-* } 26 } */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.