> The new[] expansion is deferred until the end of the source file. It then
> uses whatever pragmas are in effect at that time.
>
Ben,
Most of the time that indeed appears to be true. But it seems to me that is
not always true.
For example, I have a .cpp file in a library that looks like this:
...
void UnknownData::Attribute::Initialize(char tag, const awstringstream&
data)
{
...
memcpy(m_data, data.data(), datasize);
}
void UnknownData::Content::SaveAttributes(WbxmlBufferStream& out)const
{
// Nothing in this function.
}
#pragma segment SegmentWbxmlLibrary
// lots more code here
...
#pragma segment Segment1
(end of file)
memcpy__3stdFPvPCvUl get put in segment 1 as you would expect.
HOWEVER, if I move the #pragma segment SegmentWbxmlLibrary immediately after
the UnknownData::Attribute::Initialize() method (before the
UnknownData::Content::SaveAttributes() function instead of after it),
memcpy__3stdFPvPCvUl is now put in SegmentWbxmlLibrary.
Consider it an FYI. It isn't affecting me since I know how to get it to go
in the segment I want. But it is definitely happening.
Maybe it has something to do with whether the pragma is in a library file
instead of a normal object file?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/