Fix compilation with GCC 8 (#1051)

The anonymous namespace was renamed due to -Wsubobject-linkage complaining
about a field created in a GTest template class (CborRoundtripTestParam)
being defined in an anonymous namespace. See
https://stackoverflow.com/a/37723265.
This commit is contained in:
Tyler Veness
2018-05-13 23:11:13 -07:00
committed by Peter Johnson
parent 74d7107ac6
commit 5ff3d837b6
3 changed files with 17 additions and 9 deletions

View File

@@ -14,6 +14,14 @@
#ifndef LLVM_ADT_SMALLVECTOR_H
#define LLVM_ADT_SMALLVECTOR_H
// This file uses std::memcpy() to copy std::pair<unsigned int, unsigned int>.
// That type is POD, but the standard doesn't guarantee that. GCC doesn't treat
// the type as POD so it throws a warning. We want to consider this a warning
// instead of an error.
#if __GNUC__ >= 8
#pragma GCC diagnostic warning "-Wclass-memaccess"
#endif
#include "wpi/iterator_range.h"
#include "wpi/AlignOf.h"
#include "wpi/Compiler.h"