Article View: comp.std.c
Article #1048#ifdef
From: Azeem Kahn
Date: Tue, 05 Dec 1989 23:58
Date: Tue, 05 Dec 1989 23:58
29 lines
1037 bytes
1037 bytes
This question deals with the implementation of #ifdef. Consider the following: #define VAR #ifdef VAR ... ... #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. I want to know what the standard says about this. I am not interested in what some systems do and others don't. Thanks for any info. -azeem.
Technical Details
Message-ID:
<9326@microsoft.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!azeemkShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!azeemk From: azeemk@microsoft.UUCP (Azeem Kahn) Newsgroups: comp.std.c Subject: #ifdef Keywords: preprocessor, inactive segments Message-ID: <9326@microsoft.UUCP> Date: 5 Dec 89 23:58:01 GMT Organization: Microsoft Corp., Redmond WA Lines: 29