Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!jhunix!barrett From: barrett@jhunix.HCF.JHU.EDU (Dan Barrett) Newsgroups: comp.lang.c Subject: Preprocessor question (is gcc standard)? Message-ID: <7654@jhunix.HCF.JHU.EDU> Date: 26 Feb 91 22:53:45 GMT Distribution: usa Organization: The Johns Hopkins University - HCF Lines: 28 GCC's preprocessor doesn't like this code: #include #define ARGS (x) main() { ... isalpha ARGS ... } The linker complains that _isalpha is not known. According to H&S and K&R, you are allowed whitespace between the name of a macro and its argument list in the invocation. GCC's documentation says that a macro invocation that is not followed by a left parenthesis (ignoring whitespace) is not considered a macro invocation. That explains why GCC doesn't like the above program. But is this the standard way an ANSI preprocessor should work? I can see advantages and disadvantages to this behavior. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////