home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!odin!fido!shankar
- From: shankar@sgi.com (Shankar Unni)
- Newsgroups: comp.std.c
- Subject: #if and #endif in different files: legal?
- Keywords: preprocessing
- Message-ID: <ntvfii4@fido.asd.sgi.com>
- Date: 30 Jul 92 00:18:45 GMT
- Sender: news@fido.asd.sgi.com (Usenet News Admin)
- Organization: Silicon Graphics, Inc.
- Lines: 21
-
-
- What is the accepted opinion as to the legality of a "#if" and a
- "#else" or "#endif" being in different files, as in:
-
- a.c:
-
- #ifdef __STDC__
- #include "a.h"
-
- a.h:
-
- main() { }
- #endif /* __STDC__ */
-
-
- Should the above compile? Not compile? Implementation-defined?
-
- Thanks,
- --
- Shankar Unni E-Mail: shankar@sgi.com
- Silicon Graphics Inc. Phone: +1-415-390-2072
-