tinycc-devel
[Top][All Lists]
Advanced

[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: Wed, 3 May 2017 07:07:26 +0200

After doing a dichotomy search I found that:

2017-02-13 grischka mems & leaks commit was the last commit WITHOUT this
warning

Next commit also made by grischka, introduced this warning:

2017-02-13 grischka updates & cleanups (tcc-doc/Changelog/TODO ...)

I see no obvious changes from Grischka that may cause this warning to
appear.

Christian

-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Vincent Lefevre
Sent: mardi 2 mai 2017 15:26
To: address@hidden
Subject: Re: [Tinycc-devel] Annoying new warning

On 2017-05-02 14:24:22 +0200, Christian Jullien wrote:
> When I see this warning, it makes me think that application will 
> produce unpredictable results based on value on stack.
> That's why I consider this as an annoying warning.

Certainly, but providing fake initialization may have the consequence to
hide real warnings (i.e. real bugs).

One solution would be to use the preprocessor to avoid defining this
function on platforms it cannot be called. This will also have the advantage
to generate (slightly) smaller code, and also to make sure that the function
will not be used when it mustn't.

> Note this warning is rather recent, like few weeks ago.

According to git blame, this is very old code (2002-07). Are you sure this
isn't due to a more recent version of your GCC compiler?
New warnings are regularly added in GCC.

Or this may be due to:

diff --git a/lib/libtcc1.c b/lib/libtcc1.c index 0edfbd8..9195489 100644
--- a/lib/libtcc1.c
+++ b/lib/libtcc1.c
@@ -693,7 +693,7 @@ void *__va_arg(__va_list_struct *ap,  }  #endif /*
__x86_64__ */
 
-#ifdef TCC_TARGET_ARM
+#if defined TCC_TARGET_ARM && !defined __TINYC__
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <sys/syscall.h>

on 2017-02-23.

--
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]