Article View: rmit.comp.sys.mac
Article #15CodeWarrior
From: Hamish Moffatt
Date: Tue, 04 Aug 1998 00:00
Date: Tue, 04 Aug 1998 00:00
52 lines
2845 bytes
2845 bytes
I've been doing quite a lot of CodeWarrior development lately (on my PC,
because the Mac is too slow and not on my desk). And in the process I've
found quite a few bugs/errors/etc (confirmed by MetroWerks). Here's
the short list:
1. Missing library functions
unsigned char x;
stream >> x;
This won't link; >> operator is missing for unsigned char.
2. Compiler/template library problems where you have to use
__MSL_FIX_ITERATORS__ to work around compiler bugs. Otherwise
some STL classes, like priority_queue in <queue.h>, won't compile.
3. Weird character problems; for example, something like
unsigned char a[4];
int i, j;
for (i = 0; i < 4; i++) {
stream.get(a[i]); // should be stream >> a[i] but see above!
}
j = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3];
does not seem to work properly (j ends up with 0 instead of the correct
value). MetroWerks suggestion was to change it to a char array and turn on
"Use unsigned chars" in the options instead. This seems to fix this particular
problem, but still my code does not run properly -- but the exact same
source runs fine on GNU g++ and Solaris CC.
4. Right now, my program gets a lot further in the debugger than it
does in a non-debug build. The latter seems to hang in one place and chew
a LOT of CPU time.
I find all this to be incredible because as I understand it, CW Pro 3 is
something like the 14th version of the compiler? Even if it's only version
3, how can it contain missing library functions and buggy ones too?
I'm at a loss as to what do. I have Visual C++ 5.0 here waiting to be installed
anyway (to help with the GUI design on Windows) but need to get this thing
running on the Mac eventually anyway. Can someone convince me to "hang in
there" with CW, or suggest another compiler?
thanks,
Hamish
--
Hamish Moffatt, StudIEAust hamish@debian.org, hamish@moffatt.nu
Student, computer science & computer systems engineering. 4th year, RMIT.
http://hamish.home.ml.org/ (PGP key here) CPOM: [******* ] 71%
"Note that in C++, as in life, friendship is not transitive" -- TC++3 manual
Technical Details
Message-ID:
<6q6mo2$k20$2@emu.cs.rmit.edu.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a4e6,d3a31d5aa2374f1d,start X-Google-Attributes: gid10a4e6,public X-Google-Thread: 10b5e3,d3a31d5aa2374f1d,start X-Google-Attributes: gid10b5e3,public From: hamish@moffatt.nu (Hamish Moffatt) Subject: CodeWarrior Date: 1998/08/04 Message-ID: <6q6mo2$k20$2@emu.cs.rmit.edu.au> X-Deja-AN: 377776724 X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 902225474 20544 131.170.24.42 (4 Aug 1998 10:11:14 GMT) Organization: poor. X-Posting-User: moffatt User-Agent: tin/pre-1.4-980226 (UNIX) (SunOS/5.6 (sun4u)) NNTP-Posting-Date: 4 Aug 1998 10:11:14 GMT Newsgroups: rmit.comp.sys.mac,aus.computers.mac