]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make zero volatile to defeat constant-folding of 0.0/0.0
authorStan Shebs <stanshebs@google.com>
Tue, 23 Jan 2018 16:28:31 +0000 (08:28 -0800)
committerStan Shebs <stanshebs@google.com>
Wed, 1 May 2019 00:34:38 +0000 (17:34 -0700)
sysdeps/ieee754/k_standard.c

index 826f19785a82b0e2cd56325ef48c564e740bb137..0bcae6e863e1ecd824b740d277c824d310a898e2 100644 (file)
@@ -38,7 +38,7 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $
 # if 0
 static const double zero = 0.0;        /* used as const */
 # else
-static double zero = 0.0;      /* used as const */
+volatile static double zero = 0.0;     /* used as const */
 # endif
 
 /*