Commit Graph

281 Commits

Author SHA1 Message Date
Jeffrey A Law 818e50a59d c-parse.in (undeclared variable error): Tweak error message to be clearer.
* c-parse.in (undeclared variable error): Tweak error message to
        be clearer.

From-SVN: r18341
1998-03-01 09:46:44 -07:00
Richard Kenner ae9cb2081c (expr_no_commas): Do not store temporary skip_evaluation increments on yacc value stack...
(expr_no_commas): Do not store temporary skip_evaluation increments on
yacc value stack; the code was buggy and occasionally wrote past the
end of the stack.

From-SVN: r13720
1997-03-17 13:46:42 -05:00
Jason Merrill 72acf258c6 x
From-SVN: r13478
1997-01-07 21:58:22 +00:00
Richard Kenner 5f8f4a0743 (unary_expr, expr_no_commas): Increment skip_evaluation when analyzing an expression that is known not to be evaluated.
(unary_expr, expr_no_commas): Increment skip_evaluation when analyzing an
expression that is known not to be evaluated.
(sizeof, alignof): New rules.

From-SVN: r13231
1996-12-07 17:50:45 -05:00
Richard Kenner 084c4c25c1 Update number of shift/reduce conflicts.
({typed_declspecs,reserved_declspecs,declmods}_no_prefix_attr): New.
(current_declspecs): Initialize to NULL_TREE.
(fndef): Pass current_declspecs, not $1, to start_function.
(old_style_parm_decls): Renamed from xdecls.
(datadecl, declmods): Add references to new rules.
(setspecs): Call split_specs_attrs.
(absdcl1): Remove case with setattrs.

From-SVN: r12924
1996-10-09 07:35:27 -04:00
Richard Kenner c4c1f6d58b Update number of shift/reduce conflicts for objc.
From-SVN: r12023
1996-05-18 10:25:57 -04:00
Richard Kenner 957a1c3293 (typespec): Made <SomeProtocol> equivalent to (id <SomeProtocol>).
(non_empty_protocolrefs): New nonterminal.

From-SVN: r11858
1996-04-20 19:55:24 -04:00
Paul Eggert e64bb70660 (stmt): Warn about `goto *expr;' if pedantic.
(label): Warn about `case expr ... expr:' if pedantic.

From-SVN: r11160
1996-02-02 17:42:40 +00:00
Richard Kenner a0d074e106 (enumlist): Propagate error_mark_node.
From-SVN: r10396
1995-09-22 19:08:27 -04:00
Richard Kenner 28a19afce3 (ends_in_label): New %union member.
(stmts, stmt_or_label): Use new member to avoid lexical lookahead hack.
(lineno_stmt_or_labels): New rule.
(lineno_stmt_or_label, stmt_or_label): Yield nonzero if it ends in a label.

From-SVN: r10302
1995-08-31 18:38:14 -04:00
Richard Kenner 940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner 9fe9dd86e6 Revert most of last change.
From-SVN: r9946
1995-06-14 13:23:47 -04:00
Richard Kenner 866890d94a (fndef, nested_function, notype_nested_function): Support attributes
after function definition.

From-SVN: r9942
1995-06-14 08:06:01 -04:00
Richard Kenner d27543a720 Objc shift/reduce conflicts now 48.
(parm): Use setspecs/restore here.
(parmlist_or_identifiers): Not here.

From-SVN: r9776
1995-05-23 07:22:29 -04:00
Richard Kenner 962a2496a0 (datadef, fndef, ivar_decl, mydecls): Restore declspec_stack since setspecs is used.
(datadef, fndef, ivar_decl, mydecls): Restore declspec_stack since
setspecs is used.
(parmlist_or_identifiers): Use setspecs before parsing parms and
restore after parsing parms.

From-SVN: r9760
1995-05-21 08:39:16 -04:00
Richard Kenner ddd5a7c180 Fix typos in comments.
From-SVN: r9711
1995-05-16 08:14:26 -04:00
Richard Kenner f6999fed2e (myparm): Handle attributes.
From-SVN: r9657
1995-05-12 15:53:36 -04:00
Richard Kenner ee2897efdb Adjust number of shift/reduce conflicts.
(parm): Support attributes.

