Article View: rmit.comp.sys.mac
Article #7Re: CodeWarrior
From: Luke Walshe
Date: Wed, 05 Aug 1998 00:00
Date: Wed, 05 Aug 1998 00:00
70 lines
3218 bytes
3218 bytes
hamish@moffatt.nu (Hamish Moffatt) writes:
>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.
I know you have read into a char then assign to uchar.
>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
Support for the character type has always been ify in c++.
If you want chars treated like chars by iostream you have
to use char. It will sometimes think uchar is a 8 bit int.
>unsigned char a[4];
change this to 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];
Logical OR will work the same with signed/unsigned types.
>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.
Can't help you, could be anything.
>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?
CW Pro 3 x86 is a good compiler. I can't really tell you anything
about the C++ library. I don't use it. (to buggy).
>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?
Hang in there with CW. A few minor C++ lib quirks are nothing to get
excited about.
>thanks,
>Hamish
Luke.
Technical Details
Message-ID:
<6q8ln4$qeo$1@emu.cs.rmit.edu.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6q6mo2$k20$2@emu.cs.rmit.edu.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a4e6,d3a31d5aa2374f1d X-Google-Attributes: gid10a4e6,public X-Google-Thread: 10b5e3,d3a31d5aa2374f1d X-Google-Attributes: gid10b5e3,public From: Luke Walshe <lw@yallara.cs.rmit.edu.au> Subject: Re: CodeWarrior Date: 1998/08/05 Message-ID: <6q8ln4$qeo$1@emu.cs.rmit.edu.au> X-Deja-AN: 378045891 References: <6q6mo2$k20$2@emu.cs.rmit.edu.au> X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 902289956 27096 131.170.24.42 (5 Aug 1998 04:05:56 GMT) Organization: Department of Computer Science, RMIT X-Posting-User: lw NNTP-Posting-Date: 5 Aug 1998 04:05:56 GMT Newsgroups: rmit.comp.sys.mac,aus.computers.mac