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

Properly expose header files for float exceptions #963

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/Iex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ openexr_define_library(Iex
IexThrowErrnoExc.h
IexErrnoExc.h
IexMacros.h
IexMathFloatExc.h
IexMathIeeeExc.h
Iex.h
IexNamespace.h
IexExport.h
Expand Down
1 change: 1 addition & 0 deletions src/lib/Iex/IexMathFloatExc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "IexMathFloatExc.h"
#include "IexMacros.h"
#include "IexMathExc.h"
#include "IexMathFpu.h"

#if 0
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Iex/IexMathFloatExc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "IexExport.h"
#include "IexNamespace.h"
#include "IexMathExc.h"

#include "IexMathIeeeExc.h"

IEX_INTERNAL_NAMESPACE_HEADER_ENTER
Expand Down
8 changes: 4 additions & 4 deletions src/lib/Iex/IexMathFpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ IEX_INTERNAL_NAMESPACE_HEADER_ENTER
// setFpExceptions() defines which floating
// point exceptions cause SIGFPE signals.
//-----------------------------------------
IEX_EXPORT

void setFpExceptions (int when = (IEEE_OVERFLOW | IEEE_DIVZERO | IEEE_INVALID));


//----------------------------------------
// fpExceptions() tells you which floating
// point exceptions cause SIGFPE signals.
//----------------------------------------
IEX_EXPORT

int fpExceptions ();


Expand All @@ -42,7 +42,7 @@ int fpExceptions ();
//------------------------------------------

extern "C" typedef void (* FpExceptionHandler) (int type, const char explanation[]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does extern "C" mean anything for a typedef?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same question. It was there, so I just left it, although I don't believe so, but I wasn't sure if it implied "nothrow" when in a C++ context, but is still a C function in a portable fashion?

IEX_EXPORT

void setFpExceptionHandler (FpExceptionHandler handler);

// -----------------------------------------
Expand All @@ -53,7 +53,7 @@ void setFpExceptionHandler (FpExceptionHandler handler);
// allow trapping of exception register states
// that can get set though no SIGFPE occurs.
// -----------------------------------------
IEX_EXPORT

void handleExceptionsSetInRegisters();


Expand Down