On 02/19/2015 03:09 PM, Jakub Jelinek wrote: > > If you have hw where NULL is mapped and you know your code violates the > C/C++ standards by placing objects at that address, simply do use > the option that is designed for that purpose. As I pointed out earlier, though, that won't help you if your program (perhaps implicitly) uses library code that's been built without the magic option. I thought that declaring an object explicitly placed at address 0 as "volatile" ought to be sufficient to prevent writes to it from being optimized away and replaced with traps, but alas, that is not the case. Also, a structure copy to such a volatile object is implicitly invoking the regular memcpy function without complaining about casting away volatile-ness, as an explicit call would do. I've attached a couple quick test cases and .s output from arm-none-eabi-gcc -O2, using a mainline build from last night. -Sandra