Some obscure errors with BP 7.0

Hello,

I would like to know whether these errors sound common to anyone on this list.
I checked the FAQ and some error lists but could not find much related info.

1.
  I have a large windows program, which uses a lot of memory management. I
  bumped into the situation where 2 consecutive Getmem's reserved overlapping
  memory. I changed all code with MemAlloc's, which did not change the
  problem. Finally, using MemAllocSeg, the problem disappeared. Of course, I
  still do not sleep too wel :-(

2.
  This same applications uses longints for primary keys. If you do things like
  li := li + 4, then everything tends to break in some situations. What
  happens, is that the (stupid) compiler casts the 4 to a 2 byte value, does
  the same with li, adds this 4 to the (low) integer li (which should be a
  longint)  and re-casts the result to a longint for li.

Both errors cost me a lot of work.
If people found similar behaviour, this may have to be added to the FAQ?

Best regards,

Arjen
--
=============================================================================
Centre for Telematics and Information Technology
University of Twente                               Email: ar...@cs.utwente.nl
PO Box 217                                         tel:     +31-(0)53-4893763
7500 AE Enschede                                   fax:     +31-(0)53-4892927
The Netherlands
====================== http://www.cs.utwente.nl/~arjen ======================