Compile warning free #436
Comments
Unfortunately, most of these warning come from the CoreCLR headers, which as you note require MS extensions in order to compile without warnings. In order to get rid of these warnings, we'll have to fix the CoreCLR headers (or find some way--perhaps a pragma, if one exists--to enable MS extensions only for those headers). |
This has been an outstanding issue for a bit. @mmitche had to work around some of this along the way for xplat. It'd be nice if the long range plan was to fix this up but we're going to need to do this work mostly in CoreCLR. @jkotas, is long range plan to fix the Cor* headers so that they're cross platform warning free? |
@janvorli has done pass over the LLVM C++ warnings in CoreCLR, fixing the ones that looked important to fix, disabling rest as necessary. We do not have plans to do more. Feel free to submit PRs against CoreCLR if there are things you care about getting fixed. |
FWIW, it would also be nice if the cor* headers were usable without the declarations in the LLILC PAL. |
Actually, there are still some that I've left for the jitter team to clean up based on my discussion with @cmckinsey (#598) that are still pending. |
@jkotas There are some more left that I want to fix, I have just postponed it due to other more pressing issues. Here is an overview of all the remaining disabled warnings with some description added: -Wno-unused-private-fieldThere are private fields in classes that are not being used. There are two kinds of these. One are members that are really obsolete and not used anymore. The other is caused by -Wno-dangling-elseThere are conditions like if () {...} else command; These are mostly generated by the following macro: #define return if (0 && __ReturnOK::safe_to_return()) { } else return -Wno-implicit-exception-spec-mismatchFunction previously declared with an explicit exception specification redeclared with an implicit exception specification - all on operator delete -Wno-overloaded-virtualA derived class defines a virtual method with the same name as its base class, but different set of parameters. -Wno-unused-variableThere are locals that are not used. -Wno-switchEnum value is not handled in a switch (and there is no default clause). Remaining cases are in JIT only -Wno-microsoftExplicit constructor calls are not supported by clang ( -Wno-tautological-compareThis warning is caused by comparing -Wno-constant-logical-operandThere are constants of type -Wno-unknown-warning-optionSome of the warning disabling options exist only on clang 3.6 so clang 3.5 complained it doesn't know them. -Wno-invalid-offsetof__builtin_offsetof(type, field) is applied to a non-standard-layout type -Wno-delete-non-virtual-dtorClass with pure virtual methods has non-virtual destructor -Wno-incompatible-ms-structThe warning indicates that an attribute |
@janvorli is there an issue for this in CoreCLR we should link to? We'd want to do the work there. Another question: Did you expect to be able to fix these on the GitHub CoreCLR side? |
Ah, I got confused, I haven't realized this is not the CoreCLR but the llilc. The following ones are more difficult to fix: |
I've created issue https://github.com/dotnet/coreclr/issues/720 for that. |
Thanks everyone. |
#449 and dotnet/coreclr#721 addressed some of these warnings. The out-of-tree build of LLILC using Clang on Linux is now warning free. |
Lots of warnings right now.
Mostly due to us having started on MSVC, rather than Clang.
We need to clean this up and lock it in with the right switches (WX, Werror, etc).
The text was updated successfully, but these errors were encountered: