public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "chris at bubblescope dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/31246] Strange -Wunreachable-code warning with _GLIBCXX_DEBUG Date: Sat, 17 Mar 2007 18:07:00 -0000 [thread overview] Message-ID: <20070317180718.13751.qmail@sourceware.org> (raw) In-Reply-To: <bug-31246-1902@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from chris at bubblescope dot net 2007-03-17 18:07 ------- Here is a minimal code example: #include <new> int* get_ptr(void* ptr) { return new(ptr) int(); } Which gives (on my computer) /usr/include/c++/4.0.0/new: In function 'int* get_ptr(void*)': /usr/include/c++/4.0.0/new:94: warning: will never be executed But a similar problem exists in much of the templated code, and in general. The real problem I think here is that the system_header pragma is still broken for templates. If that was fixed, this warning would go away. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246
next prev parent reply other threads:[~2007-03-17 18:07 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-17 16:38 [Bug libstdc++/31246] New: " sylvain dot pion at sophia dot inria dot fr 2007-03-17 16:58 ` [Bug libstdc++/31246] " pinskia at gcc dot gnu dot org 2007-03-17 17:27 ` sylvain dot pion at sophia dot inria dot fr 2007-03-17 17:46 ` chris at bubblescope dot net 2007-03-17 18:07 ` chris at bubblescope dot net [this message] 2007-03-17 20:41 ` pcarlini at suse dot de 2007-03-17 20:48 ` [Bug c++/31246] " pcarlini at suse dot de 2007-03-17 23:35 ` gdr at cs dot tamu dot edu 2007-03-18 5:38 ` pinskia at gcc dot gnu dot org 2007-03-19 13:56 ` manu at gcc dot gnu dot org 2007-03-19 15:19 ` gdr at cs dot tamu dot edu 2007-03-19 22:31 ` pinskia at gcc dot gnu dot org 2007-03-19 22:45 ` Gabriel Dos Reis 2007-03-19 22:45 ` gdr at cs dot tamu dot edu 2007-03-19 23:13 ` manu at gcc dot gnu dot org 2007-03-19 23:19 ` pinskia at gcc dot gnu dot org 2007-03-19 23:35 ` manu at gcc dot gnu dot org 2007-03-19 23:40 ` gdr at cs dot tamu dot edu 2007-03-19 23:43 ` pcarlini at suse dot de 2008-08-23 16:00 ` manu at gcc dot gnu dot org 2008-08-23 16:02 ` manu at gcc dot gnu dot org 2008-08-23 16:14 ` manu at gcc dot gnu dot org 2008-08-23 16:23 ` manu at gcc dot gnu dot org 2008-08-23 17:25 ` manu at gcc dot gnu dot org 2008-08-23 18:44 ` paolo dot carlini at oracle dot com 2008-08-23 18:46 ` [Bug c++/31246] Strange -Wunreachable-code warnings paolo dot carlini at oracle dot com 2008-08-23 18:51 ` [Bug c++/31246] -Wunreachable-code warnings for compiler-generated code manu at gcc dot gnu dot org 2008-08-26 5:46 ` gdr at integrable-solutions dot net 2008-10-22 8:36 ` manu at gcc dot gnu dot org 2009-02-07 21:07 ` manu at gcc dot gnu dot org 2009-07-07 22:19 ` manu at gcc dot gnu dot org 2009-07-07 22:20 ` manu at gcc dot gnu 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=20070317180718.13751.qmail@sourceware.org \ --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).