From-SVN: r9638
1995-05-12 07:08:56 -04:00
Richard Kenner 67b0763ea8 (nested_function, notype_nested_function): Allow old-style arg
definitions (use xdecls).

From-SVN: r9628
1995-05-11 19:27:13 -04:00
Richard Kenner 41ddaaa4d5 Update number of shift/reduce conflicts.
(structsp): Pass attribute arg to finish_struct.
Support attributes on enums and pass to finish_enum.

From-SVN: r9487
1995-04-26 17:24:51 -04:00
Richard Kenner f365e8f673 (attrib): Permit null-length argument list to attributes.
From-SVN: r9458
1995-04-25 18:57:39 -04:00
Richard Kenner 99ac47b5d2 (initdcl, notype_initdcl): Pass attributes to start_decl; delete call
to decl_attributes.

From-SVN: r9442
1995-04-25 16:06:00 -04:00
Doug Evans 6353cbd59d (update expected conflict count)
From-SVN: r9377
1995-04-13 23:57:25 +00:00
Richard Kenner af6f30c465 (structsp): Correct error in last change.
From-SVN: r9270
1995-03-31 07:26:06 -05:00
Richard Kenner 5d7a33dca4 Now have 27 shift/reduce conflicts.
(attribute_list): Just make chain of all attributes.
(attrib): Consistently put name as PURPOSE, args, if any, as VALUE.
(structsp): Allow attributes on any struct or union.

From-SVN: r9260
1995-03-30 08:58:33 -05:00
Richard Kenner d10b562e27 (initdcl): Only call decl_attributes once.
From-SVN: r9240
1995-03-29 06:47:07 -05:00
Richard Kenner ee7d912e9b (fndef, nested_function): Pass prefix_attributes to start_function.
(setspecs): Save prefix_attributes in declspec_stack.
(decl rules): Restore prefix_attributes along with current_declspecs.
(setattrs): Concatenate prefix_attributes to previous value.

From-SVN: r9151
1995-03-09 21:33:33 -05:00
Richard Kenner eadaebabd3 Fix typo in last change.
From-SVN: r9111
1995-03-02 18:13:29 -05:00
Richard Kenner fa4f1d3636 Update shift/reduce conflict documentation.
From-SVN: r9109
1995-03-02 15:51:00 -05:00
Richard Kenner 347248143d New rules to allow attributes in a prefix position.
From-SVN: r8995
1995-02-21 17:58:19 -05:00
Richard Kenner 5ed7f7b137 (ALIGN): Remove unused token.
From-SVN: r8924
1995-02-13 08:45:33 -05:00
Richard Kenner e72260ea6f (unary_expr): If -pedantic, give error for &&.
From-SVN: r8748
1995-01-13 20:15:11 -05:00
Jason Merrill 2c5f4139a9 __attribute__ ((constructor))
From-SVN: r8747
1995-01-14 01:09:01 +00:00
Richard Kenner aff2a12b70 (parmlist_2): Give error for function with only ELLIPSIS as an
argument.

From-SVN: r7969
1994-08-24 17:45:11 -04:00
Richard Kenner 218d0f8a84 (stmt): Don't give more than one error message if a nested `if' has an
empty body.

From-SVN: r7722
1994-07-11 18:17:57 -04:00
Richard Kenner a78bdb8ef8 (initelt): The equal sign is optional when positioning to a single
element of an array.

