www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2016/04/24/15:52:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <571D24D5.4030105@gmx.de>
Date: Sun, 24 Apr 2016 21:56:05 +0200
From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Test build of gcc-6.0.1-20160415
References: <5713789D DOT 8070708 AT iki DOT fi> <57152494 DOT 6040808 AT gmx DOT de> <57154DC1 DOT 2080907 AT iki DOT fi> <5717FF70 DOT 3020801 AT gmx DOT de> <57184BDE DOT 5050901 AT iki DOT fi> <571D0950 DOT 50907 AT iki DOT fi> <201604241810 DOT u3OIA17t003694 AT envy DOT delorie DOT com>
In-Reply-To: <201604241810.u3OIA17t003694@envy.delorie.com>
X-Provags-ID: V03:K0:2wByQeE5aKKxm2TwlYAIRhqt/DflXSyJNokr6wS1oi8ENIs3DbL
rhEDP6cSUBpghzq/LkZ9De6jLu+renx9Uzu3iPnvPHWabeYzPfwIOvo0256wp5ogsGhjjY8
3Y9tdK1yKoJVcTXRXyeRdTVzlQEZFD75F8Sma+S6YXMAUqCCgNEqLqqZL6rDaE2GHkK7Hye
FmGwbrBvo8Xx4nhiyAbcQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:jG8QOsedCaA=:EqeCjKoS5nilikENDKZAzF
qGg03rOkAQ6AhXUMpL/Z1cJDb0ZYcvSfTVbHfMH08EpGanCsMcDYE97l+oT4/l9OCC4eB8x4/
UmSWczH27rCXDqkjQfahSMlZVetkMGek971P50foxAg0HdKPy9abbKZ6abQzo6mI2ngl1YBOR
FHhDR9MyTi5/IpRmvUE0VyOIhqoFuuEZa4Nt+JOz+/umlibiZp/Ib/v8WVH3prYMnPgx62XPx
KyUQfvLIKdbVom2J2GR0R6Tn2EBLTjkfwwrX5ENsEL6DEH3z9sOZljiH8/Z4XyHNiiHTwLG1q
NeaiPgUAPOoMWxzMCHZOJ9j1VUYyHbU3Xbk5IEmF1Q5FEizUBvYm6EELhyyZAdcxZRHqct9yW
gof8+fURaN4jLHfd1aw3VQIlhlDvNwIRq44SFMTTBAbDgemEa4jLvAuAI9GDPmJo0xWnkmMOh
9WrmkirLlv81LN2VoXchCi4a4NaVOlXP8+EX111aHawreinboHMLqsHgtrIEgHoXgTekY/RWW
l3iv26w0rIEK245ixrDG1Bi4vTYjE8ykM+BTblagtcZFqaW4NE1/eVKUrIXEhpEpywo7kPSHp
xeHpIvU65NS0mRXCT06qab3bFHuY/nSOGtCmX4EucXjPILUpYsxcQNsi8uxi77barl0DbiLvU
tV8diwCHuMBRPNqjof1LvjfF/FjSB2jaRIochHqJ0bn1BQy9FBNCTbanrhXOmH/sOnJU0Orgl
ejH+VzuhL66pPDdiKRmEILjBCCGBJY6pOYRDMYyaD8IuOWUl0218rTIvtswVWb4E8kgYGThxA
9tHhoQ5
Reply-To: djgpp-workers AT delorie DOT com

Am 24.04.2016 19:58, schrieb Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com]:
 > On 04/21/2016 06:41 AM, Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com] wrote:
 >> On 04/21/2016 01:15 AM, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-workers AT delorie DOT com] wrote:
 >>> Am 18.04.2016 23:12, schrieb Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com]:
 >>>> On
 >>>
 >>> The patch below is a proposition how the -Werror=nonnull-compare issue could be
 >>> handled. The patch has intentionaly not been committed because there may be
 >>> multiple ways to fix this issue. I have intentionaly prefered the way using
 >>> all the different -fno-builtin-* flags. This way we see about what we are
 >>> warned and what we are intentionaly ignoring. I have no preferences and if
 >>> someone else disigns a smarter or different fix, feel free to discard this
 >>> approach.
 >>>
 >>>
 >>> Regards,
 >>> Juan M. Guerrero
 >>>
 >>>
 >>>
 >>> 2016-04-20 Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
 >>>
 >>> * djgpp/src/makefile.cfg: Fixing -Werror=nonnull-compare for gcc 6.0.1.
 >>>
 >>>
 >>>
 >> - I guess it would be better to avoid using -fno-builtin-* globally, but only where required
 >>
 >> - there seems to be no need to protect for old GCC versions as documented behavior of gcc is to ignore
 >> -fno-builtin-foobar when it does not have __builtin_foobar. Tried under Linux (both gcc-5.3 and 3.4.6 provided with Fedora 23 behave this way).
 >>
 >> - one could use simple -fno-builtin for small source files like strlen.c where there is actually one built involved (easier to maintain in future
 >
 > Tried variant with --fno-builtin-*
 > - gcc-6.0.1-20160415 (cross-compiling from Linux)
 > - gcc-3.4.6 (in WIndows 10 Home 32 bit VM under Linux)
 >
 > No additional problems detected (except that gcc-l.opt, gcc.opt and gcc.opt were included in DJGPP source archive and as result gcc-3.4.6 complained about use of -iquote. Fixed that in trunk.
 >
 > Andris
 >
[snip]


Am 24.04.2016 20:10, schrieb DJ Delorie:
> FYI I spoke with some of the other gcc maintainers at work, and they
> agree that disabling the builtins (like we're doing) is the right
> solution.

I inspected how these particular functions are handled in cygwin and glibc and
no one of both libraries check for NULL pointer argument at all.  If we do check
for NULL pointer only because BORLAND compiler behaved in a similar manner,
then I think that that is a nostalgical reason nowadays.  Keeping BORLAND
compatibility should not be the motivation IMHO.  If it is really BORLAND
compatibility I would seriously suggest to remove the NULL pointer check from
all functions where the standard does not impose them.  But please note that
this is only my opinion and that I have no real preference how this issue is
resolved.


> Alternately, we could tell gcc we're a freestanding implementation (no
> builtins or assumptions) but we lose some of gcc's optimizations :-(
In that case, I assume that this is only a hypothetical alternative.

Regards,
Juan M. Guerrero

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019