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.
Comment #2 by dlang-bot — 2021-11-29T19:03:10Z
@dkorpel created dlang/dmd pull request #13371 "Fix issue 22549 - float literal should support leading zero" fixing this issue:
- Fix issue 22549 - float literal should support leading zero
https://github.com/dlang/dmd/pull/13371
dlang/dmd pull request #13371 "Fix issue 22549 - float literal should support leading zero" was merged into stable:
- 8a7b98b6228b3ac4d064d95f4a530130fb5824e6 by dkorpel:
Fix issue 22549 - float literal should support leading zero
https://github.com/dlang/dmd/pull/13371
Comment #6 by dlang-bot — 2021-12-14T10:34:31Z
dlang/dmd pull request #13421 "merge stable" was merged into master:
- 6931b4e621057e95198670d78e663e530850c789 by dkorpel:
Fix issue 22549 - float literal should support leading zero
https://github.com/dlang/dmd/pull/13421
Comment #7 by 8jst — 2022-03-18T16:57:24Z
*** Issue 22882 has been marked as a duplicate of this issue. ***