Message-ID: <02a901c09b7c$92b8abc0$6300a8c0@brk> From: "Johan Henriksson" To: Subject: Re: What does this mean? Date: Tue, 20 Feb 2001 21:22:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com from: Johan Henriksson, leadprogrammer @ www.realsoftware.cjb.net "The individual should be praised for it's struggle, the society condemned for it's actions" - me 1997 #12035895 ---------------------------------------------------------------------------- ------------------- >> I have a warning that says: "control reaches end of non-void function". What >> would be some reasons I would get this? Is there a way to tell GCC stop complaining about this? In some more advanced cases with return()'s, GCC misses the return and think it might not happen. Consider this: ... switch(val) { case 1: return(2); case 2: return(3); default: return(5); } } I'm not sure but I think this is one of the codesnippets that fool's GCC. The solution for removing the complaint is a dummy-return in the end but this bothers me. Is there a nicer general solution? (yes, the above can easily be solved by moving the default). TIA