[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Annoying new warning
From: |
Christian Jullien |
Subject: |
Re: [Tinycc-devel] Annoying new warning |
Date: |
Fri, 5 May 2017 06:46:27 +0200 |
Ok, I tried this patch which allowed me to run my complete non-regression
test suite without problem on ARM.
Do you agree I push this patch in mob?
diff --git a/lib/libtcc1.c b/lib/libtcc1.c
index 9195489..bcdfb0b 100644
--- a/lib/libtcc1.c
+++ b/lib/libtcc1.c
@@ -577,6 +577,10 @@ unsigned long long __fixunsdfdi (double a1)
unsigned long long __fixunsxfdi (long double a1)
{
+#if defined(TCC_TARGET_ARM)
+// (void)fprintf(stderr, "__fixunsxfdi(%g) called for TCC_TARGET_ARM\n",
a1);
+ return 0;
+#else
register union ldouble_long dl1;
register int exp;
register unsigned long long l;
@@ -596,6 +600,7 @@ unsigned long long __fixunsxfdi (long double a1)
return l >> -exp;
else
return 0;
+#endif
}
-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Vincent Lefevre
Sent: mercredi 3 mai 2017 11:27
To: address@hidden
Subject: Re: [Tinycc-devel] Annoying new warning
On 2017-05-03 11:39:16 +0200, grischka wrote:
> Interesting. Obviously I removed the suppression of some warnings,
> among them "uninitialized" ;) See the change in configure:
>
> -W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign\
> sign-compare unused-result uninitialized"
>
> +W_OPTIONS="pointer-sign sign-compare unused-result"
>
> Yeah, it helped. Thanks for the all the hard work, after all ;)
IMHO, -Wuninitialized is very useful (as opposed to -Wmaybe-uninitialized,
which may give false positives).
> PS: As already suggested it appears that the function can simply be
> #ifdef'd out, for ARM that is.
The #ifdef may be the best solution as potential issues would be detected at
compile time. Alternatively, you can add an assert on the sizes. This should
make the -Wuninitialized warning disappear (otherwise this would be a bug in
GCC; if GCC isn't smart enough, it should emit the warning only for
-Wmaybe-uninitialized).
--
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/> 100%
accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
- Re: [Tinycc-devel] Annoying new warning, Daniel Glöckner, 2017/05/01
- Re: [Tinycc-devel] Annoying new warning, Christian Jullien, 2017/05/01
- Re: [Tinycc-devel] Annoying new warning, Michael Matz, 2017/05/01
- Re: [Tinycc-devel] Annoying new warning, Christian Jullien, 2017/05/02
- Re: [Tinycc-devel] Annoying new warning, grischka, 2017/05/02
- Re: [Tinycc-devel] Annoying new warning, Christian Jullien, 2017/05/02
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/02
- Re: [Tinycc-devel] Annoying new warning, Christian Jullien, 2017/05/03
- Re: [Tinycc-devel] Annoying new warning, grischka, 2017/05/03
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/03
- Re: [Tinycc-devel] Annoying new warning,
Christian Jullien <=
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, Christian JULLIEN, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, William Hales, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, William Hales, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, grischka, 2017/05/05
- Re: [Tinycc-devel] Annoying new warning, Vincent Lefevre, 2017/05/05
Re: [Tinycc-devel] Annoying new warning, Christian JULLIEN, 2017/05/05
Re: [Tinycc-devel] Annoying new warning, Christian JULLIEN, 2017/05/05