Integer promotion issue

bauss jj_1337 at live.dk
Thu Sep 9 08:22:39 UTC 2021


On Wednesday, 8 September 2021 at 12:19:11 UTC, HuskyNator wrote:
> On Sunday, 26 January 2020 at 23:16:40 UTC, Walter Bright wrote:
>> On 1/26/2020 5:01 AM, Guillaume Piolat wrote:
>>> Pretty sure a LOT of code would break if C++ or D would 
>>> abandon this rule
>>
>> Worst of all, the breakage would be silent.
>
> Could this be added as a compiler flag?
> This would probably fix a lot of annoyances, without causing 
> issues in older codebases.

A lot of tests would fail because they rely on the current 
implementation, which means a lot of tests would have to be 
changed.

You'll essentially have to do double tests where you have all 
tests without the flag and all tests with the flag.

The annoyance isn't that much if you just understand it in the 
first place.

Personally I've never had to deal with it more than maybe once or 
twice.


More information about the Digitalmars-d mailing list