mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
4ae78639f5
According to C++11 reference: "If the strictest (largest) alignas on a declaration is weaker than the alignment it would have without any alignas specifiers (that is, weaker than its natural alignment or weaker than alignas on another declaration of the same object or type), the program is ill-formed:" https://en.cppreference.com/w/cpp/language/alignas The code requests 4 byte alignment for Genode::Arm_cpu::Context. The Context structure inherits Genode::Arm_cpu::Fpu_context which has minimum alignment requirement of 8 bytes, due to uint64_t d0_d31 member. This makes the 4 byte value in Context's alignas specifier invalid (smaller than allowed minimum). Similar situation takes place in Arm_64 case. The claimed minimum alignment of Context is 8 bytes, but the fpu_state member imposes 16 bytes alignment (explicitly specified in Fpu_state declaration). In both cases the code builds fine with GCC 8.3.0, but fails with clang which claims that "requested alignment is less than minimum alignment of X for type", where X is 8 on ARM and 16 on AArch64. Ref: https://eel.is/c++draft/dcl.align#5 Issue #4421 |
||
---|---|---|
.. | ||
board | ||
etc | ||
include | ||
lib/mk | ||
recipes | ||
run | ||
src |