Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pcc/dist/pcc/cc/ccom update to r1.377 from upst...
details: https://anonhg.NetBSD.org/src/rev/6b731cdf0455
branches: trunk
changeset: 331516:6b731cdf0455
user: plunky <plunky%NetBSD.org@localhost>
date: Wed Aug 13 13:37:20 2014 +0000
description:
update to r1.377 from upstream, commit message from ragge:
Allow for use of restrict in array declarations (as gcc does).
Fixes gnu regex compilation as reported by William D. Jones on
NetBSD current-users.
diffstat:
external/bsd/pcc/dist/pcc/cc/ccom/cgram.y | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diffs (57 lines):
diff -r d54a96f99695 -r 6b731cdf0455 external/bsd/pcc/dist/pcc/cc/ccom/cgram.y
--- a/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Wed Aug 13 13:18:08 2014 +0000
+++ b/external/bsd/pcc/dist/pcc/cc/ccom/cgram.y Wed Aug 13 13:37:20 2014 +0000
@@ -1,5 +1,5 @@
-/* Id: cgram.y,v 1.376 2014/07/02 15:31:41 ragge Exp */
-/* $NetBSD: cgram.y,v 1.1.1.7 2014/07/24 19:23:21 plunky Exp $ */
+/* Id: cgram.y,v 1.377 2014/07/25 09:30:39 ragge Exp */
+/* $NetBSD: cgram.y,v 1.2 2014/08/13 13:37:20 plunky Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge%ludd.luth.se@localhost).
@@ -355,7 +355,7 @@
tfree($3); /* XXX - handle */
$$ = biop(LB, $1, $4);
}
- | declarator '[' ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); }
+ | declarator '[' maybe_r ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); }
| declarator '[' '*' ']' { $$ = biop(LB, $1, bcon(NOOFFSET)); }
| declarator '(' parameter_type_list ')' {
$$ = bdty(CALL, $1, $3);
@@ -441,17 +441,17 @@
$$->n_left = $3;
}
| '(' abstract_declarator ')' { $$ = $2; }
- | '[' ']' attr_var {
+ | '[' maybe_r ']' attr_var {
$$ = block(LB, bdty(NAME, NULL), bcon(NOOFFSET),
- INT, 0, gcc_attr_wrapper($3));
+ INT, 0, gcc_attr_wrapper($4));
}
| '[' e ']' attr_var {
$$ = block(LB, bdty(NAME, NULL), $2,
INT, 0, gcc_attr_wrapper($4));
}
- | abstract_declarator '[' ']' attr_var {
+ | abstract_declarator '[' maybe_r ']' attr_var {
$$ = block(LB, $1, bcon(NOOFFSET),
- INT, 0, gcc_attr_wrapper($4));
+ INT, 0, gcc_attr_wrapper($5));
}
| abstract_declarator '[' e ']' attr_var {
$$ = block(LB, $1, $3, INT, 0, gcc_attr_wrapper($5));
@@ -472,8 +472,13 @@
}
;
-ib2: { }
+ib2: { }
;
+
+maybe_r: { }
+ | C_QUALIFIER { nfree($1); }
+ ;
+
/*
* K&R arg declaration, between ) and {
*/
Home |
Main Index |
Thread Index |
Old Index