Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: gcc and 'include' Date: Mon, 30 Mar 2026 05:07:22 -0700 Organization: A noiseless patient Spider Lines: 43 Message-ID: <86qzp11pxh.fsf@linuxsc.com> References: <10q4ceb$38i2d$1@dont-email.me> <87ikaiw5g0.fsf@example.invalid> <10q5nnr$3l3lc$1@dont-email.me> <10q6snp$2nka$5@dont-email.me> <10q6uv4$419b$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 30 Mar 2026 12:07:25 +0000 (UTC) Injection-Info: dont-email.me; posting-host="2cd52f7e7f6c86e7548f05bf3bc2e07a"; logging-data="2539403"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SwLze+3QEvdmQovGDFg5bLCE2rfsQ+Ug=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:VNw529l03iLps3uY0BZahhaiJoA= sha1:KUEOpxCunIyN5yuLw1AiDgQJX8s= Xref: csiph.com comp.lang.c:397302 Bart writes: > On 27/03/2026 21:27, Lawrence D?Oliveiro wrote: > >> On Fri, 27 Mar 2026 10:55:55 +0000, Bart wrote: >> >>> Using 'static' to force an actual function to be generated sounds >>> unintuitive. >> >> Lots of things about C are ?unintuitive?. Coming from Pascal, I found >> its type-definition syntax completely backwards. > > If only it was simply backwards! Instead it's inside-out and spirular. > > But, yeah, some C aspect being unintuitive is nothing new: > > extern int abc; > int abc = 123; > > Or: > > static int abc; > extern int abc; > > Both are valid C, but this isn't: > > extern int abc; > static int abc; > > > I dare not ask what the rules are; I'm sure they exist, but they > still don't make sense. They do make sense, to those who take the time to understand the reasoning that went into why the rules are as they are. > I can only find out which of these are valid or not > by trial and error. I suspect it's because you think of the rules as arbitrary that you feel you have to resort to trial and error. Here again the key is to understand the reasons for what choices were made. The C Rationale document is an excellent resource for doing that.