This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71943] Wreturn-type when combining destructor + return + __noreturn__ function
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jul 2016 10:25:27 +0000
- Subject: [Bug c++/71943] Wreturn-type when combining destructor + return + __noreturn__ function
- Auto-submitted: auto-generated
- References: <bug-71943-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71943
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think it is fine to warn, -Wreturn* warning is done early before
optimizations (intentionally), so unreachable code that might not be yet
optimized away yet may confuse it. Don't put unreachable code after return and
the warning will go away.