This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: return value warning


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.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]