mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 04:00:56 +00:00
Fix new warnings emitted by GCC 7
llvm-svn: 302280
This commit is contained in:
parent
81273c721c
commit
807790a09b
@ -1089,6 +1089,13 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
# define _LIBCPP_DIAGNOSE_ERROR(...)
|
# define _LIBCPP_DIAGNOSE_ERROR(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __has_attribute(fallthough) || defined(_LIBCPP_COMPILER_GCC)
|
||||||
|
// Use a function like macro to imply that it must be followed by a semicolon
|
||||||
|
#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__))
|
||||||
|
#else
|
||||||
|
#define _LIBCPP_FALLTHROUGH() ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_LIBCPP_ABI_MICROSOFT) && \
|
#if defined(_LIBCPP_ABI_MICROSOFT) && \
|
||||||
(defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
|
(defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
|
||||||
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
|
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
|
||||||
|
@ -2825,7 +2825,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// drop through
|
_LIBCPP_FALLTHROUGH();
|
||||||
case money_base::none:
|
case money_base::none:
|
||||||
if (__p != 3)
|
if (__p != 3)
|
||||||
{
|
{
|
||||||
|
@ -68,8 +68,8 @@ T&
|
|||||||
make(A0 a0)
|
make(A0 a0)
|
||||||
{
|
{
|
||||||
static typename aligned_storage<sizeof(T)>::type buf;
|
static typename aligned_storage<sizeof(T)>::type buf;
|
||||||
::new (&buf) T(a0);
|
auto *obj = ::new (&buf) T(a0);
|
||||||
return *reinterpret_cast<T*>(&buf);
|
return *obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class A0, class A1>
|
template <class T, class A0, class A1>
|
||||||
@ -88,8 +88,8 @@ T&
|
|||||||
make(A0 a0, A1 a1, A2 a2)
|
make(A0 a0, A1 a1, A2 a2)
|
||||||
{
|
{
|
||||||
static typename aligned_storage<sizeof(T)>::type buf;
|
static typename aligned_storage<sizeof(T)>::type buf;
|
||||||
::new (&buf) T(a0, a1, a2);
|
auto *obj = ::new (&buf) T(a0, a1, a2);
|
||||||
return *reinterpret_cast<T*>(&buf);
|
return *obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
@ -480,8 +480,8 @@ locale::__imp::make_global()
|
|||||||
{
|
{
|
||||||
// only one thread can get in here and it only gets in once
|
// only one thread can get in here and it only gets in once
|
||||||
static aligned_storage<sizeof(locale)>::type buf;
|
static aligned_storage<sizeof(locale)>::type buf;
|
||||||
::new (&buf) locale(locale::classic());
|
auto *obj = ::new (&buf) locale(locale::classic());
|
||||||
return *reinterpret_cast<locale*>(&buf);
|
return *obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
locale&
|
locale&
|
||||||
|
Loading…
Reference in New Issue
Block a user