Martin v. Löwis added the comment:

> Having the compiler merge different pointers just because the functions 
> happen to have the same implementation is simply *not cool* from the 
> point of view of the CPython code base.

I believe the compiler is completely entitled to do so according to the C 
language definition. There is no guarantee that two different functions have 
two different addresses as long as calling the function pointer does the same 
thing according to the as-if rule.

So we really need to fix Python, not work-around in the compiler. There may be 
many more compilers which use the same optimisation. Python relying on 
undefined behavior is simply *not cool*.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8847>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to