Commit 6b633c4b authored by Tomas Popela's avatar Tomas Popela Committed by Commit Bot

GCC: Can't use alignas() together with __attribute__()

It's because GCC has problems when mixing the alignas() together with
__attribute__() (that is used to export the symbols). The best
solution is to use ALIGNAS() macro from //base/compiler_specific.h
together with alignof() to have the equal functionality that compiles on
GCC as well as on clang.

Bug: 819294
Change-Id: Ieb169592a2965f17a18bfc88d28418eb723a4e5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806735
Auto-Submit: Tomáš Popela <tomas.popela@gmail.com>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: default avatarAlex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697330}
parent 3247f461
......@@ -59,7 +59,7 @@ class BASE_EXPORT DependentList {
// Align Node on an 8-byte boundary to ensure the first 3 bits are 0 and can
// be used to store additional state (see static_asserts below).
class BASE_EXPORT alignas(8) Node {
class BASE_EXPORT ALIGNAS(8) Node {
public:
Node();
explicit Node(Node&& other) noexcept;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment