Page MenuHomeFreeBSD

Stop using expressions in _Alignof()
ClosedPublic

Authored by minsoochoo0122_proton.me on Jan 12 2024, 3:42 AM.
Referenced Files
Unknown Object (File)
Sun, Nov 10, 3:34 PM
Unknown Object (File)
Sat, Nov 9, 1:52 PM
Unknown Object (File)
Sep 24 2024, 4:36 AM
Unknown Object (File)
Sep 23 2024, 2:25 PM
Unknown Object (File)
Sep 18 2024, 12:49 AM
Unknown Object (File)
Sep 17 2024, 8:21 AM
Unknown Object (File)
Sep 16 2024, 12:51 PM
Unknown Object (File)
Sep 13 2024, 8:48 AM

Details

Summary

Divide from D43239

_Alignof(expression) is a non-standard extension (https://en.cppreference.com/w/c/language/_Alignof).
This is not allowed in gnu11 and gnu17 which follow the C11 standard _Alignof(type).

Test Plan

make buildkernel

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55386
Build 52275: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 12 2024, 3:45 AM

Diff itself is fine, but the amended summary isn't a helpful commit message

Please wrap the commit message at 80 columns. Otherwise it looks much better.

Sorry, just spotted one style issue

sys/amd64/amd64/db_trace.c
208–209

This line is now too long

Oh how I wish I could run even the kinda whiny checkstyle9.pl in phabricator :(.

This revision now requires review to proceed.Jan 12 2024, 6:16 AM
jhb added a subscriber: jhb.

I will add a Fixes: tag to reference my original commit to the log message when merging this. Also, no need to mention the other review (first sentence) in the commit log so I will elide that as well.

This revision is now accepted and ready to land.Jan 12 2024, 11:19 PM
This revision was automatically updated to reflect the committed changes.