On Wed, 06 Jan 2021 17:07:35 +0000, Scott Lurndal wrote:
> Martin Gregorie writes:
>>On Wed, 06 Jan 2021 15:15:36 +0000, Scott Lurndal wrote:
>>
>>> Martin Gregorie writes:
>>>>On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:
>>>>
>>>>> You shouldn’t need declarations in C unless you’re using one of
>>>>> those new-fangled compilers that requires them. Old code should
>>>>> still be supported, though.
>>>>>
>>>>Last time I tried it, (about 2 months ago), the current GNU C compiler
>>>>accepts the old K&R C first edition procedure declaration syntax. I
>>>>wish more compilers worked this way.
>>>
>>> It will not, however, accept the original V6 C "a =+ b" ambiguous
>>> syntax, so older code may still need to be edited before compilation
>>> with a modern compiler.
>>
>>I don't *think* I've ever written that or even seen it in valid code.
>>
>>
> From the V6 C compiler source:
>
> /*
> * The hash table locations of the keywords * are marked; if an
> identifier hashes to one of * these locations, it is looked up
> in in the keyword * table first.
> */
> for (ip=kwtab; (sp = ip->kwname); ip++) {
> i = 0;
> while (*sp)
> i =+ *sp++;
> hshtab[i%hshsiz].hflag = FKEYW;
> }
>
> Note also that in that version of the compiler, MOS (member of
> structure) names were global and could be used with any pointer
> regardless of type.
>
> https://github.com/mortdeus/legacy-cc/blob/master/last1120c/c00.c
>
> This makes it difficult to build the original V6 c compiler using a
> modern compiler :-)
Quite!
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|