-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[release/3.1] Fix build with clang 10 #28026
Conversation
Would it be better to fix most of these problems once and for all by disabling all warnings by default (for release branches)? |
I think so. I don't know if it would have helped with the first issue which is actually invalid code. I generally defer to https://flameeyes.blog/2009/02/25/future-proof-your-code-dont-use-werror/ which says:
|
@omajid Could you please amend this PR with a change to disable werror, and undo changes that will be no longer necessary after that? |
This fixes 3 different sets of build issues seen when compiling with Clang 10. - Clang 10 fails to compile slist.h because the code contained is actually invalid. The assignment operator being used doesn't exist. This is a backport of dotnet/runtime#33096 - Clang 10 has moved exception-handling mismatches in function declarations under the -fms-compatibility flag (instead of the -fms-extensions flag). Our declarations of atoll and other similar functions are missing the exception declaration `throw()`. This mismatch in exception declarations makes clang 10 unable to build this code. Fix it by defining THROW_DECL as `throw()` which is supported at least as far back as clang 3.3. This is a backport of dotnet/runtime#32837 - Clang 10 has enabled additional warnings. Lets turn of -Werror globally in this release branch by making the `-ignorewarnings` switch to `./build.sh` be the default.
b72c44b
to
ee39a13
Compare
@jkotas Done. Turns out only As for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This fixes 3 different sets of build issues that are seen when compiling with clang 10.
Clang 10 fails to compile slist.h because the code contained is actually invalid. The assignment operator being used doesn't exist.
This is a backport of SList::Init: add missing constructor runtime#33096
Clang 10 has moved exception-handling mismatches in function declarations under the -fms-compatibility flag (instead of the -fms-extensions flag). Our declarations of atoll and other similar functions are missing the exception declaration
throw()
. This mismatch in exception declarations makes clang 10 unable to build this code. Fix it by defining THROW_DECL asthrow()
which is supported at least as far back as clang 3.3.This is a backport of Fix re-declarations of builtin functions with clang 10 runtime#32837
Clang 10 has enabled additional warnings. Lets turn of -Werror globally in this release branch by making the
-ignorewarnings
switch to./build.sh
be the default.