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: Subject: Re: Test build of gcc-6.0.1-20160415 From: "Rugxulo (rugxulo AT gmail DOT com) [via djgpp-workers AT delorie DOT com]" To: djgpp-workers AT delorie DOT com Content-Type: multipart/alternative; boundary=001a113aaf06aed8e90530ce6a43 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 Precedence: bulk --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]" 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

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=3Dnonnull-compare]
> =C2=A0 =C2=A0if (str =3D=3D NULL)
> =C2=A0 =C2=A0 =C2=A0 ^
> cc1.exe: all warnings being treated as errors
>
> Inspecting the strlen code, it is clear that the offending code segmen= t is:
>
> =C2=A0 if (str =3D=3D NULL)
> =C2=A0 =C2=A0 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.=C2=A0 If I understood corr= ectly, this
> should only be the case if the function is specified like this:
>
> size_t=C2=A0 strlen(const char *_s) __attribute__ ((__nonnull__ (1)));=
>
> specifying that _s is never NULL, but this is certainly not the case i= n the
> current versions of string.h.
>
> So the question arises if we have to remove all NULL pointer check fro= m our
> code and if this measure is really wise?=C2=A0 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--