[Python-bugs-list] [Bug #113106] distutils' msvccompiler.py has small C++ defects
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 30 Aug 2000 10:34:47 -0700
Bug #113106, was updated on 2000-Aug-30 04:57
Here is a current snapshot of the bug.
Project: Python
Category: Distutils
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: distutils' msvccompiler.py has small C++ defects
Details: At least in 1.6b1, the msvccompiler.py module of distutils
has a couple of lacks in C++ support, that show up strongly at least when building the "CXX" extension (I also submitted those to the CXX group, but there's little they can do about them, I think).
a) .cxx is not a recognized extension -- it should be listed together with .cc and .cpp, as it's quite common (and it's the one used by the CXX group, as it happens).
Falling-off-a-log-easy to fix.
b) the /GX switch is not given when building C++ sources, which causes (at the very least) warnings from the standard C++ library headers, erroneous handling of exceptions, etc.
Pretty easy to fix as each sourcefile is being separately identified as C++ or C source, just no use is being made of this yet to select the compilation options (I think /gx should be mandatory for C++ sources to give behavior closer to C++ standard, make C++ standard library usable, etc; /gr
for RTTI is a harder decision as it imposes some overhead).
Alex
Follow-Ups:
Date: 2000-Aug-30 10:34
By: gward
Comment:
OK, the .cxx extension was easy to add -- done and checked in.
I'm not sure how to deal with /GX, though: is it OK to include this option when compiling C code? If so, it's a snap: just add it to the 'compile_options' attribute. If not, it's a wee bit trickier. Can you try compiling a C extension with /GX and see what happens?
Here's what Microsoft's online docs say:
"""
/GX (Enable Exception Handling)
This option enables synchronous exception handling with the assumption that extern C functions never throw an exception. It is now equivalent to /EHsc.
For more information, see Exception Handling Topics (C++).
"""
That's at: http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core_.2f.gx.htm
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=113106&group_id=5470