Bug 8345 – Odd error for using 08 literal

Status
RESOLVED
Resolution
DUPLICATE
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-03T17:38:00Z
Last change time
2015-06-09T05:15:22Z
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2012-07-03T17:38:08Z
void main() { auto n = 08; } results in this error: q.d(3): Error: semicolon expected following auto declaration, not '8' The code is indeed invalid, but the error seems a bit odd, since it doesn't indicate anything about the leading 0. It should probably say something about 08 being an illegal numeric literal.
Comment #1 by yebblies — 2013-01-16T18:13:11Z
*** This issue has been marked as a duplicate of issue 6033 ***