Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!uunet!ceco!garry From: garry@ceco.ceco.com (Garry Garrett) Newsgroups: comp.lang.c Subject: Re: Preprocessor question (is gcc standard)? Message-ID: <419@ceco.ceco.com> Date: 1 Mar 91 02:01:37 GMT References: <7654@jhunix.HCF.JHU.EDU> <1991Feb27.155100.21972@athena.mit.edu> Distribution: usa Organization: Commonwealth Edison Co., Chicago, IL Lines: 26 In article <1991Feb27.155100.21972@athena.mit.edu>, jik@athena.mit.edu (Jonathan I. Kamens) writes: > In article <7654@jhunix.HCF.JHU.EDU>, barrett@jhunix.HCF.JHU.EDU (Dan Barrett) writes: * |> GCC's preprocessor doesn't like this code: * |> * |> #include * |> #define ARGS (x) * |> * |> main() * |> { * |> ... isalpha ARGS ... * |> } * * K&Rv2 says that an invocation of a macro with arguments must be the name of * the macro, followed by optional white space, followed by '('. It doesn't say * that the '(' is allowed to be part of another macro that has been expanded. * Perhaps the problem is one wher GCC does not follow the standard. Check to see that #define ARGS (x) is not interpreted as a macro of the form #define ARGS(x) ... I know that it, shouldn't, but perhaps GCC is non-standard.