Serious bugs in CWPro2

Serious bugs in CWPro2

Post by Aaron Gil » Wed, 12 Nov 1997 04:00:00



After a nightmarish evening with CWPro2, I've finally discovered two major
bugs in the compiler that are forcing me to revert back to CWPro1.

1. Now that the Universal Headers all support #pragma once, it has revealed
a major problem with CW's implementation of it, namely, that paths are not
resolved before deciding whether or not a file has been included already.
Thus, in the MacHeaders, we have

   #include <Types.h>

and in my code, I have

   #include "types.h"

Each of these refers to a different file, yet because CWPro doesn't resolve
where these files live before discarding them, nothing I tried would allow
me to include the second file.  I was able to work around it by adding this
to my precompiled header:

   #include <ConditionalMacros.h>
   #undef PRAGMA_ONCE
   #define PRAGMA_ONCE 0

But IMHO, I shouldn't need to do this.  <Types.h> and "Types.h" are *not*
the same, and #pragma once should know it!!

2. The "Store static data in TOC" option is not working at all anymore.
Whether I use the preferences panel or the #pragma, I get the annoying
PowerPC indirection which bloats my code and makes it run significantly
slower.  In addition, I have a lot of PowerPC assembly routines that *rely*
on this option, which is preventing me from using CWPro2 at all for
development.  As far as I can see, there is no workaround.  Here is some
example code:

   #pragma toc_data on

   static int a;

   int main(void)
   {
      static int b;
      int c;

      c = a + b;
      return c;
   }

And here is the resulting optimized assembly code:

   00000000: 80820000  lwz      r4,a(RTOC)
   00000004: 80620000  lwz      r3,b$974(RTOC)
   00000008: 80840000  lwz      r4,0(r4)
   0000000C: 80030000  lwz      r0,0(r3)
   00000010: 7C640214  add      r3,r4,r0
   00000014: 4E800020  blr

I don't know what broke this, but I sincerely hope Metrowerks issues a fix
for this one ASAP!

Aaron

--
--
Aaron Giles

 
 
 

Serious bugs in CWPro2

Post by Marc Sherma » Wed, 19 Nov 1997 04:00:00



> Since I also missed this,  I can't give you a hard time.

> in the release notes.

>    #pragma syspath_once on | off | reset (default: off)

>    #include <...> and "..." files are treated as distinct
>    files if this option is selected, even if they refer to the same
>    file.

This pragma solves the case of two distinct files "types.h" and
<types.h>, however, pragma once still fails to correctly distinguish
"foo:bar.h" from "baz:bar.h".

More often than not, it's simplest just to rename the files.

- Marc

 
 
 

1. button bugs in CWPro2 IDE? PowerPlant bugs?

I've discovered some wierd behaviors in the CWPro2 IDE (version 2.1).  The
main wierd one is with buttons -- the act like they've been clicked even
when you drag off them.

Here's a quick way to get it to happen.  Choose "Preferences" under the
"Edit" menu.  Select "Syntax Coloring" under "Editor".  Now, click down on
one of the "Edit..." buttons, but drag the mouse off the button (like you
clicked, but then changed your mind).  The button still behaves as if it's
been clicked.  This seems to happen with most of the non-Chicago-font
buttons in the prefs panels, but not the standard buttons (i.e., the "Save"
button at the bottom seems to be normal).

I was a bit worried about this because I thought the IDE was built using
PowerPlant.  I've also got a lot of code in PowerPlant, and if this is
really a bug in PowerPlant, well, I hope it gets fixed soon.

Additionally, has anyone else noticed that the IDE seems a little unstable?
I've been using CWPro1 for months, and it's been VERY stable, even though
the development I've been doing was pretty low-level with high crash
potential.  But CWPro2 crashes a lot on me -- the main thing is sometimes
I'll switch to CW from the Finder, and then try to click a menu in CW, and
it'll just hang.  If I drop into MacsBug, I'll find that I'm somewhere in
"BowelsOfTheMemoryMgr".  I'd say it was me doing it, but I haven't actually
run any of my code -- I'm still in the process of converting PowerPlant
stuff from CWPro1 to CWPro2.  So I haven't run anything I've written, but
the IDE keeps crapping out.  Anyone else notice this?

2. Access Denied!

3. fairly serious CW11 68K bug, now verified

4. log on bypass

5. Object pascal serious bug?

6. You ain't seen nothing yet

7. Possible Serious Bug in CW6

8. DAT Tape spits out the tape upon completion of backup

9. Heads Up: Serious Memory Management Bug in C++ 5.0

10. Serious FSGetCatalogInfoBulk Bug

11. Serious Bugs in CW 5 (HELP!)

12. Serious IDE 4.2.6 bug under OS X 10.1.2

13. CWPro2 C++ bug: Template-based ptr++ ==> illegal operand