]> sourceware.org Git - glibc.git/commitdiff
Fix GCC 7 build of k_standard.c.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 21 Aug 2017 21:43:32 +0000 (21:43 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 21 Aug 2017 21:43:32 +0000 (21:43 +0000)
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
<https://sourceware.org/ml/libc-alpha/2017-08/msg01012.html>).

Tested for x86_64 (with GCC 7).

* sysdeps/ieee754/k_standard.c (__kernel_standard): Add default
case calling __builtin_unreachable.

ChangeLog
sysdeps/ieee754/k_standard.c

index 3d2afd95efab97f3016ac10076f036c64570d91c..bf3e893f25941a07484f7063b7989d70de49f9d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-21  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/ieee754/k_standard.c (__kernel_standard): Add default
+       case calling __builtin_unreachable.
+
 2017-08-21  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with
index 0a0201f1d5034018bfb13603049d8c6634b24dd5..8f906bd604dd1030b03a2b56e27d2e1a1d1d0955 100644 (file)
@@ -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;
 }
This page took 0.049092 seconds and 5 git commands to generate.