about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-08-21 21:43:32 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-08-21 21:43:32 +0000
commitea99fcd03875caf59ceda354ec8ed813bb5a5f79 (patch)
tree558164d63a8b30ea49b0735ece07992ed5233bf6 /sysdeps
parenta8410a5fc9305c316633a5a3033f3927b759be35 (diff)
downloadglibc-ea99fcd03875caf59ceda354ec8ed813bb5a5f79.tar.gz
glibc-ea99fcd03875caf59ceda354ec8ed813bb5a5f79.tar.xz
glibc-ea99fcd03875caf59ceda354ec8ed813bb5a5f79.zip
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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/k_standard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c
index 0a0201f1d5..8f906bd604 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;
 }