X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607647417; bh=wPshgJiEWSbVPBiFUKK9FwWnKo8lD7ocbTDqk2yFRio=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=BEKnv3G02quo4/lMqbaWpaFRD4LGyg8rY8vl2XTl3JbxTLQbNrIIbMUTI4Lm/beYU dYQpXaWKKC4SD9n6S1qpGJ+BII34c9d9eY0a2XMIHLBn9q+hsr71XS/Djk6fiLIBiN pGSujUjO4zlYYv7y336ox/RWkPsGYhhorZvKp7wA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Message-ID: <5FD2C0B9.8080208@gmx.de> Date: Fri, 11 Dec 2020 01:43:37 +0100 From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp 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 AT delorie DOT com Subject: Re: Difficulties compiling libc from repository using gcc 10.N.0 References: <5FD1FEA1 DOT 7010304 AT gmx DOT de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:83BxScyK0GqhXukN31N5Km9Fw7ExIDUzCezcvx9BdpSNfRhubXg G4BHujggZDGf410DHRatnav17bi/WTvaftftnP+rJb6/l2gDiKsph8Z1fkqJyyuUf+aisB6 PWzFctFFjhRjZ0vuwswFN/iCxZtUMa/sCg6n085yt9uBfUX2z6prGnXipzR4RjiA/l2/04B oeya6Gbo9NjcoJd0tcwUA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3hP2r1ahYqY=:fx2Lr/oyF8qwOrlOi7fWjA v2nm7Cz3LWWVzHCJNCOW0vTWcObZqqWdQyMzxr0qUlIQA6KorFZgYhVbh0hoO7iCzbNe4I+dt 2IaApkFaI4d6VDLpxt+C6mMEP1JCw0y5+7BDbtPdkCbLYkhXcGdTJgr3AQQGnHryS1Eehu2BB IPKm2UOTljBmrkhJKyU/LJHFh444Bw2bEETamOkklIuSAEEtEi5cFY2YVEzfRNQUTde3rBYA4 h+z14+ygVMb9MN0+CFpDXHGL2/NqeYlM55t72my4LEfzBT37CE1Mt+VOyBgEfgYiZqbVF+6JD ns/t7I22m48WUG8jsfiIiUXQKTAyt2ne7lEhlSSeFGVyqLTpFhnnOr/3PsFLBaSsWjW6RN66u sSavIfen/CPDei0hDAo9iCmReKf6x/+kraGM3fqZ4QVFvNLESYrRk1XdJtqNdLlhoDrq1sQKt qwpR7qf3nPZbfrfZJrnLKsa4yO/Ta5GFLgKbcDFcVbf9EdLbQGpO6zJ/nDq1VY0Bsoy/pxTqJ Z+8m3VgwUlqwF3e86mD4KutnfVkg0lXuYD/YIi4W5qeg1fF4XpKz6rZ0kYFHoCwSsMYlSWz1D 1IVrgPNj9QtAhpbD3Gk0hje7jKW3BFrHSHGtvzSzr0KqmhbHHEMr7iu3vxcP1wEbJT2nco+XG 1PF7etyLkq55Z7YrnFzmMVNKzzpn1ihpc29qq7ncB8uK3Z39bUjLp9GeL/hnzIfW987MSQCN+ p2Fm80YaM0gHB/GHH1x92CcZDxM9f2uC5sGBwwxw+DpIi3P7i3VXDAIy9+OB8egeIqxneKmAj IjqJzdZX8w1GnV/jIibjmWXpiZlGG0VYzxpjn1MTdYk94PhxktkCNWNxfvK6zY0bdqcOL/VVP ZqD7yOGL3B4GpP8U8Uhw== Reply-To: djgpp AT delorie DOT com Am 10.12.2020 22:39, schrieb Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]: > On 12/10/20, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via > djgpp AT delorie DOT com] wrote: >> d:/djgpp/include/io.h: In function '_chmod': >> _chmod.c:28:14: warning: array subscript 1 is outside array bounds of >> 'int[1]' [-Warray-bounds] >> 28 | r.x.cx = *(&func + 1); /* Value to set */ >> | ^~~~~~~~~~~~ >> _chmod.c:14:34: note: while referencing 'func' >> 14 | _chmod(const char *filename, int func, ...) >> | ~~~~^~~~ >> >> The -Warray-bounds appears quite a lot due to our way to address >> neighborhood variables as can >> be seen in the example above. May be some with some spare time can fix >> these occurencies. > > As far as I can see, this particular case is intending this > using a nasty shortcut? What is today a nasty shortcut was a cool one 30 years ago. > > --- _chmod.c~ > +++ _chmod.c > @@ -9,7 +9,8 @@ > #include > #include > #include > - > +#include > + > int > _chmod(const char *filename, int func, ...) > { > @@ -25,7 +26,12 @@ _chmod(const char *filename, int func, . > r.x.ax = 0x4300 + func; > _put_path(filename); > if (func == 1) > - r.x.cx = *(&func + 1); /* Value to set */ > + { > + va_list ap; > + va_start (ap, func); > + r.x.cx = va_arg(ap, int); /* Value to set */ > + va_end (ap); > + } > r.x.dx = __tb_offset; > r.x.ds = __tb_segment; > __dpmi_int(0x21,&r); > > Correct? Any others like this? Looks ok to me. Will do the job; alternatively we would have to disable that check. Regards, Juan M. Guerrero