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
<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.
This commit is contained in:
Joseph Myers 2017-08-21 21:43:32 +00:00
parent a8410a5fc9
commit ea99fcd038
2 changed files with 8 additions and 0 deletions

View File

@ -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> 2017-08-21 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with * libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with

View File

@ -939,6 +939,9 @@ __kernel_standard(double x, double y, int type)
break; break;
/* #### Last used is 50/150/250 ### */ /* #### Last used is 50/150/250 ### */
default:
__builtin_unreachable ();
} }
return exc.retval; return exc.retval;
} }