aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorZiemowit Laski <zlaski@apple.com>2002-07-02 21:59:34 +0000
committerStan Shebs <shebs@gcc.gnu.org>2002-07-02 21:59:34 +0000
commitc1c5187c9ee27bbf60a5c237ecbd3667b35bf544 (patch)
tree4490d49b0ca7ef976a719a92a9be675a3a160306 /gcc/c-parse.in
parentaa5661e6b41e781f2e7b6b3e3fc163174f0687a8 (diff)
downloadgcc-c1c5187c9ee27bbf60a5c237ecbd3667b35bf544.zip
gcc-c1c5187c9ee27bbf60a5c237ecbd3667b35bf544.tar.gz
gcc-c1c5187c9ee27bbf60a5c237ecbd3667b35bf544.tar.bz2
c-parse.in (designator): Enable designated initializers if ObjC.
2002-07-02 Ziemowit Laski <zlaski@apple.com> * c-parse.in (designator): Enable designated initializers if ObjC. (objcmessageexpr): Remove references to objc_receiver_context. * objc/objc-act.h (objc_receiver_context): Remove decl. * objc/objc-act.c (objc_receiver_context): Remove. (lookup_objc_ivar): Test objc_method_context instead of objc_receiver_context. 2002-07-02 Ziemowit Laski <zlaski@apple.com> * objc.dg/desig-init-1.m: New test. From-SVN: r55192
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 2a58668..6ce9a2e 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -29,7 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
written by AT&T, but I have never seen it. */
ifobjc
-%expect 31 /* shift/reduce conflicts, and 1 reduce/reduce conflict. */
+%expect 32 /* shift/reduce conflicts, and 1 reduce/reduce conflict. */
end ifobjc
ifc
%expect 10 /* shift/reduce conflicts, and no reduce/reduce conflicts. */
@@ -1566,17 +1566,12 @@ designator_list:
designator:
'.' identifier
{ set_init_label ($2); }
- /* These are for labeled elements. The syntax for an array element
- initializer conflicts with the syntax for an Objective-C message,
- so don't include these productions in the Objective-C grammar. */
-ifc
| '[' expr_no_commas ELLIPSIS expr_no_commas ']'
{ set_init_index ($2, $4);
if (pedantic)
pedwarn ("ISO C forbids specifying range of elements to initialize"); }
| '[' expr_no_commas ']'
{ set_init_index ($2, NULL_TREE); }
-end ifc
;
nested_function:
@@ -3223,14 +3218,8 @@ receiver:
;
objcmessageexpr:
- '['
- { objc_receiver_context = 1; }
- receiver
- { objc_receiver_context = 0; }
- messageargs ']'
- {
- $$ = build_tree_list ($3, $5);
- }
+ '[' receiver messageargs ']'
+ { $$ = build_tree_list ($2, $3); }
;
selectorarg: