fix -Werror regressions with gcc 4.8 on x86_64

Roland McGrath roland@hack.frob.com
Thu Jan 8 18:53:00 GMT 2015


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



More information about the Libc-alpha mailing list