mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
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:
committed by
Peter Johnson
parent
74d7107ac6
commit
5ff3d837b6
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user