This is the mail archive of the gcc@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]

Re: GCC 3.0/Java and control flow analysis?


Alexandre Petit-Bianco <apbianco@cygnus.com> writes:

> Gcj inherits from gcc all the infrastructure required to do that. It
> should even work with the current compiler, but it actually
> doesn't. I'm looking into this...

Like this should help, but it's not entirely tested:

  apbianco@venonat[~/tmp]: cat bar.java
  class bar {
      void foo () {
          int i;
          System.out.println ();
      }
  }
  apbianco@venonat[~/tmp]: gcj bar.java -Wunused -c
  bar.java: In class `bar':
  bar.java: In method `bar.foo()':
  bar.java:3: warning: unused variable `i'

./A

2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com

	* expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
	`poplevel' in the right order.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.114
diff -u -p -r1.114 expr.c
--- expr.c      2001/08/09 04:19:12     1.114
+++ expr.c      2001/08/09 16:24:36
@@ -2505,8 +2505,8 @@ java_lang_expand_expr (exp, target, tmod
            }
          expand_expr (body, const0_rtx, VOIDmode, 0);
          emit_queue ();
-         poplevel (1, 1, 0);
          expand_end_bindings (getdecls (), 1, 0);
+         poplevel (1, 1, 0);
          return const0_rtx;
        }
       return const0_rtx;


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