[libcxx-commits] [libcxx] r354515 - Fix the build with gcc when `-Wredundant-decls` is passed
Dimitry Andric via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 20 13:01:32 PST 2019
Author: dim
Date: Wed Feb 20 13:01:31 2019
New Revision: 354515
URL: http://llvm.org/viewvc/llvm-project?rev=354515&view=rev
Log:
Fix the build with gcc when `-Wredundant-decls` is passed
Summary:
gcc warns that `__throw_runtime_error` is declared both in `<__locale>`
and `<stdexcept>`, 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 `<stdexcept>`, and the second declaration is after the first
invocation of `__throw_runtime_error`, delete that second declaration.
Signed-off-by: Enji Cooper <yaneurabeya at gmail.com>
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
Modified:
libcxx/trunk/include/__locale
Modified: libcxx/trunk/include/__locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=354515&r1=354514&r2=354515&view=diff
==============================================================================
--- libcxx/trunk/include/__locale (original)
+++ libcxx/trunk/include/__locale Wed Feb 20 13:01:31 2019
@@ -1229,8 +1229,6 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_E
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>)
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>)
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
-
template <size_t _Np>
struct __narrow_to_utf8
{
More information about the libcxx-commits
mailing list