-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
unknown, 1.1.4, 1.2.0
-
generic, sparc
-
generic, solaris_2.5.1, solaris_2.6
3.10.6 Escape Sequences for Characters and String Literals
where it talks about OctalEscape:
\ZeroToThree OctalDigit OctalDigit
javac gives a compilation error on "\477".
The string "\477" is questionable, but the grammar
explicitly allows for:
\OctalDigit OctalDigit
so the \47 fits this rule, and the following 7 is just another character
in the string.
There is nothing in the JLS that says that "\477" is an error, and the grammar
allows for it. This could alternately be considered a bug in
javac when it reports an error on "\477".
where it talks about OctalEscape:
\ZeroToThree OctalDigit OctalDigit
javac gives a compilation error on "\477".
The string "\477" is questionable, but the grammar
explicitly allows for:
\OctalDigit OctalDigit
so the \47 fits this rule, and the following 7 is just another character
in the string.
There is nothing in the JLS that says that "\477" is an error, and the grammar
allows for it. This could alternately be considered a bug in
javac when it reports an error on "\477".