Page MenuHomeFreeBSD

Stop using expressions in _Alignof()
ClosedPublic

Authored by mchoo on Jan 12 2024, 3:42 AM.
Referenced Files
F174964023: D43409.id132651.diff
Wed, Oct 7, 6:02 AM
F174950546: D43409.id132658.diff
Wed, Oct 7, 3:53 AM
F174944886: D43409.id132723.diff
Wed, Oct 7, 3:13 AM
F174939896: D43409.id132704.diff
Wed, Oct 7, 2:29 AM
F174923670: D43409.diff
Wed, Oct 7, 12:17 AM
Unknown Object (File)
Tue, Oct 6, 2:38 AM
Unknown Object (File)
Sat, Oct 3, 5:26 PM
Unknown Object (File)
Fri, Oct 2, 4:19 PM

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

mchoo requested review of this revision.Jan 12 2024, 3:42 AM
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.