public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "m.novosyolov at rosalinux dot ru" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os Date: Mon, 09 Jan 2023 20:19:01 +0000 [thread overview] Message-ID: <bug-29979-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29979 Bug ID: 29979 Summary: Some -Wmaybe-uninitialized are needed on x86_32 without -Os Product: glibc Version: 2.36 Status: UNCONFIRMED Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: m.novosyolov at rosalinux dot ru CC: carlos at redhat dot com Target Milestone: --- I had to make the following patch to build glibc 2.36 (release/2.36/master, 4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c) on x86_32 (i686). Other arches (x86_64, aarch64, riscv64) did not require this change). --- a/locale/weight.h +++ b/locale/weight.h @@ -144,7 +144,7 @@ is impossible for the same reason as described above. */ DIAG_PUSH_NEEDS_COMMENT; - DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); + DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); offset += usrc[cnt] - cp[cnt]; DIAG_POP_NEEDS_COMMENT; } --- a/locale/weightwc.h +++ b/locale/weightwc.h @@ -102,7 +102,7 @@ might be used uninitialized. This is impossible for the same reason as described above. */ DIAG_PUSH_NEEDS_COMMENT; - DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); + DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized"); for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt) if (cp[cnt] != usrc[cnt]) break; --- a/string/strcoll_l.c +++ b/string/strcoll_l.c @@ -180,7 +180,7 @@ ensures that seq->save_idx was saved to first and contains a valid value. */ DIAG_PUSH_NEEDS_COMMENT; - DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); + DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); len = weights[idx++]; DIAG_POP_NEEDS_COMMENT; /* Skip over indices of previous levels. */ Comments near patched code write about -Os, but I was building without -Os Full command line and error (errors were similar for other patched cases): DEBUG: gcc -fuse-ld=bfd -fomit-frame-pointer strcoll_l.c -c -std=gnu11 -fgnu89-inline -funwind-tables -fasynchronous-unwind-tables -O3 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -march=i686 -mtune=generic -msse -mfpmath=sse -fasynchronous-unwind-tables -mstackrealign -march=i686 -msse -mfpmath=sse -mtune=generic -Wp,-D_GLIBCXX_ASSERTIONS -DNDEBUG=1 -fstack-clash-protection -O3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -march=i686 -mtune=generic -msse -mfpmath=sse -fasynchronous-unwind-tables -mstackrealign -O3 -Wno-error=stringop-overflow -fno-strict-aliasing -Wformat -fno-lto -mno-tls-direct-seg-refs -Wno-error -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector-strong -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno -fomit-frame-pointer -fomit-frame-pointer -fpie -ftls-model=initial-exec -U_FORTIFY_SOURCE -I../include -I/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string -I/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch -I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu -I../sysdeps/i386 -I../sysdeps/x86/include -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i686-rosa-linux-gnu/11.2.0/include -isystem /usr/include -D_LIBC_REENTRANT -include /builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o -MD -MP -MF /builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o.dt -MT /builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o DEBUG: In file included from strcoll_l.c:42: DEBUG: strcoll_l.c: In function '__strcoll_l': DEBUG: ../locale/weight.h:148:33: error: 'seq2.back_us' may be used uninitialized in this function [-Werror=maybe-uninitialized] DEBUG: 148 | offset += usrc[cnt] - cp[cnt]; DEBUG: | ~~~~^~~~~ -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-01-09 20:19 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-09 20:19 m.novosyolov at rosalinux dot ru [this message] 2023-01-09 20:22 ` [Bug build/29979] " m.novosyolov at rosalinux dot ru 2023-01-12 13:31 ` adhemerval.zanella at linaro dot org 2023-01-12 18:38 ` m.novosyolov at rosalinux dot ru
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29979-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).