public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52676] New: bogus warning: control reaches end of non-void function
@ 2012-03-22 20:25 ppluzhnikov at google dot com
2014-01-24 4:27 ` [Bug c++/52676] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: ppluzhnikov at google dot com @ 2012-03-22 20:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52676
Bug #: 52676
Summary: bogus warning: control reaches end of non-void
function
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ppluzhnikov@google.com
Using current SVN trunk "g++ (GCC) 4.8.0 20120322 (experimental)"
g++ -c -Wreturn-type t.cc
t.cc: In function ‘int fn1()’:
t.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type]
Same result from "g++ (GCC) 4.7.0 20120124 (experimental)"
Using released GCC 4.6.3 for the same source produces no warning.
struct string {
~string();
};
struct ostream {
ostream & operator<<(bool);
};
struct LogMessage {
ostream & stream();
};
struct LogMessageFatal: public LogMessage {
LogMessageFatal();
~LogMessageFatal()
__attribute__( (noreturn) ); // comment out: both 4.6.3 and trunk
// issue warning
};
int fn1()
{
string s; // comment out: trunk no longer issues a warning
if (0)
LogMessageFatal().stream() << false;
else
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/52676] bogus warning: control reaches end of non-void function
2012-03-22 20:25 [Bug c++/52676] New: bogus warning: control reaches end of non-void function ppluzhnikov at google dot com
@ 2014-01-24 4:27 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-01-24 4:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52676
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 33752.
*** This bug has been marked as a duplicate of bug 33752 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-24 4:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 20:25 [Bug c++/52676] New: bogus warning: control reaches end of non-void function ppluzhnikov at google dot com
2014-01-24 4:27 ` [Bug c++/52676] " pinskia 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).