| www.delorie.com/archives/browse.cgi | search |
| Date: | Mon, 19 Feb 2001 22:45:27 -0500 |
| Message-Id: | <200102200345.WAA23950@envy.delorie.com> |
| X-Authentication-Warning: | envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f |
| From: | DJ Delorie <dj AT delorie DOT com> |
| To: | djgpp AT delorie DOT com |
| In-reply-to: | <4Ykk6.112438$p8.27106058@typhoon.southeast.rr.com> |
| (pwillard AT mindspring DOT com) | |
| Subject: | Re: What does this mean? |
| References: | <4Ykk6.112438$p8 DOT 27106058 AT typhoon DOT southeast DOT rr DOT com> |
| Reply-To: | djgpp AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
> I have a warning that says: "control reaches end of non-void function". What
> would be some reasons I would get this?
Consider this:
int f(int i)
{
if (i < 0)
return -i;
else if (i > 0)
return i*2;
}
What does f return if i == 0 ?
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |