Emulating diab compiler behaviour memory-is-volatile

lapo_pasqui@libero.it lapo_pasqui@libero.it
Mon Nov 10 09:40:00 GMT 2003


Hi,
I'm trying to build an application written whith the diab compiler using  gcc
version 3.3.

The whole software has been written in the assumption every global variable
should be threaten as volatile, thanks to the diab compiler specific  option
-Xmemory-is-volatile.
As the diab manual states:
«Do not perform optimizations that can cause device drivers, etc.,
to fail. By default, the compiler keeps data in registers as long as
possible whenever it is safe. Difficulties can arise if a memory
location changes because it is mapped to an external hardware
device and the compiler, unaware of this change, continues to use
the old value that is stored in a register. These situations can be
handled with the keyword volatile. However, in order to allow
for the compilation of older programs - compiler provides the
-Xmemory-is-volatile option»

Do you know if there is a similar option in the gcc?

Thanks
   Lapo




More information about the Gcc-help mailing list