public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109449] [11/12/13 Regression] false positive stringop-overflow Date: Thu, 13 Apr 2023 07:19:52 +0000 [thread overview] Message-ID: <bug-109449-4-4GuRCrbdPU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109449-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109449 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- As expected that causes FAIL: c-c++-common/Wstringop-truncation.c -std=gnu++98 bug 77293 (test for warn ings, line 271) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, lin e 49) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, lin e 50) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, lin e 51) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, lin e 55) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, line 56) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, line 57) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, line 61) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, line 62) FAIL: g++.dg/warn/Wplacement-new-size-7.C -std=gnu++98 (test for warnings, line 63) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 28) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 29) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 30) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 50) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 51) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 52) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 53) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 127) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 128) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 129) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 131) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 132) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 135) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 136) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 137) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 139) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 140) FAIL: gcc.dg/Wstringop-overflow-37.c note (test for warnings, line 194) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 195) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 213) FAIL: gcc.dg/Wstringop-overflow-37.c note (test for warnings, line 230) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 231) FAIL: gcc.dg/Wstringop-overflow-37.c note (test for warnings, line 236) FAIL: gcc.dg/Wstringop-overflow-37.c (test for warnings, line 237) FAIL: gcc.dg/Wstringop-overflow-37.c (test for excess errors) FAIL: gcc.dg/Wstringop-overflow-40.c (test for warnings, line 103) FAIL: gcc.dg/Wstringop-overflow-40.c (test for excess errors) FAIL: gcc.dg/pr56837.c scan-tree-dump-times optimized "memset ..c, 68, 16384.;" 1 FAIL: gcc.dg/warn-strnlen-no-nul.c (test for warnings, line 150) FAIL: gcc.dg/warn-strnlen-no-nul.c (test for warnings, line 154) FAIL: c-c++-common/Wstringop-truncation.c -Wc++-compat bug 77293 (test for warnings, line 271) as those all explicitely test for this "misbehavior" (aka _FORTIFY_SOURCE=2). Note -Wstringop-overflow=1 diagnoses this the same. The workaround in the source would be to use for example uint8_t *tdp = (uint8_t *)drlg.transDirMap; or simply use two-dimensional array accesses directly to transDirMap. So as a summary, the diagnostic works this way by design (a design not everyone agrees to, me included, esp. for the case of multidimensional arrays).
next prev parent reply other threads:[~2023-04-13 7:19 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-08 7:35 [Bug middle-end/109449] New: " pionere at freemail dot hu 2023-04-08 21:37 ` [Bug middle-end/109449] " pinskia at gcc dot gnu.org 2023-04-08 21:40 ` pinskia at gcc dot gnu.org 2023-04-09 6:32 ` pionere at freemail dot hu 2023-04-12 13:54 ` [Bug middle-end/109449] [11/12/13 Regression] " rguenth at gcc dot gnu.org 2023-04-13 7:19 ` rguenth at gcc dot gnu.org [this message] 2023-05-29 10:08 ` [Bug middle-end/109449] [11/12/13/14 " jakub 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-109449-4-4GuRCrbdPU@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).