[Bug localedata/24950] New: Top-of-tree glibc does not build with top-of-tree GCC (stringop-overflow error)

sje at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Aug 29 18:59:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=24950

            Bug ID: 24950
           Summary: Top-of-tree glibc does not build with top-of-tree GCC
                    (stringop-overflow error)
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: sje at gcc dot gnu.org
                CC: libc-locales at sourceware dot org
  Target Milestone: ---

This bug is discussed at
https://sourceware.org/ml/libc-alpha/2019-08/msg00774.html.  The GCC folks
think that the Glibc sources should be changed to avoid this warning/error.


>From email string:

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.


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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libc-locales mailing list