🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5905

Re: #ifs and their corresponding #endifs -- in same file?

#5905
From: Henry Spencer
Date: Thu, 20 Apr 1989 19:32
11 lines
931 bytes
In article <335@edg1.UUCP> jsa@edg1.UUCP (J. Stephen Adamczyk) writes:
>Anyone care to venture an opinion or whether or not the pANS requires
>that an #if (or the like) be closed by a corresponding #endif in
>the SAME source file?

If you look hard at the grammar for the preprocessor, it is fairly clearly
the grammar for a *single* file.  Everybody I know of who has studied the
matter closely has concluded that #if-#endif must match within the same file.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
Technical Details
Message-ID: <1989Apr20.193209.19874@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <335@edg1.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: #ifs and their corresponding #endifs -- in same file?
Message-ID: <1989Apr20.193209.19874@utzoo.uucp>
Organization: U of Toronto Zoology
References: <335@edg1.UUCP>
Date: Thu, 20 Apr 89 19:32:09 GMT