U613042@HNYKUN11.BITNET (Olaf Seibert) (12/11/87)
So, I didn't read the README file with PDC.... I'll stop complaining
about bugs in PDC. Instead, here are two bug fixes...
(Sorry, no diffs, I can't easily download files to the local IBM...)
1. Fix of the un-optimized default case:
File: Stmt.c Function: casestmt()
in the then-part if 'if (lastst == kw_default)',
add snp->stype = st_case;
somewhere where you like the layout.
2. Fix of an unmentioned bug in 'pointer += integer'
File: Expr.c Function asnop()
directly after label 'ascomm3', add 'getsym();'
change the following 'goto ascomm;' into 'goto ascomm2;'
I have fixed the extending of arguments passed to functions.
(This fix is slightly too complicated to retype here.)
I do this by forcing any declarations of parameters of chars or shorts,
to be declarations of ints. I believe this is the correct thing to
do, although I don't have K&R myself and/or handy.
Any short or char arguments passed to a function are extended to ints.
But, I noticed that Manx does it differently: any short or char
parameters are really only 1 or 2 bytes, just padded on the left to 4 bytes.
(I don't believe this is correct, since you cannot pass anything smaller
than an int to a function, just like floats are expanded to doubles
before being passed to a function).
So, if you take the address of a char parameter, with Manx you get
the address of the 4rd byte of a 4 byte field, while with my
version of PDC I get the address of the 1st byte of a 4 byte field,
so I have a pointer to an int.
My problem is: which method is correct? Both are as easy to implement,
in fact, I had it the Manx way first, and changed it afterwards.
Of course, if I do something, I prefer to do it the right way.
I'd appreciate any comments.
... By the way, due to the gateway I need to use to post to comp.sys.amiga,
there is a significant delay between the moment I post something and the
moment you see it.
---
The opinions possibly reflected herein are my own, and not necessarily
those of someone else I might be connected with. They MAY, however, be.
>>> I *thought* I was living in a free, modern country....
--- Olaf (Rhialto) Seibert... U613042@HNYKUN11.BITNET
USEnet is *almost* an anagram of unsent ... BITnet: Because It's There
Computers? Just say *YES*! Customs? Just say *NO*!