In a POL release build, the new [] operator, aka, __nwa__FUl, was getting inlined right into my .cpp file. So far, not a problem. But In a completely different file, I am using "#pragma segment Segment2" and new []. Codewarrior included new there also and the linker decided that was the One True version of new.
new and array new are different operations in the C++ language.
If I have a function
#pragma segment Segment1
void Foo()
{
int a = new int[5];
}
#pragma segment Segment2
The new [] will get linked into Segment2, not Segment1 as you (ok, I) might expect. You have to put the "#pragma segment Segment2" after the NEXT function.
The new[] expansion is deferred until the end of the source file. It then uses whatever pragmas are in effect at that time.
--
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/
