[PATCH] D91851: [compiler-rt] [emutls] Add ifdefs around msvc specific pragmas
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 08:32:43 PST 2020
compnerd added inline comments.
Comment at: compiler-rt/lib/builtins/emutls.c:33
#pragma warning(disable : 4206)
> I also noticed that we have a similar case elsewhere already in the same file, which uses `#if defined(_MSC_VER) && !defined(__clang__)`.
Yeah, using `#if defined(_MSC_VER) && !defined(__clang__)` in place of !mingw.
Comment at: compiler-rt/lib/builtins/emutls.c:187
#pragma warning(disable : 4100)
> I looked up warning 4100, https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4100, which is "unreferenced formal parameter". So I would guess one could silence that also just with a couple `(void)p0; (void)p1; (void)p2;` in the function...
I actually like your idea of the cast better TBH. That is something that is not specific to MSVC but other compilers can trip over as well.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits