* [Bug middle-end/65472] -Wunreachable-code failure
2015-03-19 15:54 [Bug middle-end/65472] New: -Wunreachable-code failure skvadrik at gmail dot com
` (3 preceding siblings ...)
2015-03-19 16:11 ` skvadrik at gmail dot com
@ 2015-03-19 16:13 ` manu at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-19 16:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65472
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
Resolution|FIXED |DUPLICATE
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Ulya from comment #4)
> So GCC's intended behavior is not to warn about unreachable code?
No, but the previous implementation of Wunreachable-code was very broken and
nobody knew how to fix it, thus it was eventually removed. Since then (years
ago!), nobody has offered a new implementation, which perhaps shows that there
is actually little interest in this warning in practice. In the past, we got
more reports about Wunreachable-code bogus warnings than about missed ones.
Unfortunately, there are very few GCC developers working on the C/C++ FEs right
now and they are very busy with other more urgent things, like structural work
and updating to new standards. In addition, implementing this properly in the
FE would need some kind of control-flow graph, which GCC only has in the
middle-end.
BTW, I don't think it is useful to close these reports as INVALID, since they
are in essence requests for a new implementation of -Wunreachable-code. On the
other hand, it is not useful to have a PR for each possible testcase, since as
far as we know, there is no one even planning to work on this, unfortunately.
*** This bug has been marked as a duplicate of bug 46476 ***
>From gcc-bugs-return-480841-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 19 15:54:02 2015
Return-Path: <gcc-bugs-return-480841-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 123370 invoked by alias); 19 Mar 2015 15:54:01 -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 123107 invoked by uid 48); 19 Mar 2015 15:53:54 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/46476] Missing Warning about unreachable code after return
Date: Thu, 19 Mar 2015 16:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.6.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-46476-4-4uyVgIgKV8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-46476-4@http.gcc.gnu.org/bugzilla/>
References: <bug-46476-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg01985.txt.bz2
Content-length: 482
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46476
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |skvadrik at gmail dot com
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 65472 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-480842-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 19 15:58:43 2015
Return-Path: <gcc-bugs-return-480842-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1161 invoked by alias); 19 Mar 2015 15:58:43 -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 1089 invoked by uid 48); 19 Mar 2015 15:58:36 -0000
From: "skvadrik at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/65472] -Wunreachable-code failure
Date: Thu, 19 Mar 2015 16:46: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: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: skvadrik at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: resolution
Message-ID: <bug-65472-4-QG7U3y5XD2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65472-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65472-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg01986.txt.bz2
Content-length: 451
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65472
Ulya <skvadrik at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|DUPLICATE |FIXED
--- Comment #6 from Ulya <skvadrik at gmail dot com> ---
(In reply to Manuel López-Ibáñez from comment #5)
I see. Thank you for a detailed answer. :)
>From gcc-bugs-return-480843-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Mar 19 16:03:24 2015
Return-Path: <gcc-bugs-return-480843-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8554 invoked by alias); 19 Mar 2015 16:03:24 -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 8437 invoked by uid 48); 19 Mar 2015 16:03:15 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/65465] [5 Regression] Internal compiler error: in build2_stIat
Date: Thu, 19 Mar 2015 16:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65465-4-LxUmuuTEKX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65465-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65465-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-03/txt/msg01987.txt.bz2
Content-length: 375
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide465
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
struct A {};
struct B { virtual A foo () const; };
struct C { A foo () const; };
struct D : virtual B { A foo () const {} };
struct F : D { virtual int bar () const; };
int F::bar () const { return 0; }
A C::foo () const { return A (); }
^ permalink raw reply [flat|nested] 6+ messages in thread