public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/7189: gcc -O2 -Wall does not print ``control reaches end of non-void function'' warning Date: Sat, 01 Mar 2003 00:36:00 -0000 [thread overview] Message-ID: <20030301003601.25417.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/7189; it has been noted by GNATS. From: Richard Henderson <rth@redhat.com> To: Steven Bosscher <s.bosscher@student.tudelft.nl> Cc: gcc-gnats@gcc.gnu.org, am-99173@konami.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org Subject: Re: optimization/7189: gcc -O2 -Wall does not print ``control reaches end of non-void function'' warning Date: Fri, 28 Feb 2003 16:29:13 -0800 On Thu, Feb 13, 2003 at 10:04:14PM +0100, Steven Bosscher wrote: > One way to "fix" this bug is to move check_function_return_warnings() up > to before sibling call optimization in toplev.c, but maybe there's a > more correct fix? I don't really like doing this earlier. To get correct results we'd have to do an extra DCE pass, which seems wasteful wrt compile-time for a warning. We should be able to detect this by looking at (1) predecessors of the EXIT block, (2) noticing that they end in a call_insn with SIBLING_CALL_P set, and (3) noticing that the return value embedded in the call_insn is correct for the return value of the function. r~
next reply other threads:[~2003-03-01 0:36 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-03-01 0:36 Richard Henderson [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-03-02 21:06 Richard Henderson 2003-03-01 22:56 Steven Bosscher 2003-03-01 0:36 Richard Henderson 2003-02-13 21:06 Steven Bosscher 2003-02-13 15:36 Steven Bosscher 2002-07-02 21:06 am-99173
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=20030301003601.25417.qmail@sources.redhat.com \ --to=rth@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).