Article View: comp.std.c
Article #1052Re: #ifdef
From: Doug Gwyn
Date: Wed, 06 Dec 1989 15:55
Date: Wed, 06 Dec 1989 15:55
17 lines
1141 bytes
1141 bytes
In article <9326@microsoft.UUCP> azeemk@microsoft.UUCP (Azeem Kahn) writes: -#else -/* -#endif -*/ -#endif -VAR is defined and hence the #else is the inactive segment. Now -should the preprocessor match the #else with the first or the -second #endif? In other words, does the preprocessor have to look -at the lines in the inactive segment for comments, unclosed qoutes -etc. OR should it disregard everything in the inactive segment and -just keep looking for a matching #endif to satisfy the nesting. This is answered in section 2.1.1.2, "Translation phases". Comments are replaced by spaces before preprocessing directives are executed. Thus there is no "first #endif"; it is commented-out.
Technical Details
Message-ID:
<11753@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!aplcen!haven!adm!smoke!gwynReferences:
<9326@microsoft.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: #ifdef Keywords: preprocessor, inactive segments Message-ID: <11753@smoke.BRL.MIL> Date: 6 Dec 89 15:55:13 GMT References: <9326@microsoft.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17