User account creation filtered due to spam.

Bug 43962 - gcj fails to compile with LANG=ja_JP.eucJP
Summary: gcj fails to compile with LANG=ja_JP.eucJP
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-02 12:10 UTC by Tsurutani Naoki
Modified: 2016-09-30 22:52 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
sample code (150 bytes, text/plain)
2010-06-25 13:54 UTC, Tsurutani Naoki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tsurutani Naoki 2010-05-02 12:10:46 UTC
gcj fails to compile with LANG=ja_JP.eucJP.
For example, building pdftk fails, with gcc 4.5.0(20100401).
The error occurs arround
	if (value.startsWith("\""))
Here is an output:
/usr/local/bin/gcj45 -L/usr/local/lib -O2 -w --encoding=UTF-8 --classpath="/usr/ports/print/pdftk/work/pdftk-1.41/java_libs" -c Anchor.java -o Anchor.o
/usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/markup/MarkupParser.java:186: error: String literal is not properly closed by a double-quote
        if (value.startsWith("�§)
                                ^^^
/usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/pdf/BaseFont.java:201: error: Invalid character constant
        public static final char CID_NEWLINE = 'Πff';
                                               ^^^^^^^^
/usr/ports/print/pdftk/work/pdftk-1.41/java_libs/com/lowagie/text/pdf/BaseFont.java:1106: error: Invalid character constant
        for (char c = 'ˆ´4b'; c <= 'ˆ´58'; ++c)

Escape charactor may not be treated correctly.

building with LANG=C does not generate this problem.
gcc 4.2.5 does not generate this problem.
Comment 1 Tsurutani Naoki 2010-06-25 13:54:49 UTC
Created attachment 21004 [details]
sample code

This is a test code to generate error.
gcc-4.2.5 20090325 generates no error.
gcc-4.5.1 20100617 generates error with LANG=ja_JP.eucJP, but no error with LANG=C.
Here are errors:
localetest.java:3: error: Syntax error on token "test", ; expected
        String str = "ÿÿtest";
                        ^^^^
localetest.java:3: error: Syntax error, insert ")" to complete MethodInvocation
        if (str.startsWith("ÿÿ"))
                           ^^^
localetest.java:3: error: Syntax error, insert ") Statement" to complete IfStatement
        if (str.startsWith("ÿÿ"))
                           ^^^
localetest.java:3: error: Syntax error, insert ")" to complete MethodInvocation
        System.out.println("start with ÿÿ");
                           ^^^^^^^^^^^^^^
localetest.java:3: error: Syntax error, insert ";" to complete Statement
        System.out.println("start with ÿÿ");
                           ^^^^^^^^^^^^^^
5 problems (5 errors)
Comment 2 Andrew Pinski 2016-09-30 22:52:16 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.