TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: SCOTT LURNDAL
from: MARTIN GREGORIE
date: 2021-01-06 17:38:00
subject: Re: AI and decompilation?

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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.