From 062c4bb37ac6f2af6753060d8f8db5230bc18b49 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 4 Feb 2009 00:59:21 +0000 Subject: re PR c/29129 ([DR#341] unnamed parameters using [*]) PR c/29129 * c-decl.c (grokdeclarator): Mark [*] arrays in field declarators as having variable size. Do not give an error for unnamed parameters with [*] declarators. Give a warning for type names with [*] declarators and mark them as variable size. * c-parser.c (c_parser_sizeof_expression): Do not give an error for sizeof applied to [*] type names. testsuite: * c90-arraydecl-1.c: Do not expect error for [*] in abstract declarator. * vla-6.c: Likewise. Expect warning not error for [*] lexically inside function prototype but not part of parameter declarator. * vla-11.c: New test. From-SVN: r143918 --- gcc/testsuite/gcc.dg/c90-arraydecl-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/testsuite/gcc.dg/c90-arraydecl-1.c') diff --git a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c index 97dc1ee..2b7eadb 100644 --- a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c @@ -10,7 +10,7 @@ void foo0 (int a, int b[*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ void foo1 (int, int [*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ -/* { dg-error "allowed" "\'\[*\]\' not allowed in other than a declaration" { target *-*-* } 12 } */ + /* Use of static and type qualifiers (not allowed with abstract declarators) is a C99 feature. */ -- cgit v1.1