Skip to content

Commit ef524c6

Browse files
committed
gh-160208: Mark PyObject inner struct as anonymous
Add __extension__ on the PyObject inner struct to fix the g++ warning: Include/object.h:131:16: error: ISO C++ prohibits anonymous structs [-Wpedantic] 131 | struct {
1 parent 9f3d506 commit ef524c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Include/object.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct _object {
128128
_Py_ANONYMOUS union {
129129
#if SIZEOF_VOID_P > 4
130130
int64_t ob_refcnt_full; /* This field is needed for efficient initialization with Clang on ARM */
131-
struct {
131+
_Py_ANONYMOUS struct {
132132
# if PY_BIG_ENDIAN
133133
uint16_t ob_flags;
134134
uint16_t ob_overflow;

0 commit comments

Comments
 (0)