public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49508] New: [4.7 Regression] Bogus "control reaches end of non-void function" warning
@ 2011-06-22 21:11 paolo.carlini at oracle dot com
  2011-06-23  8:44 ` [Bug c++/49508] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-06-22 21:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49508

           Summary: [4.7 Regression] Bogus "control reaches end of
                    non-void function" warning
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: paolo.carlini@oracle.com


In mainline, I see this, apparently bogus, warning which is not emitted by 4.6
(or ICC for that matter). Testcase distilled from 20_util/forward/1_neg.cc in
the v3 testsuite, compile with -Wreturn-type:

template<class T>
  struct shared_ptr
  {
  };

template<class T, class A1, class A2>
  shared_ptr<T>
  factory(const A1&, const A2&)
  {
    return shared_ptr<T>(new T());
  }

struct A
{
  A(int&, int&);
};

void g()
{
  factory<A>(1, 2);
}


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

end of thread, other threads:[~2015-01-29 16:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22 21:11 [Bug c++/49508] New: [4.7 Regression] Bogus "control reaches end of non-void function" warning paolo.carlini at oracle dot com
2011-06-23  8:44 ` [Bug c++/49508] " jakub at gcc dot gnu.org
2011-06-23  9:02 ` [Bug c++/49508] " paolo.carlini at oracle dot com
2011-10-18  1:23 ` paolo.carlini at oracle dot com
2011-10-19 17:28 ` paolo.carlini at oracle dot com
2011-10-20  1:16 ` paolo.carlini at oracle dot com
2015-01-29 15:04 ` redi at gcc dot gnu.org
2015-01-29 15:38 ` [Bug c++/49508] [4.8/4.9/5 regression] " jason at gcc dot gnu.org
2015-01-29 16:10 ` jason at gcc dot gnu.org
2015-01-29 16:13 ` jason 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).