From-SVN: r7637
1994-07-01 19:09:49 -04:00
Richard Kenner 9d4e73d622 (init...
(init, compstmt, stmt, all_iter_stmt_with_decl): If the lookahead
token is a constant and we need to pop the momentary obstack, don't
free it.

From-SVN: r7382
1994-05-28 22:44:55 -04:00
Richard Stallman adc3b521ec (enumlist): Add error alternative.
From-SVN: r7316
1994-05-16 22:38:23 +00:00
Richard Kenner 660b43c865 Rewrite attribute parsing; update the expected conflicts and state
numbers.

From-SVN: r7252
1994-05-06 18:28:47 -04:00
Richard Stallman 309c23f7dd (attrib): Handle string args as expressions,
merging the two rules.  `mode' attribute now takes a string arg.
Delete the rule for an identifier as arg.

From-SVN: r6913
1994-03-28 01:27:48 +00:00
Doug Evans 423b04b06f Back out this patch:
(attrib): Use `identifier' instead of `IDENTIFIER' since names that
are (e.g.) typedef names are still OK.

From-SVN: r6912
1994-03-27 19:42:26 +00:00
Richard Kenner c386df78f6 (primary): Remove decl of unused variable CONTEXT.
From-SVN: r6873
1994-03-25 13:56:40 -05:00
Richard Kenner d8a6c3ebeb (attrib): Use `identifier' instead of `IDENTIFIER' since names that
are (e.g.) typedef names are still OK.

From-SVN: r6828
1994-03-19 18:02:29 -05:00
Doug Evans 7ffa4f13f0 (attrib): Handle attribute ((section ("string"))).
From-SVN: r6581
1994-02-17 22:48:19 +00:00
Richard Kenner 06c6bfb17b (maybe_attribute): Allow multiple __attribute__ clauses on a
declaration.

From-SVN: r6389
1994-01-13 06:14:08 -05:00
Richard Kenner ba09c753fb (attrib): Allow expressions instead of constants.
From-SVN: r6299
1993-12-24 07:37:56 -05:00
Richard Stallman 5bb92565c0 Don't fail to set $$.
From-SVN: r6144
1993-11-23 21:54:55 +00:00
Richard Kenner e1eb754f60 (init): Remove extraneous pop_momentary in error case.
From-SVN: r5926
1993-10-28 21:30:29 -04:00
Richard Stallman aa2e6789a8 (initdcl, notype_initdcl): Call decl_attributes
before init as well as after.

From-SVN: r5779
1993-10-13 20:40:41 +00:00
Richard Stallman bf0add700f (stmt): Don't call default_conversion on top-level expressions.
From-SVN: r5725
1993-10-11 03:04:47 +00:00
Richard Stallman 6126f4db33 (initdcl, notype_initdcl, init): Undo previous change.
(init): Use pop_momentary_nofree if the initializer has real data.

From-SVN: r5702
1993-10-10 05:20:15 +00:00
Richard Stallman ea8daa3ba3 (initdcl, notype_initdcl): Call push_momentary and pop_momentary here.
(init): Not here.

From-SVN: r5679
1993-10-08 12:20:44 +00:00
Richard Stallman d8e29a65dd (attrib): Support attribute `volatile' with alias `noreturn', and `const'.
(stmt): In an expr stmt, call default_conversion for arrays/functions.

From-SVN: r5083
1993-08-06 01:09:27 +00:00
Jim Wilson 7f3d4b2f75 (simple_if, if_prefix, stmt): Undo Jul 7 change.
(if_prefix): Store stmt_count in $$ not $1.
(stmt): Add comment explaining why empty-if warning is here.

From-SVN: r5029
1993-07-28 11:06:21 -07:00
Richard Stallman 42e651a63c (cast_expr): Use new initializer parsing functions.
(initdcl, notype_initdcl): Likewise.
(init): Likewise.
(initlist_maybe_comma, initlist1): These replace initlist.
(initelt): New nonterminal.
Change specified index syntax to `[INDEX]='.
Change specified field syntax to `.NAME='.

From-SVN: r4977
1993-07-23 19:19:04 +00:00
Jim Wilson f5a1436b01 (simple_if): Save stmt_count, and print empty body warning here.
(simple_if): Save stmt_count, and print empty body
warning here.
(if_prefix): Don't save stmt_count here.
(stmt): Don't print empty body warning here.

From-SVN: r4880
1993-07-07 15:59:22 -07:00
Richard Stallman 982a975ec6 (primary): In statement expression case,
if compstmt returns something other than a BLOCK,
return it unchanged.

From-SVN: r4838
1993-07-04 06:56:42 +00:00
Paul Eggert 2ac3624bab (label): Use `convert_and_check' when checking for
overflow in case labels.

From-SVN: r4824
1993-07-02 01:20:01 +00:00
Richard Stallman 4d06f1a218 (all_iter_stmt_simple): Add missing `else'.
From-SVN: r4736
1993-06-26 00:14:16 +00:00
Richard Stallman 074daeb15d For Objc, expect just 20 conflicts.
From-SVN: r4365
1993-05-06 17:41:52 +00:00
Jim Wilson 66b2ba11a6 Delete cond.awk reference.
From-SVN: r4310
1993-05-03 16:25:49 -07:00
Richard Stallman 475e85347d (unary_expr): Delete the alternate REALPART and IMAGPART rules with explicit parens.
(unary_expr): Delete the alternate REALPART and IMAGPART
rules with explicit parens.  Make the simple REALPART and IMAGPART
rules contain cast_expr.

From-SVN: r4179
1993-04-18 03:37:03 +00:00
Richard Stallman c47783c0fc Improve error message for sym undeclared at top level.
From-SVN: r4154
1993-04-14 17:47:31 +00:00
Tom Wood e31c7eec77 *** empty log message ***
From-SVN: r4068
1993-04-09 23:12:37 +00:00
Richard Stallman 6544cdba17 (expr_no_commas, from ASSIGN op):
Store ERROR_MARK as the original code.

From-SVN: r4019
1993-04-05 06:36:22 +00:00
Richard Stallman 12d073e7c8 (REALPART, IMAGPART): New token types.
(unary_expr): Handle REALPART, IMAGPART.

From-SVN: r3780
1993-03-18 21:32:24 +00:00
Michael Meissner b29e212cdd Add missing comma.
From-SVN: r3626
1993-03-04 15:32:55 +00:00
Richard Stallman b490c40dbc (stmt): Allow all_iter_stmt.
(expr -> statement expression): Push and pop iterator stack.
(stmt -> expr): Use iterator_expand.
(all_iter_stmt): New rule.

From-SVN: r3580
1993-03-02 02:10:22 +00:00
Richard Stallman ea3cfc819a (ivar_decls): Give a pedwarn (instead of a warning) for excess semicolons.
From-SVN: r3545
1993-02-26 23:55:35 +00:00
Richard Stallman ca67f8689b (program): After extdefs, pop any unpopped binding lvls.
From-SVN: r3486
1993-02-18 23:44:20 +00:00
Richard Stallman 5303129fc9 (unary_expr): Warn about overflows in parser-built unary expressions.
From-SVN: r3403
1993-02-02 04:39:14 +00:00
Jim Wilson 867b0d7a02 (language_string): Define here for C and Obj-C.
From-SVN: r3329
1993-01-25 11:49:15 -08:00
Richard Stallman e19a77e63b (unary_expr => ANDAND identifier): Handle lookup_label returning 0.
From-SVN: r3325
1993-01-25 06:37:20 +00:00
Richard Stallman df24d0da45 Use new name objc-act.h.
From-SVN: r3316
1993-01-24 00:41:50 +00:00
Richard Stallman e8f1efb243 (component_declarator): Allow attribute after nameless field.
From-SVN: r3100
1993-01-05 09:10:17 +00:00
Jim Wilson b00e5f0d0f (label): Use expr_no_commas instead of expr for case labels.
From-SVN: r3059
1993-01-02 12:15:58 -08:00
Richard Stallman d54d8150fe (stmt, FOR case): Do call position_after_white_space
after recording the current lineno for the increment.

From-SVN: r3051
1993-01-02 04:27:50 +00:00
Richard Stallman ee759b212b (component_decl_list): Do pedwarn for missing semicolon after last field decl.
From-SVN: r2353
1992-10-07 19:42:30 +00:00
Richard Stallman a50cc0dd8e Expect 56 conflicts for objc.
From-SVN: r2299
1992-10-01 17:38:39 +00:00
Richard Stallman e4e13a012e Add mode spec for Emacs.
From-SVN: r2295
1992-10-01 09:05:18 +00:00
Richard Stallman 028299c6bf Initial revision
From-SVN: r2293
1992-10-01 09:01:10 +00:00