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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [c99-arraydecl-2.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 298 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
}

powered by: WebSVN 2.1.0

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