btzy / nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IEEE_INVALID_FLAG message after calling NFD from gfortran

hyoungren opened this issue · comments

I am calling NFD from gfortran for a file dialog to get a path to a file. Everything works but I get an IEEE error at exit (from fortran).
I use a short C interface (largely taken from the test_getfiledialog.c example) as the "glue" to gfortran. The main only consists of a call to the getfiledialog interface and a print of the path to check it. This output follows after the gfortran code exit:

"Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG"

This message does NOT appear if I call the same interface from a C main() rather than from gfortran.

These IEEE messages appear for OSX and for Ubuntu using gfortran (from macports or brew on OSX) but no similar message appears when the same code is compiled and run on Win10/11 compiling with MSYS2/mingw64.

I am mystified why an IEEE floating point exception is being triggered for NFD... and not for mingw64.

Please provide a minimal example that reproduces this problem.

I highly suspect your code has a bug. Perhaps the mingw64 compiler doesn't check for FP exceptions?

I'm going to close this. Feel free to reopen it if you have a minimal and reproduceable example.