ImportC octal literals: difference between GCC and dmd
Steven Schveighoffer
schveiguy at gmail.com
Sun Nov 28 23:10:41 UTC 2021
On 11/28/21 5:10 PM, forkit wrote:
> It 'appears' that this commit (24th May 2021) caused this issue (see
> link below). Presumably, only those versions after this commit will be
> affected.
>
> https://github.com/dlang/dmd/commit/790b1268128f10878f9b782fea8f2e14da203759#diff-6204b7c3e9bc498b31aac8499c84b946d9d1f5a90858dd7522630a8a31cf5938
>
There are 2 related problems:
1. The D compiler does not accept decimals like `08.5` but the grammar does.
2. The ImportC compiler does not accept decimals like `08.5` but C11
allows it.
Problem 1 existed long before problem 2 (which was only recently added).
The code that checks for ImportC mode to print the error is kind of a
red herring -- if that wasn't there, it still would error out when it
reached the second check (which is still there).
-Steve
More information about the Digitalmars-d
mailing list