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)
Wed, Jul 1, 1:22 AM
Unknown Object (File)
Wed, Jul 1, 1:21 AM
Unknown Object (File)
Tue, Jun 30, 3:05 AM
Unknown Object (File)
Mon, Jun 29, 12:15 AM
Unknown Object (File)
Sun, Jun 28, 10:55 AM
Unknown Object (File)
Thu, Jun 25, 7:21 AM
Unknown Object (File)
Wed, Jun 24, 4:44 AM
Unknown Object (File)
Mon, Jun 22, 3:37 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 55382
Build 52271: 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

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.