Bug 6033 – Better error message with numbers with leading zeros

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-05-18T17:46:39Z
Last change time
2017-08-23T10:43:45Z
Keywords
bootcamp, diagnostic
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-05-18T17:46:39Z
Given that now there are no octal number literals in D2, I suggest to give a better error message in this case (09 is not an octal number anyway): void main() { auto array = [09]; } DMD 2.053 prints: test.d(2): comma expected separating array initializers, not 9 test.d(2): semicolon expected following auto declaration, not ']' test.d(2): found ']' instead of statement
Comment #1 by yebblies — 2013-01-16T18:13:12Z
*** Issue 8345 has been marked as a duplicate of this issue. ***
Comment #2 by razvan.nitu1305 — 2017-08-23T10:43:45Z
Running this code on ubuntu 16.04 64-bit with git HEAD results in successful compilation. The 09 is treated as integral 9. Closing as fixed.