[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#512473: marked as done (gcj-4.3: Uses StringBuilder in 1.4 mode)



Your message dated Wed, 21 Jan 2009 11:00:11 +0100
with message-id <20090121100011.GA7714@wavehammer.waldi.eu.org>
and subject line Re: Bug#512473: gcj-4.3: Uses StringBuilder in 1.4 mode
has caused the Debian Bug report #512473,
regarding gcj-4.3: Uses StringBuilder in 1.4 mode
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
512473: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512473
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcj-4.3
Version: 4.3.2-2
Severity: normal

Consider the following class:
----
public class Testclass {
    public void testfunc() {
        int i = 5;
        new String("i is " + i);
    }
}
----

now compile with
----
gcj -fsource=1.4 -C Testclass.java
----

----
$ grep StringBuilder *
Binary file Testclass.class matches
----

As you may see, java.lang.StringBuilder is used in this classfile.
However, Java 2 Platform SE v1.4 has no such class.
(http://java.sun.com/j2se/1.4.2/docs/api/java/lang/package-summary.html)

A class compiled for 1.4 should use java.lang.StringBuffer instead.

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gcj-4.3 depends on:
ii  gcc-4.3                4.3.2-1.1         The GNU C compiler
ii  gcj-4.3-base           4.3.2-2           The GNU Compiler Collection (gcj b
ii  gij-4.3                4.3.2-2           The GNU Java bytecode interpreter
ii  java-common            0.30              Base of all Java packages
ii  libc6                  2.7-18            GNU C Library: Shared libraries
ii  libc6-dev              2.7-18            GNU C Library: Development Librari
ii  libecj-java            3.3.0+0728-9      Eclipse Java compiler (library)
ii  libgcc1                1:4.3.2-1.1       GCC support library
ii  libgcj-bc              4.3.2-2           Link time only library for use wit
ii  libgcj9-0              4.3.2-2           Java runtime library for use with
ii  libgcj9-dev            4.3.2-2           Java development headers for use w
ii  libgcj9-jar            4.3.2-2           Java runtime library for use with
ii  libgmp3c2              2:4.2.2+dfsg-3    Multiprecision arithmetic library
ii  libmpfr1ldbl           2.3.1.dfsg.1-2    multiple precision floating-point
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages gcj-4.3 recommends:
ii  fastjar                     2:0.95-4     Jar creation utility
ii  libecj-java-gcj             3.3.0+0728-9 Eclipse Java compiler (native libr

Versions of packages gcj-4.3 suggests:
pn  java-gcj-compat-dev           <none>     (no description available)
pn  libgcj9-dbg                   <none>     (no description available)

-- no debconf information




--- End Message ---
--- Begin Message ---
On Wed, Jan 21, 2009 at 02:42:27AM +0100, Adrian Lang wrote:
> now compile with
> ----
> gcj -fsource=1.4 -C Testclass.java
> ----

This sets the _source_ version level to 1.4. It does not mention to
generate 1.4-compatible byte code. This is done by -ftarget.

| $ gcj -C Testclass.java
| $ grep StringBuilder Testclass.class
| Binary file Testclass.class matches
| $ gcj -ftarget=1.4 -C Testclass.java
| $ grep StringBuilder Testclass.class
| $ grep StringBuffer Testclass.class
| Binary file Testclass.class matches

This is documented in the manpage, so no bug, closing.

Bastian

-- 
Women professionals do tend to over-compensate.
		-- Dr. Elizabeth Dehaver, "Where No Man Has Gone Before",
		   stardate 1312.9.


--- End Message ---

Reply to: