This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix declaration after statement in java/parse.y (C99 vs. C90)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]