TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Robert A. Larson 75126,723
date: 1990-09-08 21:54:11
subject: #Osk 2.2 C bugs

#: 6611 S12/OS9/68000 (OSK)
    08-Sep-90  21:54:11
Sb: #Osk 2.2 C bugs
Fm: Robert A. Larson 75126,723
To: all

In porting C news to os9/68k, I've noticed a couple of bugs in the C compiler
that comes with osk 2.2:

        "string"[0] != 's'

        sizeof "string" != 6

The first one generates code that does a string derefernce, but does store the
string to derefernce.  (Two NULs are generated for the string to derefernce.)
This bug was fairly easy to work around, I just changed a macro to generate
slower smaller code.

sizeof a string constant returns 4, rather than the number of chacters in that
constant.  This bug was much harder to work around, since strlen does not
result in a constant.  Working around this created much bigger, much uglier,
and much slower code.

Could someone see if these bugs are fixed in osk 2.3?  (Microware hasn't
answered their mail.)  Are the nasty problems in make fixed?

(If anyone is interested in getting usenet on an osk machine, I'll probably be
ready for C news/Rn beta testers in a few weeks.)

There is 1 Reply.

SOURCE: compuserve via textfiles.com

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™.