HomeFreeBSD

Stop using expressions in _Alignof()

Description

Stop using expressions in _Alignof()

_Alignof(expression) is a non-standard extension. This is not allowed
in gnu11 and gnu17 which follow the C11 standard _Alignof(type).

Reviewed by: arichardson, imp, jhb
Fixes: 4a9cd9fc22d7 amd64 db_trace: Reject unaligned frame pointers
Fixes: 7ccaf76a27f1 riscv db_trace: Ensure trapframe pointer is suitably aligned.
Fixes: 638c68897fbd arm64 db_trace: Ensure trapframe pointer is suitably aligned.
Differential Revision: https://reviews.freebsd.org/D43409

(cherry picked from commit 03d04bf49492fc70366e6d78194336a4122282a2)

Details

Provenance
minsoochoo0122_proton.meAuthored on Jan 12 2024, 11:37 PM
jhbCommitted on Apr 8 2024, 5:30 PM
Reviewer
rG4a9cd9fc22d7: amd64 db_trace: Reject unaligned frame pointers
Differential Revision
D43409: Stop using expressions in _Alignof()
Parents
rG402c6c331d73: riscv db_trace: Ensure trapframe pointer is suitably aligned.
Branches
Unknown
Tags
Unknown