From: Joseph Myers Date: Mon, 21 Aug 2017 21:43:32 +0000 (+0000) Subject: Fix GCC 7 build of k_standard.c. X-Git-Tag: glibc-2.27~1102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea99fcd03875caf59ceda354ec8ed813bb5a5f79;p=thirdparty%2Fglibc.git Fix GCC 7 build of k_standard.c. This patch adds a default case to k_standard.c that calls __builtin_unreachable, to avoid an uninitialized variable error from GCC 7 (reported in ). Tested for x86_64 (with GCC 7). * sysdeps/ieee754/k_standard.c (__kernel_standard): Add default case calling __builtin_unreachable. --- diff --git a/ChangeLog b/ChangeLog index 3d2afd95efa..bf3e893f259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-08-21 Joseph Myers + + * sysdeps/ieee754/k_standard.c (__kernel_standard): Add default + case calling __builtin_unreachable. + 2017-08-21 Adhemerval Zanella * libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c index 0a0201f1d50..8f906bd604d 100644 --- a/sysdeps/ieee754/k_standard.c +++ b/sysdeps/ieee754/k_standard.c @@ -939,6 +939,9 @@ __kernel_standard(double x, double y, int type) break; /* #### Last used is 50/150/250 ### */ + + default: + __builtin_unreachable (); } return exc.retval; }