-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_MIPS_SIM comparison may contain undefined identifiers for _ABI #132026
Labels
build
The build process and cross-build
OS-unsupported
type-bug
An unexpected behavior, bug, or error
Comments
sigv
added a commit
to sigv/cpython
that referenced
this issue
Apr 2, 2025
…mparison When built on a MIPS architecture, `_MIPS_SIM` is used to determine architecture specifics. The value is expected to match either `_ABIO32`, `_ABIN32` or `_ABI64`. In `gcc` config/mips/mips.h these values are defined as compiler `builtin_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.
sigv
added a commit
to sigv/cpython
that referenced
this issue
Apr 2, 2025
…mparison When built on a MIPS architecture, `_MIPS_SIM` is used to determine architecture specifics. The value is expected to match either `_ABIO32`, `_ABIN32` or `_ABI64`. In `gcc` config/mips/mips.h these values are defined as compiler `builtin_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.
sigv
added a commit
to sigv/cpython
that referenced
this issue
Apr 6, 2025
…mparison When built on a MIPS architecture, `_MIPS_SIM` is used to determine architecture specifics. The value is expected to match either `_ABIO32`, `_ABIN32` or `_ABI64`. In `gcc` config/mips/mips.h these values are defined as compiler `builtin_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.
sigv
added a commit
to sigv/cpython
that referenced
this issue
Apr 6, 2025
…mparison When built on a MIPS architecture, `_MIPS_SIM` is used to determine architecture specifics. The value is expected to match either `_ABIO32`, `_ABIN32` or `_ABI64`. In `gcc` config/mips/mips.h these values are defined as compiler `builtin_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.
This should be added to |
sigv
added a commit
to sigv/cpython
that referenced
this issue
Apr 6, 2025
…mparison When built on a MIPS architecture, `_MIPS_SIM` is used to determine architecture specifics. The value is expected to match either `_ABIO32`, `_ABIN32` or `_ABI64`. In `gcc` config/mips/mips.h these values are defined as compiler `builtin_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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
The build process and cross-build
OS-unsupported
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When built on a MIPS architecture,
_MIPS_SIM
is used to determine architecture specifics. The value is expected to match either_ABIO32
,_ABIN32
or_ABI64
.In
gcc
config/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:CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: