public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67629] New: bogus -Wreturn-type in a function with tautological if-else
@ 2015-09-18 15:35 msebor at gcc dot gnu.org
  2021-03-14  3:09 ` [Bug c/67629] " egallager at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-09-18 15:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67629

            Bug ID: 67629
           Summary: bogus -Wreturn-type in a function with tautological
                    if-else
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

While testing Marek's patch for PR 64249 I noticed that both gcc and g++
incorrectly issue a -Wreturn-type warning for the following snippet:

$ cat u.c && xgcc -Wreturn-type -c u.c
int foo (_Bool a) {
    if (a) return 0;
    else if (!a) return 1;
}
u.c: In function ‘foo’:
u.c:4:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
>From gcc-bugs-return-497524-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 18 16:28:29 2015
Return-Path: <gcc-bugs-return-497524-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16703 invoked by alias); 18 Sep 2015 16:28:29 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16626 invoked by uid 55); 18 Sep 2015 16:28:23 -0000
From: "uros at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67619] ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425
Date: Fri, 18 Sep 2015 16:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: uros at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ubizjak at gmail dot com
X-Bugzilla-Target-Milestone: 4.9.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-67619-4-xOggqSYdfc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67619-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67619-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg01502.txt.bz2
Content-length: 619

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg619

--- Comment #2 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Sep 18 16:27:51 2015
New Revision: 227909

URL: https://gcc.gnu.org/viewcvs?rev"7909&root=gcc&view=rev
Log:
        PR middle-end/67619
        * except.c (expand_builtin_eh_return): Use copy_addr_to_reg to copy
        the address to a register.

testsuite/ChangeLog:

        PR middle-end/67619
        * gcc.dg/torture/pr67619.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr67619.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/except.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/67629] bogus -Wreturn-type in a function with tautological if-else
  2015-09-18 15:35 [Bug c/67629] New: bogus -Wreturn-type in a function with tautological if-else msebor at gcc dot gnu.org
@ 2021-03-14  3:09 ` egallager at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-03-14  3:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67629

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |mwoehlke.floss at gmail dot com,
                   |                            |skvadrik at gmail dot com

--- Comment #10 from Eric Gallager <egallager at gcc dot gnu.org> ---
Redoing some ccs that mysteriously disappeared without being marked as
"removed" in the bug history (guessing it was from the server migration)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-14  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18 15:35 [Bug c/67629] New: bogus -Wreturn-type in a function with tautological if-else msebor at gcc dot gnu.org
2021-03-14  3:09 ` [Bug c/67629] " egallager at gcc dot gnu.org

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).