This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: ToT glibc build problem with ToT GCC
- From: Jeff Law <law at redhat dot com>
- To: Steve Ellcey <sellcey at marvell dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: "msebor at redhat dot com" <msebor at redhat dot com>
- Date: Thu, 29 Aug 2019 10:31:26 -0600
- Subject: Re: ToT glibc build problem with ToT GCC
- References: <486309d08583ed1c27a001d946205850b421f7ad.camel@marvell.com>
On 8/29/19 10:26 AM, Steve Ellcey wrote:
> I am building the latest glibc with the latest GCC and getting an error.
> I see where, in locale/programs/charmap.h we declare bytes as a zero
> length array in charseq but I am not sure where the write in
> locale/programs/ld-ctype.c is. The only line references that GCC seems
> to be outputing refer to the declaration, not the use.
>
> Is anyone else seeing this? Any ideas on what we should be changed?
> The declaration? The use? Or is this a bogus warning from GCC that
> we want to ignore? I think that GCC is reporting this now due to Martin
> Sebor's GCC patch for PR 83431 but I haven't verified that.
>
> Steve Ellcey
> sellcey@marvell.com
>
>
>
> cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
> In file included from programs/repertoire.h:24,
> from programs/localedef.h:32,
> from programs/ld-ctype.c:35:
> programs/charmap.h:63:17: note: destination object declared here
> 63 | unsigned char bytes[0];
> | ^~~~~
> cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
> programs/charmap.h:63:17: note: destination object declared here
> cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
> programs/charmap.h:63:17: note: destination object declared here
> cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
> programs/charmap.h:63:17: note: destination object declared here
> cc1: all warnings being treated as errors
> ../o-iterator.mk:9: recipe for target '/home/sellcey/tot/obj/glibc64/locale/ld-ctype.o' failed
> make[2]: *** [/home/sellcey/tot/obj/glibc64/locale/ld-ctype.o] Error 1
>
I've already been discussing this with Carlos internally. The code
works, but is a bit fishy. Not sure what the resolution will be yet,
but we're definitely aware of it.
jeff