This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug build/21314] Compile Error GCC 5.2.0 MIPS with -0s
- From: "lordrasmus at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 27 Mar 2017 17:37:04 +0000
- Subject: [Bug build/21314] Compile Error GCC 5.2.0 MIPS with -0s
- Auto-submitted: auto-generated
- References: <bug-21314-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21314
--- Comment #2 from Ramin Seyed-Moussavi <lordrasmus at gmail dot com> ---
i had to modify the include
and then i had the same issue in another file
like this it works now
diff -ur glibc-2.25_vanilla/sysdeps/ieee754/dbl-64/s_log1p.c
glibc-2.25/sysdeps/ieee754/dbl-64/s_log1p.c
--- glibc-2.25_vanilla/sysdeps/ieee754/dbl-64/s_log1p.c 2017-02-05
16:28:43.000000000 +0100
+++ glibc-2.25/sysdeps/ieee754/dbl-64/s_log1p.c 2017-03-27 18:26:45.435936378
+0200
@@ -81,6 +81,7 @@
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libc-internal.h>
static const double
ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
@@ -191,5 +192,14 @@
if (k == 0)
return f - (hfsq - s * (hfsq + R));
else
- return k * ln2_hi - ((hfsq - (s * (hfsq + R) + (k * ln2_lo + c))) - f);
+ {
+ /* With GCC 5.2.0 when compiling with -Os on MIPS the compiler
+ warns that c might be used uninitialized. This can't be true
+ because k must be 0 for c to be uninitialized and we handled
+ that computation earlier without using c. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+ return k * ln2_hi - ((hfsq - (s * (hfsq + R) + (k * ln2_lo + c))) - f);
+ DIAG_POP_NEEDS_COMMENT;
+ }
}
diff -ur glibc-2.25_vanilla/sysdeps/ieee754/flt-32/s_log1pf.c
glibc-2.25/sysdeps/ieee754/flt-32/s_log1pf.c
--- glibc-2.25_vanilla/sysdeps/ieee754/flt-32/s_log1pf.c 2017-02-05
16:28:43.000000000 +0100
+++ glibc-2.25/sysdeps/ieee754/flt-32/s_log1pf.c 2017-03-27
18:27:20.947910242 +0200
@@ -16,6 +16,7 @@
#include <float.h>
#include <math.h>
#include <math_private.h>
+#include <libc-internal.h>
static const float
ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
@@ -97,6 +98,17 @@
s = f/((float)2.0+f);
z = s*s;
R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
- if(k==0) return f-(hfsq-s*(hfsq+R)); else
- return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
+ if(k==0)
+ return f-(hfsq-s*(hfsq+R));
+ else
+ {
+ /* With GCC 5.2.0 when compiling with -Os on MIPS the compiler
+ warns that c might be used uninitialized. This can't be true
+ because k must be 0 for c to be uninitialized and we handled
+ that computation earlier without using c. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+ return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
+ DIAG_POP_NEEDS_COMMENT;
+ }
}
--
You are receiving this mail because:
You are on the CC list for the bug.