Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #168538
| Path | csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: typedef in old C |
| Date | Tue, 13 Dec 2022 10:27:03 -0800 |
| Organization | None to speak of |
| Lines | 38 |
| Message-ID | <87bko7tb0o.fsf@nosuchdomain.example.com> (permalink) |
| References | <tn9vlg$5ra$1@gioia.aioe.org> <874jtz2r5s.fsf@bsb.me.uk> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader01.eternal-september.org; posting-host="3ff48156ba03619b1b817f52b89d4424"; logging-data="2710224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192ICtN8mfwPAJ9TEk4EOzs" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
| Cancel-Lock | sha1:2E3Z/wi8ET64jG1PfzWK/Lr5Ua0= sha1:GLKZSKRoJkt3AL8pHqLnvhenH0Q= |
| Xref | csiph.com comp.lang.c:168538 |
Show key headers only | View raw
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> Bart <bc@freeuk.com> writes:
>
>> I was looking at the 1983 C sources of PostScript (via
>> https://computerhistory.org/blog/postscript-a-digital-printing-press/).
>>
>> It uses typedef like this:
>>
>> typedef long int integer;
>> typedef unsigned integer Offset;
>>
>> That is, being able to apply 'unsigned' to a typedef-ed name, rather
>> than any of 'char short int long'.
>>
>> I guess this is not legal C now; I just wondered at what point it
>> stopped being legal, if it ever was (perhaps compilers were just more
>> lax).
>
> I doubt it has ever been legal. Even K&R1 has the wording that rules it
> out. Pre-K&R1 C might have been more lax, but for most of the time
> before K&R1 C did not even have unsigned!
Or typedef.
The 1975 C reference manual has neither typedef nor unsigned (nor long,
nor short). K&R1 (1978) has both. I don't know which was added first.
> I wonder what else this generous compiler permitted. Could one do
>
> typedef double number;
> typedef long number hi_prec_num;
>
> for example? I doubt it.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
typedef in old C Bart <bc@freeuk.com> - 2022-12-13 13:45 +0000
Re: typedef in old C Thiago Adams <thiago.adams@gmail.com> - 2022-12-13 06:42 -0800
Re: typedef in old C Thiago Adams <thiago.adams@gmail.com> - 2022-12-13 06:46 -0800
Re: typedef in old C Bart <bc@freeuk.com> - 2022-12-13 15:56 +0000
Re: typedef in old C Kaz Kylheku <864-117-4973@kylheku.com> - 2022-12-13 18:07 +0000
Re: typedef in old C Thiago Adams <thiago.adams@gmail.com> - 2022-12-13 11:11 -0800
Re: typedef in old C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-13 16:40 +0000
Re: typedef in old C scott@slp53.sl.home (Scott Lurndal) - 2022-12-13 17:05 +0000
Re: typedef in old C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-13 10:27 -0800
Re: typedef in old C Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-18 17:25 -0800
Re: typedef in old C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-13 10:30 -0800
Re: typedef in old C luser droog <luser.droog@gmail.com> - 2022-12-14 09:42 -0800
Re: typedef in old C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-14 20:59 +0000
Re: typedef in old C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-12-14 13:44 -0800
Re: typedef in old C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-15 02:46 +0000
Re: typedef in old C scott@slp53.sl.home (Scott Lurndal) - 2022-12-15 15:01 +0000
Re: typedef in old C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-15 17:07 +0000
Re: typedef in old C luser droog <luser.droog@gmail.com> - 2022-12-15 18:34 -0800
Re: typedef in old C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-16 17:41 +0000
Re: typedef in old C Bonita Montero <Bonita.Montero@gmail.com> - 2022-12-17 07:54 +0100
csiph-web