From: "James Bulman" Newsgroups: comp.os.msdos.djgpp Subject: Templates and warnings Date: Sat, 10 Oct 1998 12:27:25 +0100 Organization: Virgin Net Usenet Service Lines: 21 Message-ID: <6vngcd$n6e$1@nclient1-gui.server.virgin.net> NNTP-Posting-Host: 194.168.18.130 X-Newsreader: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I have recently switch to working with djgpp. I am writing a basic double linked list template which uses a enum to return the status of any operation. I have noticed though that I can write anything in the return statement and the compiler does not complain. For example (this is an example, not the exact code) typedef enum listReturn {listAddOk = 1, listAddFail = 2, listRemoveOk = 3, listRemoveFail = 4}; template listReturn list::next(void) { /* do some stuff */ return(any_old_rubbish_which_the_compiler_shouldnt_like); } This compiles fine, what am I doing wrong?