mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-18 03:19:15 +08:00
Enable less FP exceptions for clang compiler when running tesseract
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
c39b1daa6b
commit
fe614c6069
@ -622,7 +622,12 @@ static void PreloadRenderers(
|
||||
int main(int argc, char** argv) {
|
||||
#if defined(__USE_GNU)
|
||||
// Raise SIGFPE.
|
||||
#if defined(__clang__)
|
||||
// clang creates code which causes some FP exceptions, so don't enable those.
|
||||
feenableexcept(FE_DIVBYZERO);
|
||||
#else
|
||||
feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID);
|
||||
#endif
|
||||
#endif
|
||||
const char* lang = nullptr;
|
||||
const char* image = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user