From e1160a466998fa3311b9a0f4a5c24846e8264c3c Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 23 Feb 2019 14:27:09 +0000 Subject: [PATCH] MFC r344386: Pull in r354515 from upstream libc++ trunk: Fix the build with gcc when `-Wredundant-decls` is passed Summary: gcc warns that `__throw_runtime_error` is declared both in `<__locale>` and ``, if `-Wredundant-decls` is passed on the command line; this is the case with FreeBSD when ${WARNS} == 6. Since `<__locale>` gets its first declaration via a transitive include of ``, and the second declaration is after the first invocation of `__throw_runtime_error`, delete that second declaration. Signed-off-by: Enji Cooper Reviewers: kristina, MaskRay, EricWF, ldionne, ngie Reviewed By: EricWF Subscribers: krytarowski, brooks, emaste, dim, christof, jdoerfert, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D58425 Submitted by: ngie --- contrib/libc++/include/__locale | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/libc++/include/__locale b/contrib/libc++/include/__locale index f43e7b4303d..24042a8e7f9 100644 --- a/contrib/libc++/include/__locale +++ b/contrib/libc++/include/__locale @@ -1230,8 +1230,6 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) -_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*); - template struct __narrow_to_utf8 { -- 2.45.0