public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7551: g++ does not mind non-void functions which return n o value.
@ 2002-09-14 1:36 Andreas Jaeger
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jaeger @ 2002-09-14 1:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/7551; it has been noted by GNATS.
From: Andreas Jaeger <aj@suse.de>
To: Tim Barnett <tim.barnett@tnuk.co.uk>
Cc: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/7551: g++ does not mind non-void functions which return n o
value.
Date: Sat, 14 Sep 2002 10:26:18 +0200
Tim Barnett <tim.barnett@tnuk.co.uk> writes:
> Source file consisting of the following two lines:
>
> int foo(void) { }
> int main(void) { return foo(); }
>
> Gives no warning.
Did you use the warning flags?
$ /opt/gcc/3.2-devel/bin/gcc t.c -Wall
t.c: In function `foo':
t.c:1: warning: control reaches end of non-void function
$ /opt/gcc/3.2-devel/bin/g++ t.c -Wall
t.c: In function `int foo()':
t.c:1: warning: control reaches end of non-void function
This looks correct to me,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: c++/7551: g++ does not mind non-void functions which return n o value.
@ 2002-09-14 1:16 Tim Barnett
0 siblings, 0 replies; 2+ messages in thread
From: Tim Barnett @ 2002-09-14 1:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/7551; it has been noted by GNATS.
From: Tim Barnett <tim.barnett@tnuk.co.uk>
To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: RE: c++/7551: g++ does not mind non-void functions which return n
o value.
Date: Sat, 14 Sep 2002 09:09:34 +0100
Source file consisting of the following two lines:
int foo(void) { }
int main(void) { return foo(); }
Gives no warning.
-----Original Message-----
From: nathan@gcc.gnu.org [mailto:nathan@gcc.gnu.org]
Sent: 14 September 2002 00:08
To: Tim.Barnett@hekate.org.uk; gcc-bugs@gcc.gnu.org;
gcc-prs@gcc.gnu.org; nobody@gcc.gnu.org
Subject: Re: c++/7551: g++ does not mind non-void functions which return
no value.
Synopsis: g++ does not mind non-void functions which return no value.
State-Changed-From-To: open->feedback
State-Changed-By: nathan
State-Changed-When: Fri Sep 13 16:07:57 2002
State-Changed-Why:
please provide source
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=7551
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-14 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-14 1:36 c++/7551: g++ does not mind non-void functions which return n o value Andreas Jaeger
-- strict thread matches above, loose matches on Subject: below --
2002-09-14 1:16 Tim Barnett
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).