On 22/07/15 08:46, Matthias Apitz wrote: > Why does the gcc 3.4.3 correct this problem on the fly and stores > the full 64 bit pointer into the receiving char pointer, while the > gcc 4.4.2 does not? > > When this feature or behaviour was changed after gcc 3.4.3? > > Is this somehow a command line flag for gcc to control the behaviour? The question is whether the 64-bit function pointer is truncated when it is read from register RAX on return from the function. This is a matter for the system ABI: it's not something that GCC decides. The x86_64 ABI changed during this timeframe, and you might be seeing an effect of that. I can't remember exactly when the changes were made. However, this is also the kind of thing which can also vary depending on the optimization level. Turn on optimization and it might all break. You can't depend on good luck to make this work. Andrew.