Recommendation: Compile DMD with More Warnings
asman
lol.themask at gmail.com
Mon Apr 7 06:48:50 PDT 2014
On Sunday, 6 April 2014 at 09:49:59 UTC, Nordlöw wrote:
> I recommend the lead developers of DMD to look into activating
> more warnings in the dmd/src/posix.mak.
>
> GCC 4.8.2 and especially Clang 3.4, both prepackage on Ubuntu
> 13.10/14.04 give a *lot* of warnings that seems to indicate
> potential bugs in the DMD source code.
>
> This setting gives useful warnings and at the same time avoid
> the annoying ones
>
> WARNINGS=-Wall -Wextra -Wno-deprecated -Wstrict-aliasing
> -Wno-unused-parameter -Wno-unused-variable -Wunused-function
> -Wno-unused-label -Wno-unknown-pragmas -Wno-sign-compare
> -Wno-overloaded-virtual -Wno-missing-braces
> -Wno-missing-field-initializers -Wno-logical-op-parentheses
>
> For example there a *lot* of -Wsometimes-uninitialized which
> IMHO seems like the most dangereous ones. This one is however
> Clang specific but I have not had any problems running a Clang
> compiled version of DMD. Further Clang compiles DMD about
> twices as fast as GCC. Good work developers on disabling use of
> STL in DMD!
>
> I can do a pull request if desired for the posix.make update if
> wanted.
Could be great too if someone run a static analyzer like on dmd
code http://www.cppcat.com I'll try when I back to Windows
More information about the Digitalmars-d
mailing list