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, May 5, 4:50 AM
Unknown Object (File)
Sun, Apr 28, 7:20 PM
Unknown Object (File)
Sun, Apr 28, 8:19 AM
Unknown Object (File)
Sat, Apr 20, 8:49 PM
Unknown Object (File)
Sat, Apr 20, 8:15 AM
Unknown Object (File)
Apr 5 2024, 12:14 AM
Unknown Object (File)
Mar 9 2024, 8:05 AM
Unknown Object (File)
Mar 7 2024, 8:03 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 Not Applicable
Unit
Tests Not Applicable

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.