java/6729: Compiler error causing break of java.lang.Character.isWhitespace
r.hautz@inn-salzach.de
r.hautz@inn-salzach.de
Sun May 19 21:26:00 GMT 2002
>Number: 6729
>Category: java
>Synopsis: Compiler error causing break of java.lang.Character.isWhitespace
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun May 19 21:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Roland Hautz
>Release: 3.2 20020516 (experimental)
>Organization:
>Environment:
System: Linux isabella 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i586 unknown
Architecture: i586
host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: i586-pc-linux-gnu
configured with: /home/roland/gcc/configure --enable-threads=posix --enable-languages=c,c++,java
>Description:
I tracked down the reason, why java.io.StreamTokenizer can't parse
numbers any longer. The testcase is narrowed from
java.lang.Character.isWhitespace, which is returning true on digits
because of this bug.
I consider this to be of high priority.
>How-To-Repeat:
# gcj -g --main=HelloWorld HelloWorld.java
# ./a.out
this should be false: true
public class HelloWorld {
static int attr = 0x9;
public static void main(String [] args) {
boolean res = ( ( 1 << attr ) & 0x1000 ) != 0 ;
System.out.println("this should be "+res+": "+isWhite());
}
public static boolean isWhite() {
return ( ( 1 << attr ) & 0x1000 ) != 0 ;
}
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list