Page MenuHomeFreeBSD

include/stdckdint.h: make the header compatible with C++
ClosedPublic

Authored by kib on Oct 17 2025, 3:53 AM.
Tags
None
Referenced Files
F154073563: D53149.id164461.diff
Sat, Apr 25, 11:22 PM
Unknown Object (File)
Thu, Apr 23, 6:01 PM
Unknown Object (File)
Wed, Apr 22, 2:29 AM
Unknown Object (File)
Wed, Apr 22, 2:15 AM
Unknown Object (File)
Sun, Apr 19, 8:45 AM
Unknown Object (File)
Thu, Apr 16, 4:58 AM
Unknown Object (File)
Wed, Apr 15, 9:13 AM
Unknown Object (File)
Tue, Apr 14, 11:27 AM
Subscribers

Details

Summary
by removing the cast to _Bool.  The type is not defined for C++,
and the specification from gcc info states that the return
type of the  __builtin_{add,sub,mul}_overflow() is bool already.

This is done instead of including stdbool.h to avoid namespace
pollution, since defining bool from stdckdint.h simingly not
sanctioned by ISO/IEC 9899:2024.

PR:     290299

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 17 2025, 3:53 AM
kib retitled this revision from include/stdckint.h: make the header compatible with C++ to include/stdckdint.h: make the header compatible with C++.
kib edited the summary of this revision. (Show Details)
kib added a reviewer: des.
This revision is now accepted and ready to land.Oct 17 2025, 11:30 AM