🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.codewarrior
10 messages
10 total messages Started by MW Ron Mon, 25 Aug 2003 18:17
[ANN] New Compiler Features for CWDS Mac OS 9
#742
Author: MW Ron
Date: Mon, 25 Aug 2003 18:17
80 lines
4512 bytes
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.

-- 
         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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#748
Author: Sean McBride
Date: Mon, 25 Aug 2003 23:45
12 lines
1546 bytes
In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
 MW Ron <mwron@metrowerks.com> wrote:

> * 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?
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#751
Author: Andreas Grosam
Date: Tue, 26 Aug 2003 10:08
40 lines
2117 bytes
MW Ron <mwron@metrowerks.com> wrote in message news:<mwron-9D5A52.14174225082003@enews.newsguy.com>...
> 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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#754
Author: MW Ron
Date: Tue, 26 Aug 2003 13:31
57 lines
2835 bytes
In article <e5c40519.0308260208.5cdd6477@posting.google.com>,
 agrosam@onlinehome.de (Andreas Grosam) wrote:

>MW Ron <mwron@metrowerks.com> wrote in message 
>news:<mwron-9D5A52.14174225082003@enews.newsguy.com>...
>> 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?

right  and more.

>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?

There is a check box to use if for Precompiled headers or not.

>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

I think so, but I've not tried it.  If the option is on it should let 
you do this.

Ron

-- 
         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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#756
Author: MW Ron
Date: Tue, 26 Aug 2003 15:44
28 lines
2220 bytes
In article <cwatson-27302C.19452725082003@aeinews.aei.ca>,
 Sean McBride <cwatson@cam.org> wrote:

>In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
> MW Ron <mwron@metrowerks.com> wrote:
>
>> * 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?

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

-- 
         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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#757
Author: Steven Fisher
Date: Thu, 28 Aug 2003 00:32
9 lines
1576 bytes
In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
 MW Ron <mwron@metrowerks.com> wrote:

> * 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? :-)
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#759
Author: Paul Russell
Date: Thu, 28 Aug 2003 03:42
16 lines
1872 bytes
Steven Fisher wrote:
> In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
>  MW Ron <mwron@metrowerks.com> wrote:
> 
> 
>>* 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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#761
Author: MW Ron
Date: Thu, 28 Aug 2003 13:54
24 lines
2069 bytes
In article <sdfisher-76020F.17325427082003@shawnews.vc.shawcable.net>,
 Steven Fisher <sdfisher@spamcop.net> wrote:

>In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
> MW Ron <mwron@metrowerks.com> wrote:
>
>> * 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

-- 
         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
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#762
Author: Steven Fisher
Date: Thu, 28 Aug 2003 18:06
13 lines
1774 bytes
In article <mwron-992EDF.09545828082003@enews.newsguy.com>,
 MW Ron <mwron@metrowerks.com> wrote:

> In article <sdfisher-76020F.17325427082003@shawnews.vc.shawcable.net>,
>  Steven Fisher <sdfisher@spamcop.net> wrote:
> 
> >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. :)
Re: [ANN] New Compiler Features for CWDS Mac OS 9
#764
Author: Steven Fisher
Date: Thu, 28 Aug 2003 18:18
21 lines
1991 bytes
In article <ISe3b.15955$dk4.530825@typhoon.sonic.net>,
 Paul Russell <prussell@sonic.net> wrote:

> Steven Fisher wrote:
> > In article <mwron-9D5A52.14174225082003@enews.newsguy.com>,
> >  MW Ron <mwron@metrowerks.com> wrote:
> > 
> > 
> >>* 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... ;-)

Yeah, really. I only just decided they were right about a month ago... :)

So will precompiled headers still work under the new model?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads