Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

_MIPS_SIM comparison may contain undefined identifiers for _ABI #132026

Closed
Labels
OS-unsupportedbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error
@sigv

Description

@sigv

Bug report

Bug description:

#include<Python.h>

When built on a MIPS architecture,_MIPS_SIM is used to determinearchitecture specifics. The value is expected to match either_ABIO32,_ABIN32 or_ABI64.

Ingccconfig/mips/mips.h these values are defined as compilerbuiltin_define inside of a switch/case. That means, mips64el and mips64 architectures know about_ABI64 but don't know about_ABIO32 and_ABIN32. In turn, when CPython tries to use them in comparison, they may be undefined identifiers.

In default compiler behavior, the undefined identifier will be evaluated as zero, and it will not match_MIPS_SIM. However, the issues pop up when-Wundef (or, even worse,-Werror=undef) compiler flag is enabled. Then suddenly it's visible as a warning or error:

In file included from /usr/include/python3.13/Python.h:14,                 from example.c:1:/usr/include/python3.13/pyconfig.h:59:20: error: "_ABIO32" is not defined, evaluates to 0 [-Werror=undef]   59 | #  if _MIPS_SIM == _ABIO32      |                    ^~~~~~~/usr/include/python3.13/pyconfig.h:61:22: error: "_ABIN32" is not defined, evaluates to 0 [-Werror=undef]   61 | #  elif _MIPS_SIM == _ABIN32      |                      ^~~~~~~

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp