public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sam at gentoo dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107730] New: Trivial -Wreturn-type false positive when function marked static Date: Thu, 17 Nov 2022 02:06:49 +0000 [thread overview] Message-ID: <bug-107730-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107730 Bug ID: 107730 Summary: Trivial -Wreturn-type false positive when function marked static Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sam at gentoo dot org Target Milestone: --- Created attachment 53915 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53915&action=edit foo.i ``` #include <unistd.h> static void *poll_logfiles(int n) { for (;;) { sleep(1); } } int main() { poll_logfiles(0); } ``` ``` $ gcc-9.5.0 /tmp/foo.c -Wreturn-type /tmp/foo.c: In function 'poll_logfiles': /tmp/foo.c:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ # 10.4.1_p20221110 $ gcc-10 /tmp/foo.c -Wreturn-type /tmp/foo.c: In function 'poll_logfiles': /tmp/foo.c:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ # 11.3.1_p20221111 $ gcc-11 /tmp/foo.c -Wreturn-type /tmp/foo.c: In function 'poll_logfiles': /tmp/foo.c:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ # 12.2.1_p20221112 $ gcc-12 /tmp/foo.c -Wreturn-type /tmp/foo.c: In function ‘poll_logfiles’: /tmp/foo.c:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ # 13.0.0_pre20221113 $ gcc-13 /tmp/foo.c -Wreturn-type /tmp/foo.c: In function 'poll_logfiles': /tmp/foo.c:7:1: warning: no return statement in function returning non-void [-Wreturn-type] 7 | } | ^ ```
next reply other threads:[~2022-11-17 2:06 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-17 2:06 sam at gentoo dot org [this message] 2022-11-17 2:07 ` [Bug c/107730] " sam at gentoo dot org 2022-11-17 2:10 ` sam at gentoo dot org 2022-11-17 2:27 ` sam at gentoo dot 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-107730-4@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).