#include <limits>
#include "folly/Bits.h"
+#include "folly/Portability.h"
#include "folly/Range.h"
namespace folly {
static T loadRMW(const Unaligned<T>& x) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
+// make sure we compile without warning on gcc 4.6 with -Wpragmas
+#if __GNUC_PREREQ(4, 7)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
return x.value;
#pragma GCC diagnostic pop
}
static T loadRMW(const T& x) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
+#if __GNUC_PREREQ(4, 7)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
return x;
#pragma GCC diagnostic pop
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
+#if __GNUC_PREREQ(4, 7)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
template <class T, class Traits>
inline void Bits<T, Traits>::set(T* p, size_t bit) {