Skip to content

Conversation

okhowang
Copy link
Contributor

@okhowang okhowang commented Apr 7, 2020

fix #60
I use macro protect throw currently.
additionly, remove_all and recursive_directory_iterator::increment has a little change for ec processing

@okhowang okhowang changed the title use macro protect all throw function directly use macro protect all throw function Apr 7, 2020
@gulrak
Copy link
Owner

gulrak commented Apr 7, 2020

I think i would prefer early in the header something along the lines of:

#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
#define GHC_WITH_EXCEPTIONS
#endif

Then all other #if would become #ifdef GHC_WITH_EXCEPTIONS and someone with a compiler not using one of the macros to signal exception support can enable it with the define without setting macros in compiler private namespace.

And it is easier to expand if needed.

@okhowang
Copy link
Contributor Author

okhowang commented Apr 7, 2020

I think i would prefer early in the header something along the lines of:

#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
#define GHC_WITH_EXCEPTIONS
#endif

Then all other #if would become #ifdef GHC_WITH_EXCEPTIONS and someone with a compiler not using one of the macros to signal exception support can enable it with the define without setting macros in compiler private namespace.

And it is easier to expand if needed.

done

@gulrak
Copy link
Owner

gulrak commented Apr 7, 2020

Thanks for the work and for the corrections.

@gulrak gulrak merged commit 2ad75e1 into gulrak:master Apr 7, 2020
@gulrak gulrak added this to the v1.3.4 milestone Apr 8, 2020
@okhowang okhowang deleted the no-exception branch May 4, 2020 04:11
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.

Support for -fno-exception

2 participants