http://tinyurl.com/63bqo2

Based on that patch, I made the attached patch in distutils to
msvc9compiler.py and that made the complaints disappear
(and presumably made the exceptions work?).

Is there any downside to doing this by default?
Or should I parameterize my build_ext for that platform
to include that option?


This option is only for C++ code, and not for every C++ code. Some people don't want exception to be handled (take a look at Boost for instance that let the user decide whether its exception handling is done by the compiler or by the user), as it can add overhead in some places.
With Scons, the problem is the same, you have to add by hand this flag, and I think it is the correct way of doing things.
Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher">

(original) (raw)

Hi,

2008/5/17 Jim Kleckner <jek-gmane@kleckner.net>:

Martin v. L�wis wrote:

In building a package with several platforms, I

ran across the warning message below from Visual

Studio 2008.  Should we add the /EHsc option to the

compile_options in distutils for MSVC?  Or is it more

complex than that...


Who is "we"? If you have a module that uses C++ exceptions,
you should certainly enable compiler support for exceptions,
for that module.

In my original email, I referred to the patch for distutils at:
 http://tinyurl.com/63bqo2

Based on that patch, I made the attached patch in distutils to
msvc9compiler.py and that made the complaints disappear
(and presumably made the exceptions work?).

Is there any downside to doing this by default?
Or should I parameterize my build\_ext for that platform
to include that option?


This option is only for C++ code, and not for every C++ code. Some people don't want exception to be handled (take a look at Boost for instance that let the user decide whether its exception handling is done by the compiler or by the user), as it can add overhead in some places.
With Scons, the problem is the same, you have to add by hand this flag, and I think it is the correct way of doing things.

Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher