* GCC 3.0/Java and control flow analysis?
@ 2001-08-09 6:44 Kai Hofmann
2001-08-09 9:01 ` Alexandre Petit-Bianco
0 siblings, 1 reply; 4+ messages in thread
From: Kai Hofmann @ 2001-08-09 6:44 UTC (permalink / raw)
To: gcc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
Hello,
I am working on JShopz 3.0 (a Java based shop under GPL). Because I changed the
base architecture heavily I am searching for a java compiler that does a control
flow analysis and tells me about unused variables, method parameters etc. like
C/C++ did.
So my question is does support GCC 3.0 a control flow optimization for Java?
Please let me know - thanks in advance
Kai Hofmann
begin:vcard
n:Hofmann;Kai
tel;pager:+49 1681 1764681
tel;cell:+49 174 1419312
tel;fax:+49 421 22096-55
tel;home:+49 421 4844966
tel;work:+49 421 22096-83
x-mozilla-html:FALSE
url: http://www.isl.org/
org:Institut für Seeverkehrswirtschaft und Logistik (ISL);Telematik
adr:;;Universitätsallee GW1 Block A;Bremen;Bremen;28359;Deutschland
version:2.1
email;internet:hofmann@isl.org
title:Dipl.-Inform.
fn:Kai Hofmann
end:vcard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC 3.0/Java and control flow analysis?
2001-08-09 6:44 GCC 3.0/Java and control flow analysis? Kai Hofmann
@ 2001-08-09 9:01 ` Alexandre Petit-Bianco
2001-08-09 9:27 ` Alexandre Petit-Bianco
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Petit-Bianco @ 2001-08-09 9:01 UTC (permalink / raw)
To: egcs; +Cc: gcc
Kai Hofmann <hofmann@isl.org> writes:
> I am working on JShopz 3.0 (a Java based shop under GPL). Because I
> changed the base architecture heavily I am searching for a java
> compiler that does a control flow analysis and tells me about unused
> variables, method parameters etc. like C/C++ did.
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...
./A
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC 3.0/Java and control flow analysis?
2001-08-09 9:01 ` Alexandre Petit-Bianco
@ 2001-08-09 9:27 ` Alexandre Petit-Bianco
2001-08-12 22:45 ` Alexandre Petit-Bianco
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Petit-Bianco @ 2001-08-09 9:27 UTC (permalink / raw)
To: gcc
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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC 3.0/Java and control flow analysis?
2001-08-09 9:27 ` Alexandre Petit-Bianco
@ 2001-08-12 22:45 ` Alexandre Petit-Bianco
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Petit-Bianco @ 2001-08-12 22:45 UTC (permalink / raw)
To: gcc
Alexandre Petit-Bianco <apbianco@cygnus.com> writes:
> Like this should help, but it's not entirely tested:
Now it is. It'll go in along with this:
http://gcc.gnu.org/ml/java/2001-08/msg00057.html
./A
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-08-12 22:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09 6:44 GCC 3.0/Java and control flow analysis? Kai Hofmann
2001-08-09 9:01 ` Alexandre Petit-Bianco
2001-08-09 9:27 ` Alexandre Petit-Bianco
2001-08-12 22:45 ` Alexandre Petit-Bianco
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).