bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros#3140
bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros#3140pitrou merged 3 commits intopython:masterfrom
Conversation
Apparently MSVC is too stupid to understand that the alternate branch is not taken and emits a warning for it. Warnings added in python#2383
|
Instead of adding obscure pragmas, wouldn't be it more readable to add the necessary casts? |
How can I cast to ignore the warning? The problem, to my understanding, is that MSVC thinks that the other branch of the |
|
Simply cast the relevant parameters to |
|
@pitrou Done. Used |
|
I was just writing about that solution when I saw the commits being pushed :) I think this is much saner, possibly use Thank you for looking into this! |
|
|
|
there's another macro for 32bit which doesn't contain the ternary operator as there's no 64bit operations required there. |
I think the There is another similar |
|
seems I remembered it wrong. You're entirely correct. |
…#3140) * bpo-9566: Silence warnings from pyatomic.h macros Apparently MSVC is too stupid to understand that the alternate branch is not taken and emits a warning for it. Warnings added in python#2383 * bpo-9566: A better fix for the pyatomic.h warning * bpo-9566: Remove a slash
Apparently MSVC is too stupid to understand that the alternate branch is not taken and emits a warning for it:
Warnings added in #2383.
cc @Paxxi @pitrou
https://bugs.python.org/issue9566