public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "siddhesh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107038] Bogus -Wstringop-overflow in dead code Date: Fri, 07 Oct 2022 19:08:38 +0000 [thread overview] Message-ID: <bug-107038-4-hfSGafNiz9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107038-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107038 --- Comment #8 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> --- I forgot to mention that I've been building with: gcc/cc1 -o /dev/null ../bogus-stringop-overflow.i -O2 -Werror=stringop-overflow -quiet to reproduce the warning: ../bogus-stringop-overflow.i: In function ‘elf_begin_rand’: ../bogus-stringop-overflow.i:35:19: error: ‘foo_alias’ writing 14 or more bytes into a region of size 10 overflows the destination [-Werror=stringop-overflow=] 35 | ret = foo_alias (buf, nbytes, offset); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../bogus-stringop-overflow.i:14:8: note: destination object ‘ar_size’ of size 10 14 | char ar_size[10]; | ^~~~~~~ ../bogus-stringop-overflow.i:8:16: note: in a call to function ‘foo_alias’ declared with attribute ‘access (write_only, 1, 2)’ 8 | extern ssize_t foo_alias (void *buf, size_t nbytes, off_t offset) | ^~~~~~~~~ cc1: some warnings being treated as errors
next prev parent reply other threads:[~2022-10-07 19:08 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-26 8:36 [Bug tree-optimization/107038] New: [13 Regression] Bogus -Wstringop-overflow= since r13-2789-gb40b3035879cf695 marxin at gcc dot gnu.org 2022-09-26 9:30 ` [Bug tree-optimization/107038] " rguenth at gcc dot gnu.org 2022-09-26 14:29 ` siddhesh at gcc dot gnu.org 2022-09-26 14:31 ` marxin at gcc dot gnu.org 2022-09-26 16:16 ` msebor at gcc dot gnu.org 2022-09-26 18:32 ` siddhesh at gcc dot gnu.org 2022-09-26 18:41 ` siddhesh at gcc dot gnu.org 2022-09-26 19:16 ` marxin at gcc dot gnu.org 2022-10-07 19:06 ` [Bug tree-optimization/107038] Bogus -Wstringop-overflow in dead code siddhesh at gcc dot gnu.org 2022-10-07 19:08 ` siddhesh at gcc dot gnu.org [this message] 2022-10-07 19:09 ` siddhesh at gcc dot gnu.org 2023-04-26 6:56 ` rguenth at gcc dot gnu.org 2023-07-27 9:23 ` rguenth at gcc dot gnu.org
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-107038-4-hfSGafNiz9@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).