Comment by pseudohadamard
4 days ago
Pretty much any existing C compiler will also solve that problem by telling you that it's uninitialized.
4 days ago
Pretty much any existing C compiler will also solve that problem by telling you that it's uninitialized.
I tried:
using clang on my Mac mini, and:
and it compiled without complaint.
I always build with -Wall so I'm used to seeing the warning:
For the oldest compiler I have access to, VC++ 6.0 from 1998:
The trouble with warnings is every compiler has a different set of warnings. It balkanizes the language. Many D features are the result of cherry picking warnings from various compilers and making them standard features.
7 replies →
C compilers without arguments start in 'trust me and shut up mode'. Seems to be sensible to me, because the 'I don't care about correctness' typically coincides with writing throwaway code, while you surely have the time to add compiler arguments when you set up the build system for an actual project.
Or just have the language initialize it for you!
8 replies →