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