[Bug c++/94569] alignas(object) with a weaker (smaller) alignment than the alignas(type) of it's type compiles, inconsistent with the C++ standard
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 2 13:06:39 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94569
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Both bugs are violations of [dcl.align] p5 though. The bug is not that GCC
doesn't follow [basic.align] p1 (it does) but that it allows alignas to weaken
the alignment later. GCC should not allow alignas to weaken alignment on any
declaration, whether a class declaration or variable declaration, and that's PR
65685. I've added a more complete testcase there, which includes alignas on
object declarations.
More information about the Gcc-bugs
mailing list