...
Detection of integer literals that have a leading zero is trivial. However, determining whether the programmer intended to use an octal literal or a decimal literal is infeasible. Accordingly, sound automated detection is also infeasible. Heuristic checks may be useful.
Bibliography
Puzzle 4, "It's Elementary" | |
[JLS 2011] | |
[Seacord 2008] | |
[Unicode 2013] |
...