public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix declaration after statement in java/parse.y (C99 vs. C90)
@ 2004-07-26 21:47 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2004-07-26 21:47 UTC (permalink / raw)
  To: gcc-patches, java-patches

Committed as obvious.  Tested by observing that the file now compiles with
gcc-2.95, cross to mmix-knuth-mmixware, FWIW.  (Without configure options,
the java front-end is compiled for this target.)

	* parse.y (build_super_invocation): Adjust declaration order to
	avoid declaration after statement.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.495
diff -p -c -r1.495 parse.y
*** parse.y	24 Jul 2004 00:03:28 -0000	1.495
--- parse.y	26 Jul 2004 10:54:46 -0000
*************** build_super_invocation (tree mdecl)
*** 12317,12327 ****
    else
      {
        tree super_wfl = build_wfl_node (super_identifier_node);
        /* This is called after parsing is done, so the parser context
           won't be accurate. Set location info from current_class decl. */
        tree class_wfl = lookup_cl (TYPE_NAME (current_class));
        EXPR_WFL_LINECOL (super_wfl) = EXPR_WFL_LINECOL (class_wfl);
!       tree a = NULL_TREE, t;
        /* If we're dealing with an anonymous class, pass the arguments
           of the crafted constructor along. */
        if (ANONYMOUS_CLASS_P (DECL_CONTEXT (mdecl)))
--- 12317,12329 ----
    else
      {
        tree super_wfl = build_wfl_node (super_identifier_node);
+       tree a = NULL_TREE, t;
+
        /* This is called after parsing is done, so the parser context
           won't be accurate. Set location info from current_class decl. */
        tree class_wfl = lookup_cl (TYPE_NAME (current_class));
        EXPR_WFL_LINECOL (super_wfl) = EXPR_WFL_LINECOL (class_wfl);
!
        /* If we're dealing with an anonymous class, pass the arguments
           of the crafted constructor along. */
        if (ANONYMOUS_CLASS_P (DECL_CONTEXT (mdecl)))

brgds, H-P

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-26 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-26 21:47 Fix declaration after statement in java/parse.y (C99 vs. C90) Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).