Re: another C-like language? was Compilers :)

"marb...@yahoo.co.uk" <marblypup@yahoo.co.uk>
Thu, 5 Jan 2023 06:27:06 -0800 (PST)

          From comp.compilers

Related articles
Compilers :) deavmi@redxen.eu (Tristan B. Velloza Kildaire) (2023-01-02)
Re: Compilers :) spibou@gmail.com (Spiros Bousbouras) (2023-01-02)
Re: another C-like language? was Compilers :) stephenjohnlimb@gmail.com (Steve Limb) (2023-01-03)
Re: another C-like language? was Compilers :) gah4@u.washington.edu (gah4) (2023-01-03)
Re: another C-like language? was Compilers :) arnold@skeeve.com (2023-01-04)
Re: another C-like language? was Compilers :) gah4@u.washington.edu (gah4) (2023-01-04)
Re: another C-like language? was Compilers :) marblypup@yahoo.co.uk (marb...@yahoo.co.uk) (2023-01-05)
Re: another C-like language? was Compilers :) gah4@u.washington.edu (gah4) (2023-01-05)
Re: another C-like language? was Compilers :) david.brown@hesbynett.no (David Brown) (2023-01-06)
Re: another C-like language? was Compilers :) marblypup@yahoo.co.uk (marb...@yahoo.co.uk) (2023-01-07)
Re: another C-like language? was Compilers :) david.brown@hesbynett.no (David Brown) (2023-01-08)
Re: another C-like language? was Compilers :) DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-01-09)
Re: C scopes, another C-like language? was Compilers :) david.brown@hesbynett.no (David Brown) (2023-01-09)
[16 later articles]
| List of all articles for this month |
From: "marb...@yahoo.co.uk" <marblypup@yahoo.co.uk>
Newsgroups: comp.compilers
Date: Thu, 5 Jan 2023 06:27:06 -0800 (PST)
Organization: Compilers Central
References: 23-01-001 23-01-002 23-01-003
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="22109"; mail-complaints-to="abuse@iecc.com"
Keywords: C, design, comment
Posted-Date: 05 Jan 2023 09:34:32 EST
In-Reply-To: 23-01-003

On Tuesday, 3 January 2023 at 17:45:17 UTC, Steve Limb wrote:
> I’m not sure there would be that much demand for a cut down C.


I recently read (well, skimmed)
http://www.mjbauer.biz/C-less%20Reference%20Manual.pdf
"A concise subset of the C programming language".
Though I'm a bit baffled by some of Bauer's choices. Why is
`char *foo="foo", *bar="bar"; puts(foo); puts(bar);`
allowed but not
`char *foo="foo"; puts(foo); char *bar="bar"; puts(bar);`
? Admittedly, the latter is only allowed in relatively recent C, but from my
(very limited) experience writing compilers, the latter is no harder to
compile.
I idly thought about adding stuff to C-less and calling it C-more-or-less,
Cmol, for short.


I'm up for reading the source of any relatively simple compiler for, and
written in, anything C-like. I've tried making sense of the GNU C compiler a
few times. My brain may recover one day!
[If you're doing a one-pass compiler, it's easier if all the declarations are at the
beginning so you can generate the code to set up the stack frame and do initializations.
I agree that on modern computers it's not a big deal, but remember that early C compilers
ran in 24K bytes and I don't mean meagabytes. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.