delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
X-Recipient: | djgpp-workers AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20120113; | |
h=mime-version:in-reply-to:references:date:message-id:subject:from:to; | |
bh=IAv3joNZalIuB2M5aqFycqokutoaQC2dc+2oD84UCBU=; | |
b=IOvo9NmCEBx2zVUjPQAdI/npnKNIpHdX1wmJqoj1De6Ek+/0YuH1A6jqlVfMbFA1SM | |
vwd0j7otq0Ib84xVp4LRtLzDBVSW8fUIPGooS+tvbxUKJK9QLcVrtez2eKHBRn72il2X | |
Fg6/BsxGkN6RSQFahE2RTCV3jctzGXa68qXwJS8+u5KDsxzOIQY7xAqGXuH5xNjprGz9 | |
wP9UEDq+b2FZamkyhkl/QX+L1opRiXNAKu6VAIRVTP9vPBMnNWnkQ3QlREgP9WZPeOgA | |
1m3Ot44zDvIwJyM9weWNWbLK8wf8EhAyQUcUx8+4e41hIpivnEfDx6VALJuLVV2+S3ZK | |
o2OQ== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20130820; | |
h=x-gm-message-state:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to; | |
bh=IAv3joNZalIuB2M5aqFycqokutoaQC2dc+2oD84UCBU=; | |
b=TjSnQJ1GLw+65tBtDfo0ET9I8yDhClV9+ZedRKF01tU9xXKsTVGkOzdnAQDgBVHg/7 | |
f2uCPUTeXmRDEVqx/gcpWJchvjV0eKLfR5QmsYN1ErSaZtUWumqb7x8pMm1kmHA5U3rr | |
Ss11HKjqr3I4UwemDWAevwfxGuRyo8MRSKTsh4vdzDszivGmjrHvOQNkDZs6OSBltI1U | |
30JQb4kswgqunu0f6ryIfReSqaczWbOYuYrn/RAxUQTX0gkq6oRHjH7cs+jg3YrCmJKI | |
TJn7WUu91ziTFWGRuW05AuChSwS2NbFK7hQ23XeZS88kZjqoJZ5CEOclT9LItW0wAZTG | |
bgMw== | |
X-Gm-Message-State: | AOPr4FX8vjm+y6qZau9GEtby3rKAlPB/ElMuwVYkq2FzLLUCqqkYBZFBXt4kh5f+7LTVZEAGiJECCcZ2JmvTjA== |
MIME-Version: | 1.0 |
X-Received: | by 10.25.34.202 with SMTP id i193mr305169lfi.117.1461037994791; |
Mon, 18 Apr 2016 20:53:14 -0700 (PDT) | |
In-Reply-To: | <57152494.6040808@gmx.de> |
References: | <5713789D DOT 8070708 AT iki DOT fi> |
<57152494 DOT 6040808 AT gmx DOT de> | |
Date: | Mon, 18 Apr 2016 22:53:14 -0500 |
Message-ID: | <CAA-ihx-FZgmD1-mB5q-P8C9SBUhjS2UUOibYqGoFvuTxNMc3Cw@mail.gmail.com> |
Subject: | Re: Test build of gcc-6.0.1-20160415 |
From: | "Rugxulo (rugxulo AT gmail DOT com) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com> |
To: | djgpp-workers AT delorie DOT com |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
--001a113aaf06aed8e90530ce6a43 Content-Type: text/plain; charset=UTF-8 Hi, On Apr 18, 2016 1:26 PM, "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-workers AT delorie DOT com]" <djgpp-workers AT delorie DOT com> wrote: > > Am 17.04.2016 13:50, schrieb Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp-workers AT delorie DOT com]: >> >> gcc-6.1.0 should not be very far any more: > > I have tried to build libc from repository using g[cc|pp]601_20160415b.zip. > It fails with the following error message: > > gcc ... -c strlen.c > strlen.c: In function 'strlen': > strlen.c:10:6: error: nonnull argument 'str' compared to NULL [-Werror=nonnull-compare] > if (str == NULL) > ^ > cc1.exe: all warnings being treated as errors > > Inspecting the strlen code, it is clear that the offending code segment is: > > if (str == NULL) > return 0; > > It seems to be that for some reason, the compiler does assume that the passed > argument to the function can never be NULL. If I understood correctly, this > should only be the case if the function is specified like this: > > size_t strlen(const char *_s) __attribute__ ((__nonnull__ (1))); > > specifying that _s is never NULL, but this is certainly not the case in the > current versions of string.h. > > So the question arises if we have to remove all NULL pointer check from our > code and if this measure is really wise? IMHO, we should adjust the compiler > checks in such a way that NULL pointer checks are still possible. Am I naive or can't you use -fno-delete-null-pointer-checks ?? --001a113aaf06aed8e90530ce6a43 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p>Hi,</p> <p>On Apr 18, 2016 1:26 PM, "Juan Manuel Guerrero (<a href=3D"mailto:j= uan DOT guerrero AT gmx DOT de">juan DOT guerrero AT gmx DOT de</a>) [via <a href=3D"mailto:djgpp= -workers AT delorie DOT com">djgpp-workers AT delorie DOT com</a>]" <<a href=3D"m= ailto:djgpp-workers AT delorie DOT com">djgpp-workers AT delorie DOT com</a>> wrote:<b= r> ><br> > Am 17.04.2016 13:50, schrieb Andris Pavenis (<a href=3D"mailto:andris.= pavenis AT iki DOT fi">andris DOT pavenis AT iki DOT fi</a>) [via <a href=3D"mailto:djgpp-wor= kers AT delorie DOT com">djgpp-workers AT delorie DOT com</a>]:<br> >><br> >> gcc-6.1.0 should not be very far any more:<br> ><br> > I have tried to build libc from repository using g[cc|pp]601_20160415b= .zip.<br> > It fails with the following error message:<br> ><br> > gcc ... -c strlen.c<br> > strlen.c: In function 'strlen':<br> > strlen.c:10:6: error: nonnull argument 'str' compared to NULL = [-Werror=3Dnonnull-compare]<br> > =C2=A0 =C2=A0if (str =3D=3D NULL)<br> > =C2=A0 =C2=A0 =C2=A0 ^<br> > cc1.exe: all warnings being treated as errors<br> ><br> > Inspecting the strlen code, it is clear that the offending code segmen= t is:<br> ><br> > =C2=A0 if (str =3D=3D NULL)<br> > =C2=A0 =C2=A0 return 0;<br> ><br> > It seems to be that for some reason, the compiler does assume that the= passed<br> > argument to the function can never be NULL.=C2=A0 If I understood corr= ectly, this<br> > should only be the case if the function is specified like this:<br> ><br> > size_t=C2=A0 strlen(const char *_s) __attribute__ ((__nonnull__ (1)));= <br> ><br> > specifying that _s is never NULL, but this is certainly not the case i= n the<br> > current versions of string.h.<br> ><br> > So the question arises if we have to remove all NULL pointer check fro= m our<br> > code and if this measure is really wise?=C2=A0 IMHO, we should adjust = the compiler<br> > checks in such a way that NULL pointer checks are still possible.</p> <p>Am I naive or can't you use -fno-delete-null-pointer-checks ??<br> </p> --001a113aaf06aed8e90530ce6a43--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |