[Issue 8345] New: Odd error for using 08 literal

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 3 17:38:10 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8345

           Summary: Odd error for using 08 literal
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-07-03 17:38:08 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list