Skip to content

BUG: 32 bit build does not work with -Werror #46360

Open
@jonashaag

Description

@jonashaag

Pandas version checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pandas.
  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

PANDAS_CI=1 python setup.py build_ext

Issue Description

pandas/_libs/hashtable.c: In function ‘__pyx_f_6pandas_5_libs_9hashtable_value_count_complex128’:
    pandas/_libs/hashtable.c:70107:33: error: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘int’} and ‘khuint_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
    70107 |   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_16; __pyx_t_3+=1) {
          |                                 ^

Issue seems to be that this range has a signed int counter that is compare to an unsigned int limit:

for i in range(table.size):

Metadata

Metadata

Assignees

No one assigned

    Labels

    32bit32-bit systemsBuildLibrary building on various platforms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions