#include <stdint.h>
#include <boost/noncopyable.hpp>
#include <folly/AtomicStruct.h>
+#include <folly/Portability.h>
#include <folly/detail/CacheLocality.h>
#include <folly/portability/SysMman.h>
#include <folly/portability/Unistd.h>
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly {
} // namespace folly
-# pragma GCC diagnostic pop
+FOLLY_POP_WARNING
static T load(const Unaligned<T>& x) { return x.value; }
static void store(Unaligned<T>& x, T v) { x.value = v; }
static T loadRMW(const Unaligned<T>& x) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
+ FOLLY_PUSH_WARNING
+ FOLLY_GCC_DISABLE_WARNING("-Wuninitialized")
#if !__clang__ // for gcc version [4.8, ?)
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ FOLLY_GCC_DISABLE_WARNING("-Wmaybe-uninitialized")
#endif
return x.value;
-#pragma GCC diagnostic pop
+ FOLLY_POP_WARNING
}
};
store(UnalignedNoASan<T>& x, T v) { x.value = v; }
static T FOLLY_DISABLE_ADDRESS_SANITIZER
loadRMW(const UnalignedNoASan<T>& x) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
+ FOLLY_PUSH_WARNING
+ FOLLY_GCC_DISABLE_WARNING("-Wuninitialized")
#if !__clang__ // for gcc version [4.8, ?)
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ FOLLY_GCC_DISABLE_WARNING("-Wmaybe-uninitialized")
#endif
return x.value;
-#pragma GCC diagnostic pop
+ FOLLY_POP_WARNING
}
};
static T load(const T& x) { return x; }
static void store(T& x, T v) { x = v; }
static T loadRMW(const T& x) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
+ FOLLY_PUSH_WARNING
+ FOLLY_GCC_DISABLE_WARNING("-Wuninitialized")
#if !__clang__ // for gcc version [4.8, ?)
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ FOLLY_GCC_DISABLE_WARNING("-Wmaybe-uninitialized")
#endif
return x;
-#pragma GCC diagnostic pop
+ FOLLY_POP_WARNING
}
};
// gcc 4.8 needs more -Wmaybe-uninitialized tickling, as it propagates the
// taint upstream from loadRMW
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wuninitialized")
#if !__clang__ // for gcc version [4.8, ?)
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+FOLLY_GCC_DISABLE_WARNING("-Wmaybe-uninitialized")
#endif
template <class T, class Traits>
Traits::store(*p, v);
}
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
template <class T, class Traits>
inline bool Bits<T, Traits>::test(const T* p, size_t bit) {
#error This file may only be included from folly/gen/Base.h
#endif
+#include <folly/Portability.h>
+
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly {
namespace gen {
} // gen
} // folly
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
#include <type_traits>
#include <utility>
+#include <folly/Portability.h>
+
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly {
namespace gen {
} // gen
} // folly
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
#endif
#include <folly/Conv.h>
+#include <folly/Portability.h>
#include <folly/String.h>
namespace folly {
template<class Target, class=void>
inline Target passthrough(Target target) { return target; }
-#pragma GCC diagnostic push
+FOLLY_PUSH_WARNING
#ifdef __clang__
// Clang isn't happy with eatField() hack below.
#pragma GCC diagnostic ignored "-Wreturn-stack-address"
}
};
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
} // namespace detail
#include <boost/iterator/iterator_facade.hpp>
#include <folly/FBString.h>
-#include <folly/Range.h>
#include <folly/FBVector.h>
+#include <folly/Portability.h>
+#include <folly/Range.h>
#include <folly/portability/SysUio.h>
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly {
} // folly
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
#include <folly/portability/TypeTraits.h>
// Ignore shadowing warnings within this file, so includers can use -Wshadow.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wshadow"
+FOLLY_PUSH_WARNING
+FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly {
} // namespace folly
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING