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

Compiler warning for_Py_InIntegralTypeRange #97786

Closed
Assignees
mdickinson
Labels
3.10only security fixes3.11only security fixes3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error
@brettcannon

Description

@brettcannon

Bug report

Python/pytime.c:297:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]    if (!_Py_InIntegralTypeRange(time_t, intpart)) {         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~Python/pytime.c:352:14: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]        if (!_Py_InIntegralTypeRange(time_t, intpart)) {             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~Python/pytime.c:518:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]    if (!_Py_InIntegralTypeRange(_PyTime_t, d)) {         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~3 warnings generated.

Your environment

  • CPythonmain (3.11.0rc2 time frame)
  • clang 10

Linked PRs

Metadata

Metadata

Assignees

Labels

3.10only security fixes3.11only security fixes3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp