From: MichaelDavidson@pacbell.net (Michael Davidson)
Subject: [pups] Re: v7 crypt(3)
Date: Fri, 20 Sep 2002 18:11:32 -0700 [thread overview]
Message-ID: <3D8BC744.6040305@pacbell.net> (raw)
In-Reply-To: <200209210017.g8L0HYu27548@minnie.tuhs.org>
Warren Toomey wrote:
>>
>>
>>static char PC1_D[] {
>> 63,55,47,39,31,23,15,
>> 7,62,54,46,38,30,22,
>> 14, 6,61,53,45,37,29,
>> 21,13, 5,28,20,12, 4,
>>};
>>
>>That wasn't legal syntax, was it? There should be an '='
>>between [] and {, as in the rest of the file, no?
>>
>
>I just tried to compile the code with the V7 compiler and it complained.
>Maybe it was legal in V6 and they used the .o file from there and didn't
>recompile it.
>
Actually I'm surprised that the V7 compiler would complain about this.
I seem to recall that there was still quite a lot of code in V7
(including the compiler itself) which didn't have an '=' before
the initialiser.
I don't have a V7 system to hand right now, but looking at the
compiler source appears to confirm that the '=' was still optional.
In extdef() at around line 69 of c02.c there is:
if (o!=ASSIGN)
peeksym = o;
... at this point in the code we have just processed an external
definition which is not a function and which is not followed by
either a comma or a semicolon and are about to attempt to parse
what follows as an initialiser. If the next symbol is '=' the
compiler swallows it, otherwise it pushes it back and continues
with parsing the initialiser.
So it certainly *looks* as if the V7 compiler didn't require the '='.
Perhaps you were using pcc?
next prev parent reply other threads:[~2002-09-21 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200209201731.g8KHVh176034@pop2.nwbl.wi.voyager.net>
2002-09-21 0:17 ` Warren Toomey
2002-09-21 1:11 ` Michael Davidson [this message]
2002-09-28 4:57 Dennis Ritchie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D8BC744.6040305@pacbell.net \
--to=michaeldavidson@pacbell.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).