Xref: utzoo comp.lang.c:10738 comp.std.c:52
Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-sdd!ncr-sd!se-sd!rns
From: rns@se-sd.sandiego.NCR.COM (Rick Schubert)
Newsgroups: comp.lang.c,comp.std.c
Subject: Re: Why does C standard consider each compiler flag a separate implementation?
Message-ID: <1543@se-sd.sandiego.NCR.COM>
Date: 15 Jun 88 16:12:29 GMT
References: <2746@ttrdc.UUCP>
Reply-To: rns@se-sd.sandiego.NCR.COM (Rick Schubert)
Organization: NCR Corp. Systems Engineering, San Diego
Lines: 34

In article <2746@ttrdc.UUCP> levy@ttrdc.UUCP (Daniel R. Levy) writes:
>  I also asked in con-
>junction with this if the proposed ANSI C standard had anything to say about
>flags to the compiler.
>
>Someone responded (I can't find the article now) and said that the proposed
>ANSI C standard considers each variation in the behavior of a compiler as
>influenced by, say, an external flag to be a separate implementation.
>
>Perhaps this language puts my proposal beyond the self-described scope
>of the proposed standard (does it really?) but my question now, is:  WHY does
>the proposed standard say this?

My understanding of this is that a compiler flag can have a profound effect
on the behavior of the compiler, <> having the effect of
invoking a separate implementation.  For example, the compiler may have
something similar to:
		if (strcmp(*argv,"-x") == 0)
			compiler1();
		else
			compiler2();
where compiler1() and compiler2() <> separate implementations.
This is an extreme example, but various flags can have varying degrees
of effect on the compiler.  Even though most flags will not affect the
compiler on issues related to conformance to the Standard, the potential
is there, and it would be difficult for the Standard to specify what
types of flags were allowed and what types weren't.  I think this is
what Doug Gwyn was getting at when he responded:
: What would you prefer that it say?
: I bet you can't word your notion in a form acceptable for use in a standard.
>
>De-mystify me, please?
Are you de-mystified?

-- Rick Schubert (rns@se-sd.sandiego.NCR.COM)