🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #157

#if and #endif in different files: legal?

#157
From: Shankar Unni
Date: Thu, 30 Jul 1992 00:18
21 lines
775 bytes
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
Technical Details
Message-ID: <ntvfii4@fido.asd.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!odin!fido!shankar

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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