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)
Sat, May 11, 12:32 PM
Unknown Object (File)
Sat, May 11, 1:25 AM
Unknown Object (File)
Sat, May 11, 1:21 AM
Unknown Object (File)
Fri, May 10, 11:06 AM
Unknown Object (File)
Fri, May 10, 11:02 AM
Unknown Object (File)
Sun, May 5, 4:50 AM
Unknown Object (File)
Apr 28 2024, 7:20 PM
Unknown Object (File)
Apr 28 2024, 8:19 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 55399
Build 52288: 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.