Menu

#193 Make Clipper C++ 6.4.2 to be compiled with exception disabled

*
open
1
2019-05-21
2019-05-21
No

Proposal

I want to propose maintenance patch regarding how Clipper 6.4.2 is being compiled under environments with exception handling in C++. What I'm suggesting is to define Clipper-specific preprocessor defines that allow to detect whether target system is being compiled with or without exception handling.

This is useful for domains like game development where exceptions are not used for performance reasons or target build requiring exceptions to be disabled.

For the actual use case and context, see https://github.com/godotengine/godot/pull/29003

Implementation details

Compilation with exceptions will be determined by various C++ exceptions defines:

  • __cpp_exceptions is part of C++ feature testing macros (since C++98);
  • __EXCEPTIONS is used by some GNU compilers;
  • _CPPUNWIND is used by MSVC.

The user can override specific exceptions behavior via corresponding *_USER macros, as well as disabled exceptions support explicitly by defining CLIPPER_NOEXCEPTION (i.e. compiling for embedded systems).


It would be best if this could be merged and released as 6.4.3 (or be available in trunk) so we don't have to create a custom patch for this downstream.

I believe similar fix could be translated to the upcoming version present in sandbox.

Attached the actual patch for this.

1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB