HomePhabricator

Fix the build with gcc when `-Wredundant-decls` is passed

Description

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@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

Details

Committed
dimFeb 20 2019, 1:01 PM
Reviewer
EricWF
Differential Revision
D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed
Branches
Unknown
Tags
Unknown