Skip to content

AIX 32bit build fails: 'error: size of unnamed array is negative' #111687

@ayappanec

Description

@ayappanec

Bug report

Bug description:

AIX 32bit build fails after #111641

./Modules/timemodule.c: In function 'check_ticks_per_second':
./Modules/timemodule.c:78:36: warning: comparison is always false due to limited range of data type [-Wtype-limits]
78 | if (tps >= 0 && (_PyTime_t)tps > _PyTime_MAX / SEC_TO_NS) {
| ^
In file included from ./Include/Python.h:42,
from ./Modules/timemodule.c:3:
./Modules/timemodule.c: In function 'time_clockid_converter':
./Include/pymacro.h:62:18: error: size of unnamed array is negative
62 | (sizeof(char [1 - 2*!(cond)]) - 1)
| ^
./Include/pymacro.h:65:15: note: in expansion of macro 'Py_BUILD_ASSERT_EXPR'
65 | (void)Py_BUILD_ASSERT_EXPR(cond);
| ^~~~~~~~~~~~~~~~~~~~
./Modules/timemodule.c:252:5: note: in expansion of macro 'Py_BUILD_ASSERT'
252 | Py_BUILD_ASSERT(sizeof(clk_id) == sizeof(*p));
| ^~~~~~~~~~~~~~~
gmake: *** [Makefile:3239: Modules/timemodule.o] Error 1
gmake: *** Waiting for unfinished jobs....

There are no problems with AIX 64bit build.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions