[issue20221] #define hypot _hypot conflicts with existing definition

Zachary Ware report at bugs.python.org
Tue Jan 28 21:17:07 CET 2014


Zachary Ware added the comment:

Your test program works for VS2010 as well (/W4 is unnecessary, the default warning level gives the warning), but still doesn't answer the question of why the math module (specifically math.hypot) doesn't show the problem.

I understand why both of your cases *don't* work, I want to understand why mathmodule.c and cmathmodule.c (and complexobject.c, for that matter) *do* work.  Attempting to compile mathmodule.c alone results in the warning, and even picking through mathmodule.i as produced by preprocessing to file, it looks like math_hypot should always have the problem.

The fact that math_hypot works when compiled with the rest of Python frankly frustrates me quite a lot, because I can see no reason why it should.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20221>
_______________________________________


More information about the Python-bugs-list mailing list