Skip to content

Warning when building ./Modules/timemodule.c on i686 with 64-bit time #104040

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

Closed
TabLand opened this issue May 1, 2023 · 1 comment
Closed

Warning when building ./Modules/timemodule.c on i686 with 64-bit time #104040

TabLand opened this issue May 1, 2023 · 1 comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@TabLand
Copy link
Contributor

TabLand commented May 1, 2023

Building CPython generates the following warning:

gcc  -fno-strict-overflow -Wsign-compare -g -Og -Wall    -std=c11 -Wextra \
    -Wno-unused-parameter -Wno-missing-field-initializers                 \ 
    -Werror=implicit-function-declaration -fvisibility=hidden             \
    -I./Include/internal  -I. -I./Include                                 \
    -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64                                \
    -DPy_BUILD_CORE_BUILTIN                                               \
    -c ./Modules/timemodule.c -o Modules/timemodule.o
./Modules/timemodule.c: In function 'check_ticks_per_second':
./Modules/timemodule.c:73:36: warning: comparison is always false due to limited
 range of data type [-Wtype-limits]
   73 |     if (tps >= 0 && (_PyTime_t)tps > _PyTime_MAX / SEC_TO_NS) {
      |          

#Environment

  • CPython versions tested on:
    Python 3.12.0a6+
  • Operating system and architecture:
Linux lfs.ijtaba 6.1.11 #1 SMP PREEMPT_DYNAMIC Sun Apr 30 12:53:36 PKT 2023 i686 GNU/Linux

Not able to replicate on a 64 bit system without the following compiler options:
-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64

Found whilst analysing #101732

I appreciate that building 32-bit python using gcc on Linux is not currently a supported platform combination, I would still like to review the code behind this...
configure: WARNING: i686-pc-linux-gnu/gcc is not supported

Linked PRs

@TabLand TabLand added the type-bug An unexpected behavior, bug, or error label May 1, 2023
@arhadthedev arhadthedev added the build The build process and cross-build label May 1, 2023
@TabLand
Copy link
Contributor Author

TabLand commented Dec 3, 2023

No longer required

@TabLand TabLand closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2023
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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants