* gcc.dg/c99-array-nonobj-1.c: New test.

From-SVN: r35923
This commit is contained in:
Joseph Myers 2000-08-23 21:58:04 +01:00 committed by Joseph Myers
parent b97644fc89
commit bdb47d3ef8
2 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2000-08-23 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/c99-array-nonobj-1.c: New test.
2000-08-23 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/c99-printf-2.c, gcc.dg/format-xopen-1.c: Add some more

View File

@ -0,0 +1,27 @@
/* Test for arrays of incomplete and function types: a constraint violation
in C99 only, though undefined (DR#047) before.
*/
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
typedef void func (void);
struct s;
extern int a[][]; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "\[\]\[\] var" { xfail *-*-* } 11 } */
void f (int [][]); /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "\[\]\[\] arg" { xfail *-*-* } 14 } */
extern struct s b[]; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "struct \[\] var" { xfail *-*-* } 17 } */
void g (struct s []); /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "struct \[\] arg" { xfail *-*-* } 20 } */
extern func c[]; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "func \[\] var" { xfail *-*-* } 23 } */
void h (func []); /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "array" "func \[\] arg" { xfail *-*-* } 26 } */