Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define _HAS_EXCEPTIONS=0 from vs2010 for exceptionhandling off #979

Merged
merged 2 commits into from
Dec 21, 2017

Conversation

tdesveauxPKFX
Copy link
Contributor

Not defining _HAS_EXCEPTIONS=0 when ExceptionHandling is off cause warning.
warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

Ref: (VSINTALL)\VC\include\xstddef

@starkos
Copy link
Member

starkos commented Dec 19, 2017

Thanks for this! You will also need to run the unit tests (premake5 test) and fix the ones that are failing because of the new flag.

@tdesveauxPKFX
Copy link
Contributor Author

My bad, totally forgot. Should be good now.

Also I took the time to track the commit that added the vs2013 condition.
5a4ad51
It was made by @tvandijck , we may want to have his opinion on this?

@samsinsane
Copy link
Member

@tdesveauxPKFX He's currently unavailable for the next month(?) perhaps longer.

@TurkeyMan do any of your projects build with VS2010 still? Additionally, do you guys disable the warning 4530? That number looks really familiar, and I'm assuming that's because it was disabled here (probably by you).

Just to provide a little more insight into the reason this was attached to VS2013+, for those that don't already know. VS2013 had an issue that resulted in warnings regarding throw/noexcept in various C/C++/STL headers, and if I recall correctly, these warnings couldn't be disabled - or it just failed to disable them. So using this was much easier, I only came across this issue after upgrading to VS2013, our VS2010 builds didn't suffer from the 4530 warning (probably because it was disabled). I'm going to assume everyone just disabled that warning and moved on, and then VS2013 reared it's head.

@starkos
Copy link
Member

starkos commented Dec 20, 2017

I'm not at all familiar with this issue, I'll leave it up to @samsinsane and @TurkeyMan to make the call on this one.

@samsinsane
Copy link
Member

Let's merge it! It resolves an issue, and makes the code less "condition-y" and that's just perfect 👍

@samsinsane samsinsane merged commit ef9b341 into premake:master Dec 21, 2017
@tdesveauxPKFX tdesveauxPKFX deleted the fix-noexceptions-vs2010 branch January 9, 2018 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants