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: Vincent Lefevre
Subject: Re: [Tinycc-devel] Annoying new warning
Date: Tue, 2 May 2017 15:25:46 +0200
User-agent: Mutt/1.8.2-7019-vl-r97300 (2017-04-18)

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)



reply via email to

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