home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19536 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  909 b 

  1. Path: sparky!uunet!mcsun!sunic!ericom!terminus.ericsson.se!!beirut!paul
  2. From: paul@terminus.ericsson.se
  3. Newsgroups: comp.lang.c
  4. Subject: enum checking using C compiler
  5. Message-ID: <987@quirm.terminus.ericsson.se>
  6. Date: 11 Jan 93 16:13:44 GMT
  7. Sender: usenet@terminus.ericsson.se
  8. Reply-To: paul@terminus.ericsson.se
  9. Distribution: world
  10. Organization: Camtec Electronics (Ericsson), Leicester, England
  11. Lines: 27
  12. Nntp-Posting-Host: beirut
  13.  
  14. Does anyone out there know where I can get hold of a prog that
  15. will check for integers being assigned to enumerated data types.
  16.  
  17. eg
  18.  
  19. typedef enum {
  20.     fred,
  21.     joe,
  22.     harry
  23. } PEOPLE;
  24.  
  25. int i=2;
  26. PEOPLE names;
  27. names=i;       <----- Want it to find this
  28.  
  29. I've tried using gcc (even tried to mackle the progs so I could use
  30. g++ -Wenum-clash
  31.  
  32. The only lint I have is non ansi.
  33.  
  34. Thanks in advance for any help
  35.  
  36. Paul Isaac
  37. Ericsson-Camtec  Leicester
  38. EMAIL:  paul@terminus.ericsson.se 
  39.  
  40.  
  41.