Page MenuHomeFreeBSD

cdefs.h: Retire __const and __signed
ClosedPublic

Authored by imp on Jul 3 2024, 6:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 15 2025, 8:47 PM
Unknown Object (File)
Sep 14 2025, 5:59 PM
Unknown Object (File)
Sep 7 2025, 5:11 AM
Unknown Object (File)
Aug 14 2025, 10:36 PM
Unknown Object (File)
Jul 17 2025, 8:30 AM
Unknown Object (File)
Jul 17 2025, 8:29 AM
Unknown Object (File)
Jul 17 2025, 5:15 AM
Unknown Object (File)
Jul 12 2025, 1:22 PM
Subscribers
None

Details

Summary

These are no longer used in the base system. Once upon a time they were
used to ease the transition from K&R to ANSI C. These days, we use both
of these keywords in their bare form everywhere, even in our
headers. Any uses of const or signed will be converted to their ANSI
meaning in the compiler, but is beyond the scope of cdefs.h's
charter. For pure K&R compilation, with an enforced only use K&R
features and meanings, one needs to define NO_ANSI_KEYWORDS (though even
that support is wobbly at best, being active only for !GCC or
gcc-adjacent compilers which currently appears to be none).

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Jul 3 2024, 6:45 PM
imp created this revision.
This revision is now accepted and ready to land.Jul 4 2024, 10:00 AM
This revision was automatically updated to reflect the committed changes.