[Issue 22549] importC: float literal should support leading zero

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 27 13:14:02 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22549

bachmeil at yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bachmeil at yahoo.com

--- Comment #1 from bachmeil at yahoo.com ---
This is not just an ImportC bug. DMD does the same with D code. According to
run.dlang.io, this code

void main() {
    double x = 08.4;
}

results in

Up to      2.064  : Failure with output: onlineapp.d(3): Error: semicolon
expected, not '8.4'
2.065.0 to 2.081.2: Success and no output
           2.082.1: Failure with output: onlineapp.d(3): Error: radix 8 digit
expected, not `8`
Since      2.083.1: Failure with output: onlineapp.d(3): Error: octal digit
expected, not `8`

Something changed in 2.082.1 and 2.083.1 to cause a double with leading zero to
be detected as octal.

--


More information about the Digitalmars-d-bugs mailing list