[Issue 12789] Add -transition=nan to emit floating-point variables default-initialized to NaN

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 23 07:28:37 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12789

--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to bearophile_hugs from comment #2)
> I suggest something better: a compiler switch like "-fromc" that helps
> porting C/C++ code to D. Such flag warns against NaNs, about large
> fixed-size variables passed by value, and cases like this that have a
> different meaning in C and D:
> 
> int *x, y;
> 
> And related matters.

I think we added `-transition` specifically to allow fine-grained control of
these diagnostics. You can always add support to a build tool like DUB where
--fromC would pass in things like a hypothetical "-transition=carrays",
"-transition=cpointers", etc.

--


More information about the Digitalmars-d-bugs mailing list