URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
149 |
jeremybenn |
/* Test for C99 array declarators: expression must be an
|
2 |
|
|
assignment-expression. PR 11943. */
|
3 |
|
|
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
|
4 |
|
|
/* { dg-do compile } */
|
5 |
|
|
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
|
6 |
|
|
|
7 |
|
|
void
|
8 |
|
|
foo (void)
|
9 |
|
|
{
|
10 |
|
|
int a[2, 3]; /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
11 |
|
|
void b(int x[2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
12 |
|
|
void c(int [2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
13 |
|
|
void d(int *x[restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
14 |
|
|
void e(int *x[static restrict 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
15 |
|
|
void f(int *x[restrict static 2, 3]); /* { dg-error "parse|syntax|expected" "bad array declarator" } */
|
16 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.