Movement against float.init being nan

Tejas notrealemail at gmail.com
Tue Aug 23 14:57:52 UTC 2022


On Tuesday, 23 August 2022 at 09:00:59 UTC, claptrap wrote:
> On Tuesday, 23 August 2022 at 00:50:21 UTC, Walter Bright wrote:
>> On 8/20/2022 3:17 PM, Dukc wrote:
>>> it goes against what C, C++ and C# (and probably many other 
>>> languages) do so one is easily surprised.
>>
>> C and C++ initialize them to garbage unless it is a 
>> global/static variable. That's probably the worst option, as 
>> it results in Heisenbugs that are very hard to track down.
>
> Dont most C/C++ compilers have warnings for initialised 
> variables? I'm sure MSVC did when I was using it, but its 15 
> years ago now.

Yeah, but there's also bugs in gcc, apparently

https://stackoverflow.com/questions/14132898/gcc-wuninitialized-wmaybe-uninitialized-issues


More information about the Digitalmars-d mailing list