c99's restrict doesn't work in an abstract declarator: int regexec(int [restrict]); t7.c:1: error: static or type qualifiers in abstract declarator gcc version 3.4 20031207 (experimental) In http://gcc.gnu.org/ml/gcc/2004-02/msg00461.html Nathan claimed it was valid.
Confirmed, not a regression.
Comipler flags: -std=c99
It seems I did implement this C99 requirement when implementing this feature after all (without considering whether it might be a defect), with the error message shown rather than in the grammar. Suspending until DR289 appears in the DR logs with an indication of the intended resolution.
http://www.open-std.org/JTC1/SC22/WG14/www/docs/dr_289.htm This was decided that this was a defect at least as far as I can see.
Confirmed
Subject: Bug 14050 Author: jsm28 Date: Thu Nov 22 23:12:29 2007 New Revision: 130362 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130362 Log: PR c/14050 * c-decl.c (set_array_declarator_inner): Don't give error for static or type qualifiers in abstract declarator. Remove abstract_p parameter. * c-tree.h (set_array_declarator_inner): Update prototype. * c-parser.c (c_parser_direct_declarator_inner): Update call to set_array_declarator_inner. * doc/standards.texi: Update for C99 TC3. testsuite: * gcc.dg/c99-arraydecl-1.c: Don't expect errors for static or type qualifiers in abstract declarator. Modified: trunk/gcc/ChangeLog trunk/gcc/c-decl.c trunk/gcc/c-parser.c trunk/gcc/c-tree.h trunk/gcc/doc/standards.texi trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/c99-arraydecl-1.c
Fixed.