public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/10641: -Wreturn-type does not work reliably
@ 2003-05-06 11:26 johannes.gajdosik
0 siblings, 0 replies; 2+ messages in thread
From: johannes.gajdosik @ 2003-05-06 11:26 UTC (permalink / raw)
To: gcc-gnats; +Cc: ikock
>Number: 10641
>Category: c++
>Synopsis: -Wreturn-type does not work reliably
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Tue May 06 11:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Isabel Kock, Johannes Gajdosik
>Release: gcc 2.95.3
>Organization:
>Environment:
hpux and linux, gcc 2.95.3
> g++ -v
Reading specs from /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.3/specs
gcc version 2.95.3 20010315 (release)
g++ -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
>Description:
Even with -Wreturn-type the compiler does not warn
when no return value is supplied,
see the following example (only 3 lines of code):
---- test.C begin ----
#include <string>
int f(string) {}
int g(const string &) {}
---- test.C end ---
> g++ -c -Wreturn-type test.C
test.C: In function `int g(const string &)':
test.C:3: warning: control reaches end of non-void function `g(const string &)'
The compiler warns about function g, but there is no
warning about function f.
>How-To-Repeat:
See Description
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/10641: -Wreturn-type does not work reliably
@ 2003-05-06 14:16 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-05-06 14:16 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, ikock, johannes.gajdosik, nobody
Synopsis: -Wreturn-type does not work reliably
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Tue May 6 14:16:33 2003
State-Changed-Why:
Fixed since 3.0. Time to upgrade!
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10641
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-06 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 11:26 c++/10641: -Wreturn-type does not work reliably johannes.gajdosik
2003-05-06 14:16 bangerth
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).