Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Include/pymacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@
// - MSVC has warning(disable: 4201) "nonstandard extension used : nameless
// struct/union". This is specific enough that we disable it for all of
// Python.h.
// - GCC & clang needs __extension__ before C11
// - GCC & clang needs __extension__ before C11 or on C++.
// To allow unsupported platforms which need other spellings, we use a
// predefined value of _Py_ANONYMOUS if it exists.
#ifndef _Py_ANONYMOUS
# if (defined(__GNUC__) || defined(__clang__)) \
&& !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
&& (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L \
|| defined(__cplusplus))
# define _Py_ANONYMOUS __extension__
# else
# define _Py_ANONYMOUS
Expand Down
Loading