[gdal-dev] Windows MSVC exception handling model

Lucian Plesea lucianpls at yahoo.com
Tue Nov 14 12:04:18 PST 2017

Is there a specific reason to use /EHsc and not /EHs for windows compilation?The difference is that /EHsc, which is used now, tells the MSVC that extern "C" functions can't throw exceptions.
I am trying to use libjpeg and use C++ exception instead of setjmp/longjmp, by having libjpeg call a C++ function that throws an exception.  With /EHs it works fine, but with /EHsc, incorrect code will be generated and the exception will not be caught.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171114/01f05dce/attachment.html>

More information about the gdal-dev mailing list