Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Nesting of a preprocessor directive within a macro defn Message-ID: <1990Sep2.022039.3691@zoo.toronto.edu> Organization: U of Toronto Zoology References: <849@gtenmc.UUCP> Date: Sun, 2 Sep 90 02:20:39 GMT In article <849@gtenmc.UUCP> ravim@gtenmc.UUCP (Ravi Kumar Mandava) writes: >Is nesting of a preprocessor directive within a macro definition (RHS) not >allowed? It is not possible. The very first thing that happens to ANSI C source during compilation is that backslashed newlines are stripped out, so any "#" within the RHS is no longer at the start of a line and hence does not begin a preprocessor directive. (And incidentally, the result of macro expansion "is not processed as a preprocessing directive even if it resembles one", section 3.8.3.4.) Some old C compilers may have permitted such things, due to the vagueness of the old definition of how the preprocessor features interacted. -- TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology OSI: handling yesterday's loads someday| henry@zoo.toronto.edu utzoo!henry