public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eggert at cs dot ucla.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/93644] [10/11 Regression] spurious -Wreturn-local-addr with PHI of PHI Date: Thu, 26 Nov 2020 22:01:40 +0000 [thread overview] Message-ID: <bug-93644-4-yxS2FtTAE3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93644-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644 --- Comment #10 from eggert at cs dot ucla.edu --- The generic workaround that Bruno describes ran into problems in Gnulib, as it's enabled only when compiled with -DGCC_LINT, and some users don't compile it that way. So we now have a more elaborate workaround: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=5a8a1598e1243599feb302f0f75d947553f2918f that causes GCC to issue warnings like the following when the file is not compiled with -DGCC_LINT: careadlinkat.c:58:4: warning: #warning "GCC might issue a bogus -Wreturn-local-addr warning here." [-Wcpp] 58 | # warning "GCC might issue a bogus -Wreturn-local-addr warning here." | ^~~~~~~ careadlinkat.c:59:4: warning: #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." [-Wcpp] 59 | # warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>." | ^~~~~~~ careadlinkat.c: In function ‘careadlinkat’: careadlinkat.c:193:10: warning: function may return address of local variable [-Wreturn-local-addr] 193 | return readlink_stk (fd, filename, buffer, buffer_size, alloc, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 194 | preadlinkat, stack_buf); | ~~~~~~~~~~~~~~~~~~~~~~~ careadlinkat.c:192:8: note: declared here 192 | char stack_buf[STACK_BUF_SIZE]; | ^~~~~~~~~ but obviously this is awkward and it would be better if the bug were fixed.
next prev parent reply other threads:[~2020-11-26 22:01 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93644-4@http.gcc.gnu.org/bugzilla/> 2020-05-11 14:28 ` msebor at gcc dot gnu.org 2020-08-17 21:27 ` bruno at clisp dot org 2020-11-26 22:01 ` eggert at cs dot ucla.edu [this message] 2020-12-17 1:59 ` eggert at cs dot ucla.edu 2020-12-17 2:05 ` eggert at cs dot ucla.edu 2020-12-17 5:52 ` noloader at gmail dot com 2021-02-12 0:55 ` msebor at gcc dot gnu.org 2021-04-27 11:38 ` [Bug middle-end/93644] [10/11/12 " jakub at gcc dot gnu.org 2021-05-03 14:27 ` jochen447 at concept dot de 2021-05-04 12:31 ` rguenth at gcc dot gnu.org 2021-07-28 7:04 ` rguenth at gcc dot gnu.org 2021-10-06 2:01 ` egallager at gcc dot gnu.org 2021-10-06 15:16 ` msebor at gcc dot gnu.org 2022-03-10 4:20 ` grgoffe at yahoo dot com 2022-04-21 7:47 ` rguenth at gcc dot gnu.org 2022-12-13 0:14 ` [Bug middle-end/93644] [10/11/12/13 " egallager at gcc dot gnu.org 2023-05-29 10:02 ` [Bug middle-end/93644] [10/11/12/13/14 " jakub at gcc dot gnu.org 2023-06-15 15:49 ` pinskia at gcc dot gnu.org 2023-06-15 15:49 ` pinskia 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-93644-4-yxS2FtTAE3@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).