At 00:04 2002-10-10 -0400, you wrote: >On Wednesday, October 9, 2002, at 11:45 PM, Ben Combee wrote: >> >>OK... I'm looking at the POL source, and I'm wondering what would happen >>if you wrote >> >>CDatabase *db = new CDatabase((void *)0); >> >>The default constructor for CDatabase just sets it internal DmOpenRef to >>NULL. A DmOpenRef is a typedef for a void pointer. This will ensure >>that the type conversions are right, which should be happening automatically. > >Hey, that worked! I'll go ahead and clear the data folder and rebuild POL >just to start fresh. I'm not able to get a subclass of CDatabase to work >just yet but I'm very happy about seeing the project build again.
Great. This actually gives us some big clues. NULL is defined in PalmTypes.h as just 0, which would be an int, which is 2-bytes usually on Palm OS. Both C and C++ say a literal 0 is converted to a NULL pointer. I think this is usually working, but there's something that's causing the compiler front end to not do this conversion in some situations. On most of our compilers, this wouldn't be caught, as ints are 4-bytes, the same size as their pointers. I have another case reported of the same ICE, and it was NULL related too, although I don't have full source on that one to reproduce it. If you could do a "Preprocess" on your source file and send that directly to me, it would help very much, and note that any source sent to Metrowerks for QA purpose is kept confidential -- we usually try to use it to get a narrow test case, then don't refer to that source anymore. It may be something related in inlining as well -- both CDatabase and CRecord's constructors are normally inlined. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
