This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: return value warning
- From: "Tanton Gibbs" <thgibbs at deltafarms dot com>
- To: "Michal Liptak" <liptak at isdd dot sk>, <gcc-help at gcc dot gnu dot org>
- Date: Fri, 8 Mar 2002 04:07:55 -0500
- Subject: Re: return value warning
- References: <20020308085538.2be5d956.liptak@isdd.sk>
Are you using -Wall ?
The return value is undefined...it probably takes whatever garbage is on the
stack at the time the method returns.
----- Original Message -----
From: "Michal Liptak" <liptak@isdd.sk>
To: <gcc-help@gcc.gnu.org>
Sent: Friday, March 08, 2002 2:55 AM
Subject: return value warning
> gcc 3.0.3 doesn't warn when not returning value from method returning
non-void..
> what return value is it assuming to return?
> for instance:
>
> bool someclass::somemethod(void) {
> //code here
> }
>
> m.
>