diff options
author | cem <cem@FreeBSD.org> | 2016-05-27 03:40:52 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-05-27 03:40:52 +0000 |
commit | 57d60af1d0789be06f0d720c34cdd2cdc15bf1ed (patch) | |
tree | b5a90f140a9f130f4c515243c8810aca11bfe586 /contrib | |
parent | 3cd2786313ad24cac74961fd4b2bef46aac8b9ec (diff) | |
download | FreeBSD-src-57d60af1d0789be06f0d720c34cdd2cdc15bf1ed.zip FreeBSD-src-57d60af1d0789be06f0d720c34cdd2cdc15bf1ed.tar.gz |
gcc42: Fix minor C99 parse bug
DR #289[0] came down and gcc4.2.1 was on the wrong side of history.
Partially revert GCC r42574 (just remove the error) to rectify the parse
bug to match Clang and other compliant C99 compilers.
An example declaration gcc tripped on before this fix:
void foobar(int [static 1]);
An example declaration gcc did not trip on before this fix:
void foobar(int name[static 1]);
Bump __FreeBSD_cc_version.
[0]: http://www.open-std.org/JTC1/SC22/WG14/www/docs/dr_289.htm
Reported by: allanjude
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/c-decl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index 0f23ee3..53f6ee0 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -3150,20 +3150,14 @@ build_array_declarator (tree expr, struct c_declspecs *quals, bool static_p, /* Set the contained declarator of an array declarator. DECL is the declarator, as constructed by build_array_declarator; INNER is what - appears on the left of the []. ABSTRACT_P is true if it is an - abstract declarator, false otherwise; this is used to reject static - and type qualifiers in abstract declarators, where they are not in - the C99 grammar (subject to possible change in DR#289). */ + appears on the left of the []. */ struct c_declarator * set_array_declarator_inner (struct c_declarator *decl, - struct c_declarator *inner, bool abstract_p) + struct c_declarator *inner, + bool abstract_p __attribute__ ((__unused__))) { decl->declarator = inner; - if (abstract_p && (decl->u.array.quals != TYPE_UNQUALIFIED - || decl->u.array.attrs != NULL_TREE - || decl->u.array.static_p)) - error ("static or type qualifiers in abstract declarator"); return decl; } |