Newsgroups: comp.std.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: What's implementation defined?
Message-ID: <1988Dec5.181753.1961@utzoo.uucp>
Organization: U of Toronto Zoology
References: <8457@alice.UUCP> <219@twwells.uucp> <1988Nov28.215053.3129@utzoo.uucp> <229@twwells.uucp> <9034@smoke.BRL.MIL> <1988Dec3.224807.29121@utzoo.uucp> <9064@smoke.BRL.MIL>
Date: Mon, 5 Dec 88 18:17:53 GMT

In article <9064@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes:
>I don't see that this example is at all on thin ice.  Using the
>implementation definition, a definite header name must be produced,
>or else it is illegal syntax.  The syntax for #include is spelled out.
>Also what happens once has a header name is spelled out....

Consider a more complete example:

	#define x <
	#define y stdio.h
	#define z >
	#include x y z

Since the combination mechanism in the #include is implementation-defined,
this might turn into any of the following:

	#include 
	#include < stdio . h >
	#include <\stdio\.\h>
	#include 

(The last is arguably unreasonable, but it is not *clear* that the standard
actually forbids it.)  The point is, the construct is required to be legal
but is not required to be useful, which makes it pretty, uh, useless in
portable programs.  This is actually a bit curious, since elsewhere (the
# operator, and arguably the ## operator), exact preservation of the
original spelling of tokens is in fact demanded.  Was there a reason why
a similar demand was considered impractical or undesirable here?
-- 
SunOSish, adj:  requiring      |     Henry Spencer at U of Toronto Zoology
32-bit bug numbers.            | uunet!attcan!utzoo!henry henry@zoo.toronto.edu