This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: fix -Werror regressions with gcc 4.8 on x86_64
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Thu, 8 Jan 2015 10:53:40 -0800 (PST)
- Subject: Re: fix -Werror regressions with gcc 4.8 on x86_64
- Authentication-results: sourceware.org; auth=none
- References: <orr3vr3pa1 dot fsf at free dot home> <oregrq414g dot fsf at free dot home> <alpine dot DEB dot 2 dot 10 dot 1412231952260 dot 31777 at digraph dot polyomino dot org dot uk> <orwq5i2cae dot fsf at free dot home> <20150105233904 dot D664D2C3BCF at topped-with-meat dot com> <54AC0EDE dot 7050308 at twiddle dot net> <20150107231902 dot 2E2792C3B36 at topped-with-meat dot com> <54AE2FD0 dot 1000802 at twiddle dot net>
> On 01/07/2015 03:19 PM, Roland McGrath wrote:
> >> For use within glibc itself, I think we should redefine assert with NDEBUG to
> >> use __builtin_unreachable.
> >
> > The point of NDEBUG is to optimize out the tests, not just to avoid the
> > file name, line number, and expression source strings.
> >
>
> The tests themselves can sometimes give information to the compiler. Showing
> it that certain paths are unreachable imply information for the other paths.
> The __builtin_unreachable function doesn't imply any actual effect; the paths
> leading to this function should be removed.
OK.