]> Sergey Matveev's repositories - nnn.git/commit
use standard C11 alignas
authorNRK <nrk@disroot.org>
Tue, 9 Aug 2022 19:50:41 +0000 (01:50 +0600)
committerNRK <nrk@disroot.org>
Thu, 11 Aug 2022 05:31:35 +0000 (11:31 +0600)
commit29a5992deeab1bf1261fa5d9165da9039d408d56
treec01e7432cd6adcb625786c3a4764911f56632f54
parent7086d030f0a0a4495114bb67715ca2bd4f25fb76
use standard C11 alignas

nnn source code already uses C11, which introduced `_Alignas` [^0] as a
standardized alternative to __attribute__((aligned)).

there are no other usage of `__attribute__` in the nnn source code, so
in theory this should make things more portable across compilers.

also removes an unnecessary usage of `alloca()` with an aligned constant
sized buffer instead.

[^0]: https://en.cppreference.com/w/c/language/_Alignas
src/nnn.c