Skip to content

GH-125174: Don't use UINT32_MAX in header file - #127863

Merged
encukou merged 1 commit into
python:mainfrom
faster-cpython:no-uint32
Dec 13, 2024
Merged

encukou merged 1 commit into
python:mainfrom
faster-cpython:no-uint32

Conversation

@markshannon

@markshannon markshannon commented Dec 12, 2024 •

Copy link
Copy Markdown
Member

It breaks a buildbot. Maybe UINT32_MAX isn't defined in their C++ header files.

@markshannon

Copy link
Copy Markdown
Member Author

!buildbot "AMD64 FreeBSD 3.x"

@bedevere-bot

Copy link
Copy Markdown

The regex '"AMD64 FreeBSD 3.x"' did not match any buildbot builder. Is the requested builder in the list of stable builders?

@markshannon

Copy link
Copy Markdown
Member Author

!buildbot "AMD64.FreeBSD.3.x"

@bedevere-bot

Copy link
Copy Markdown

The regex '"AMD64.FreeBSD.3.x"' did not match any buildbot builder. Is the requested builder in the list of stable builders?

@markshannon

Copy link
Copy Markdown
Member Author

!buildbot AMD64.FreeBSD

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 957cf8a 🤖

The command will test the builders whose names match following regular expression: AMD64.FreeBSD

The builders matched are:

  • AMD64 FreeBSD PR
  • AMD64 FreeBSD Refleaks PR
  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD15 PR
@colesbury

Copy link
Copy Markdown
Contributor

In case you were wondering why it's missing, like I was:

The C99 standard suggests that C++ implementations should not define the above limit, constant, or format macros unless the macros __STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS or __STDC_FORMAT_MACROS (respectively) are defined before including the relevant C header (stdint.h or inttypes.h). This recommendation was not adopted by any C++ standard and was removed in C11. However, some implementations (such as glibc 2.17) try to apply this rule, and it may be necessary to define the __STDC macros; C++ compilers may try to work around this by automatically defining them in some circumstances

https://en.cppreference.com/w/cpp/types/integer

@markshannon
markshannon requested a review from encukou December 12, 2024 15:56
@encukou
encukou merged commit 9b4bbf4 into python:main Dec 13, 2024
@encukou

encukou commented Dec 13, 2024

Copy link
Copy Markdown
Member

Thank you for the fix!

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
@markshannon
markshannon deleted the no-uint32 branch January 10, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants