Movement against float.init being nan

Nick Treleaven nick at geany.org
Sat Aug 27 15:04:09 UTC 2022


On Tuesday, 23 August 2022 at 00:46:31 UTC, Walter Bright wrote:
> I have no objection to a linter that flags default 
> initializations of floating point values. It shouldn't be part 
> of the D compiler, though.

We already have a back end error (only when optimization is 
enabled) that detects null-dereference (or anything < address 
4096):

	Object o;
	o.toHash; // Error: null dereference in function _Dmain

Perhaps we could have a similar error for use of a default 
initialized floating-point variable?


More information about the Digitalmars-d mailing list