Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Experimental C Build System
Date: Sat, 03 Feb 2024 00:53:05 -0800
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <86y1c27wum.fsf@linuxsc.com>
References: <87r0hvpxx8.fsf@nosuchdomain.example.com> <87frybprp3.fsf@nosuchdomain.example.com> <87bk8zpnxx.fsf@nosuchdomain.example.com> <87h6iqo1cq.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="86b83c500004563f07cda2ade1e7584b"; logging-data="3221634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19f/GxMBKGXPVPdZXQ09uw79FXlhe99tY8="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:E6mNgNKCXa4y1WnHogfxLwG+FiA= sha1:GqJtldtg5HLz3jAzQqh5+emHwoU=
Xref: csiph.com comp.lang.c:381663
Keith Thompson writes:
> Lawrence D'Oliveiro writes:
>
>> On Thu, 01 Feb 2024 19:03:38 -0800, Keith Thompson wrote:
>>
>>> A #include directive with <> searches for a "header", which is not
>>> stated to be a file. A #include directive with "" searches for a file
>>> in an implementation-defined manner; if that search fails, it tries
>>> again as if <> had been used.
>>
>> The trouble with that interpretation is, it would seem to rule out the use
>> of things like include libraries for user headers. Do you really think
>> that was the intention?
>
> I don't know. I imagine an implementation could interpret the word
> "file" to include information extracted from libraries. Note that it
> doesn't have to correspond to the concept of a "file" used in ;
> that refers to files in the execution environment, not the compilation
> environment.
To me what the C standard says is clear. A #include "whatever.h"
gets its stuff from a file (assuming of course the appropriate
file can be found, and not revert to the #include
form). A #include gets its stuff from a header,
said header perhaps being stored in a file or perhaps not, and if
file-stored then it could be a 1-1 relationship, or a 1-many
relationship, or a many-1 relationship. Since the C standard
doesn't define the term 'header', an implementation is allowed to
actualize it however the implementation chooses (including the
possibility of storing information inside the compiler itself).