30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From c41688bf20186723367b560ceb539b2330951ddb Mon Sep 17 00:00:00 2001
|
|
From: Aliaksey Kandratsenka <alkondratenko@gmail.com>
|
|
Date: Sun, 5 Aug 2018 20:39:07 -0700
|
|
Subject: [PATCH 20/39] Use standard-conforming alignof in debugallocation.cc
|
|
|
|
Clang was giving warning that alignof(<variable>) is extension. So
|
|
we're now doing alignof of decltype.
|
|
---
|
|
src/debugallocation.cc | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/debugallocation.cc b/src/debugallocation.cc
|
|
index 7c438f2..39dea5a 100644
|
|
--- a/src/debugallocation.cc
|
|
+++ b/src/debugallocation.cc
|
|
@@ -1152,8 +1152,8 @@ static union {
|
|
|
|
REGISTER_MODULE_INITIALIZER(debugallocation, {
|
|
#if (__cplusplus >= 201103L)
|
|
- COMPILE_ASSERT(alignof(debug_malloc_implementation_space) >= alignof(DebugMallocImplementation),
|
|
- debug_malloc_implementation_space_is_not_properly_aligned);
|
|
+ static_assert(alignof(decltype(debug_malloc_implementation_space)) >= alignof(DebugMallocImplementation),
|
|
+ "DebugMallocImplementation is expected to need just word alignment");
|
|
#endif
|
|
// Either we or valgrind will control memory management. We
|
|
// register our extension if we're the winner. Otherwise let
|
|
--
|
|
1.8.3.1
|
|
|