public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/10253: String concatenation with int zero, as in ""+0, results in the empty string.
@ 2003-03-28 9:16 lars
0 siblings, 0 replies; 3+ messages in thread
From: lars @ 2003-03-28 9:16 UTC (permalink / raw)
To: gcc-gnats
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
>Number: 10253
>Category: java
>Synopsis: String concatenation with int zero, as in ""+0, results in the empty string.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Mar 28 09:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Lars Andersen
>Release: gcc version 3.3 20030324 (prerelease)
>Organization:
>Environment:
Redhat Linux 8.0.96 x86, Athlon XP
>Description:
Concatenation of String and int 0 is wrong.
Consider this program :
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public class Test
{
public static void main(String[] args)
{
System.out.println("Test");
System.out.println(""+0);
System.out.println(""+1);
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I would expect the output to be :
Test
0
1
, but this is what i get :
Test
1
>How-To-Repeat:
Compile Test.java
> gcj --main=Test Test.java -o test
Run test
> ./test
It outputs :
Test
1
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/10253: String concatenation with int zero, as in ""+0, results in the empty string.
@ 2003-04-10 23:53 ericb
0 siblings, 0 replies; 3+ messages in thread
From: ericb @ 2003-04-10 23:53 UTC (permalink / raw)
To: ericb, gcc-bugs, gcc-prs, java-prs, lars
Synopsis: String concatenation with int zero, as in ""+0, results in the empty string.
State-Changed-From-To: analyzed->closed
State-Changed-By: ericb
State-Changed-When: Thu Apr 10 23:53:05 2003
State-Changed-Why:
Patch committed.
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10253
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: java/10253: String concatenation with int zero, as in ""+0, results in the empty string.
@ 2003-04-10 18:06 ericb
0 siblings, 0 replies; 3+ messages in thread
From: ericb @ 2003-04-10 18:06 UTC (permalink / raw)
To: ericb, gcc-bugs, gcc-prs, java-prs, lars, nobody
Synopsis: String concatenation with int zero, as in ""+0, results in the empty string.
Responsible-Changed-From-To: unassigned->ericb
Responsible-Changed-By: ericb
Responsible-Changed-When: Thu Apr 10 18:06:10 2003
Responsible-Changed-Why:
I'm patching this. Jacks already tests for this condition.
State-Changed-From-To: open->analyzed
State-Changed-By: ericb
State-Changed-When: Thu Apr 10 18:06:10 2003
State-Changed-Why:
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00654.html
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10253
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-10 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-28 9:16 java/10253: String concatenation with int zero, as in ""+0, results in the empty string lars
2003-04-10 18:06 ericb
2003-04-10 23:53 ericb
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).