summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Stephen Hines <srhines@google.com> 2016-12-13 19:06:49 -0800
committer Stephen Hines <srhines@google.com> 2017-01-13 18:57:54 -0800
commit445584d3d1f8e3a9a7d12eded3b2dce5f8691d8c (patch)
tree0262c8b2a9d31f5c1ff3cca3582ee5e05e203e7f
parent4cddd03950bb21e950afd72cad87e963bc53ea10 (diff)
Ignore warning for instantiation after specialization.
Bug: http://b/31532493 The false template specialization is indeed a duplicate, so we can remove it, but the ART team would prefer to keep this explicit. art/runtime/base/arena_allocator.cc:147:16: error: explicit instantiation of 'ArenaAllocatorStatsImpl<false>' that occurs after an explicit specialization has no effect [-Werror,-Winstantiation-after-specialization] template class ArenaAllocatorStatsImpl<kArenaAllocatorCountAllocations>; ^ art/runtime/base/arena_allocator.h:105:7: note: previous template specialization is here class ArenaAllocatorStatsImpl<false> { ^ Test: Builds correctly with latest toolchain. Change-Id: Ifbcb3b98ff4451b9860a6c6c6b085745f89c0a64
-rw-r--r--runtime/base/arena_allocator.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/base/arena_allocator.cc b/runtime/base/arena_allocator.cc
index 61e0aabbaf..1caf0c075e 100644
--- a/runtime/base/arena_allocator.cc
+++ b/runtime/base/arena_allocator.cc
@@ -144,8 +144,11 @@ void ArenaAllocatorStatsImpl<kCount>::Dump(std::ostream& os, const Arena* first,
}
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winstantiation-after-specialization"
// Explicitly instantiate the used implementation.
template class ArenaAllocatorStatsImpl<kArenaAllocatorCountAllocations>;
+#pragma GCC diagnostic pop
void ArenaAllocatorMemoryTool::DoMakeDefined(void* ptr, size_t size) {
MEMORY_TOOL_MAKE_DEFINED(ptr, size);