Some Compiler Features:
* The compiler now has an Instance Manager that tracks templates &
doesn't recompile them (improves compile speed).
* This option reduces compile time by telling the compiler to generate
any instance of a template (or non-inlined inline) function only once.
Object code size (and associated debug information size) is reduced.
This does not affect the output file size, though, since the compiler is
effectively doing the same task as the linker in this mode.
Mach-O bool type is 4 bytes (... so you can build KExts).
* The option "Enable GCC extensions" has been added and support for GCC
extensions has been enhanced. (replaces old #pragma)
* C99 variable length arrays are now supported.
* This is supported:
#pragma c99 on
void f(int n)
{
int arr[n];
}
* Please note that VLAs are only supported in local or function
prototype scope (as required by the C99 standard):
#pragma c99 on
int n;
int arr[n];
// Error: variable length array types can only be used in local or
function prototype scope.
* VLAs also work in the C++ compiler when C99 is enabled, however, you
cannot use VLAs in a function template's prototype scope or in local
template typedefs.
* CodeWarrior can now track include file guard macros.
* The preprocessor will track macros used to guard #include files to
reduce parsing time. I.e., if a file's contents are surrounded with:
#ifndef FOO_H
#define FOO_H
... contents ...
#endif
The compiler will not attempt to load the file twice, saving a
negligible amount of time used to skip the contents of the file.
* New warnings such as (missing 'return' statements, expression has no
side-effects, include file capitalization).
* A new preprocessor panel has been added.
* The prefix file field has been removed from the C/C++ Language panel.
You can use the new text field that can be used to #define macros, set
#pragmas, or #include prefix files.
* Allows you to set a number of options for preprocessing including:
* "Keeping" comments
* Emitting file changes
* Emitting #pragmas
* Include prefix text when building precompiled headers
* Show full paths
* The Mach-O linker now produces STABS output.
* Complete STABS info or just STABS line info.
* Produces STABS in addition to (or without) SYM info.
* The end result is that the Apple Mach-O linker is no longer necessary
and has been removed.
* Code folding.
* All safe code (for any functions with exactly the same code).
* could also be referred to as coalescing functions by content. The
linker already coalesces template and inline functions by name.
This new implementation also allows coalescing functions by their
instructions so that functions which have different names, but which
contain the same instructions (and references to the same objects) can
be coalesced into a single function.
For functions which are exported or have their address explicitly
taken (except by exception tables) will retain a stub branch to the code
so that the ANSI rule that two functions must have unique pointers will
be followed.

Signature
CodeWarrior Development Studio for Macintosh v9
Enhance Your Productivity and Shorten your Development Cycles
<http://store.metrowerks.com/>
Sales and Support 512-996-5300 800-377-5416
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Sean McBride - 26 Aug 2003 00:45 GMT
> * The Mach-O linker now produces STABS output.
> * Complete STABS info or just STABS line info.
> * Produces STABS in addition to (or without) SYM info.
> * The end result is that the Apple Mach-O linker is no longer necessary
> and has been removed.
Another use of the Apple linker was to build libXXX.a type static
libraries (as opposed to .lib), which is the format needed to be
compatible with PB/gcc. Can CW 9 make .a static libraries?
MW Ron - 26 Aug 2003 16:44 GMT
>> * The Mach-O linker now produces STABS output.
>> * Complete STABS info or just STABS line info.
[quoted text clipped - 5 lines]
>libraries (as opposed to .lib), which is the format needed to be
>compatible with PB/gcc. Can CW 9 make .a static libraries?
We plan on having a .lib to .a standalone converter but for now. With
this release though we will have thes old STABS tools on the CD for
those that need them.
Ron

Signature
CodeWarrior Development Studio for Macintosh v9
Enhance Your Productivity and Shorten your Development Cycles
<http://store.metrowerks.com/>
Sales and Support 512-996-5300 800-377-5416
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Andreas Grosam - 26 Aug 2003 11:08 GMT
> Some Compiler Features:
[...]
> * The prefix file field has been removed from the C/C++ Language panel.
> You can use the new text field that can be used to #define macros, set
> #pragmas, or #include prefix files.
That is, the content of this text field was formerly included with a
prefix file.
Means this is equivalent to the old method:
Formerly in the Prefix File Field:
MyPrefixFile.h
New Text field:
#include MyPrefixHeader.h
which has the same effect.
And now we have more flexibility:
#define MY_DEBUG
#include MyPrefixFile.h
Right?
Question:
Will this text field be included for pre-compiling, too? That is, if
there is a MyPrecompHeader.pch++, will the text field implicitly
included in the precomp source file?
Would this be possible:
#if __option(precompile)
#define MY_OPTION
#define PRECOMPILE_TARGET "MyPrecompTarget1.mch"
// MyPrecompHeader.pch++ contains #pragma precompile_target
PRECOMPILE_TARGET
#else
#include "MyPrecompTarget1.mch"
#endif
Andreas
Steven Fisher - 28 Aug 2003 01:32 GMT
> * The prefix file field has been removed from the C/C++ Language panel.
> You can use the new text field that can be used to #define macros, set
> #pragmas, or #include prefix files.
Bah. Hasn't Metrowerks been telling us for years that the prefix file
field was a superior solution? :-)
Paul Russell - 28 Aug 2003 04:42 GMT
>>* The prefix file field has been removed from the C/C++ Language panel.
>>You can use the new text field that can be used to #define macros, set
>>#pragmas, or #include prefix files.
>
> Bah. Hasn't Metrowerks been telling us for years that the prefix file
> field was a superior solution? :-)
Be careful what you wish for... ;-)
Paul
Steven Fisher - 28 Aug 2003 19:18 GMT
> >>* The prefix file field has been removed from the C/C++ Language panel.
> >>You can use the new text field that can be used to #define macros, set
[quoted text clipped - 4 lines]
>
> Be careful what you wish for... ;-)
Yeah, really. I only just decided they were right about a month ago... :)
So will precompiled headers still work under the new model?
MW Ron - 28 Aug 2003 14:54 GMT
>> * The prefix file field has been removed from the C/C++ Language panel.
>> You can use the new text field that can be used to #define macros, set
>> #pragmas, or #include prefix files.
>
>Bah. Hasn't Metrowerks been telling us for years that the prefix file
>field was a superior solution? :-)
It still is, and it is still there but now you can add more. Wow, it is
the best of both worlds eh? :)
Ron

Signature
CodeWarrior Development Studio for Macintosh v9
Enhance Your Productivity and Shorten your Development Cycles
<http://store.metrowerks.com/>
Sales and Support 512-996-5300 800-377-5416
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Steven Fisher - 28 Aug 2003 19:06 GMT
> >Bah. Hasn't Metrowerks been telling us for years that the prefix file
> >field was a superior solution? :-)
>
> It still is, and it is still there but now you can add more. Wow, it is
> the best of both worlds eh? :)
Okay, okay. I'll grant you that. I was just slightly amused by it. :)