home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12333 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  1.5 KB

  1. Xref: sparky comp.lang.c:12333 gnu.gcc.help:1908
  2. Newsgroups: comp.lang.c,gnu.gcc,gnu.gcc.help
  3. Path: sparky!uunet!caen!sol.ctr.columbia.edu!cs.columbia.edu!leland
  4. From: leland@cs.columbia.edu (Leland Woodbury)
  5. Subject: gcc-cpp chokes: bug or feature?
  6. Message-ID: <BszKpr.GBu@cs.columbia.edu>
  7. Originator: leland@shadow.cs.columbia.edu
  8. Sender: leland@cs.columbia.edu (Leland Woodbury)
  9. Organization: Columbia University Department of Computer Science
  10. Date: Fri, 14 Aug 1992 18:29:50 GMT
  11. Lines: 23
  12.  
  13. #if 0
  14. I don't have much experience with gcc, I started using it only
  15. recently.  And I'm in the habit of using the C preprocessor (as shown
  16. here) rather than /* */ to delineate most multi-line comments, because
  17. I think it's more elegant and less likely to result in error.  But
  18. gcc-cpp chokes on any line within such text that contains an odd number
  19. of single quotes, complaining about unterminated character constants.
  20. (Run gcc on the file containing this message for a demo.)
  21.  
  22. I haven't looked at the source code, but does this make any sense to
  23. anyone?  Is there something in ANSI C that requires such behavior?
  24. Obviously, gcc-cpp is parsing -- in a line-oriented fashion -- the text
  25. between the #if 0 and the #endif, but what's it looking for (besides
  26. #else or #endif)?  Why is it parsing what should be getting ifdef'd
  27. out?
  28.  
  29. Leland Woodbury
  30. #endif
  31. -- 
  32. INTERNET: leland@cs.columbia.edu
  33.   USENET: ...!columbia!cs.columbia.edu!leland
  34.   BITNET: leland%cs.columbia.edu@cuvmb
  35.   USMAIL: Columbia Univ., 457 CS, 500 W. 120 St., NYC 10027-6699
  36.