t is a comma–separated list that consists of one or more of the following:
%all, %none, common, [no%]invalid, [no%]overflow, [no%]underflow, [no%]division, [no%]inexact.
-ftrap=common is a macro for -ftrap=invalid,overflow,division.
The f95 default is -ftrap=common. This differs from the C and C++ compiler defaults, which is -ftrap=none.
Sets the IEEE 745 trapping mode in effect at startup but does not install a SIGFPE handler. You can use ieee_handler(3M) or fex_set_handling(3M) to simultaneously enable traps and install a SIGFPE handler. If you specify more than one value, the list is processed sequentially from left to right. The common exceptions, by definition, are invalid, division by zero, and overflow.
Example: -ftrap=%all,no%inexact means set all traps, except inexact.
The meanings for -ftrap=t are the same as for ieee_flags(), except that:
%all turns on all the trapping modes, and will cause trapping of spurious and expected exceptions. Use common instead.
%none turns off all trapping modes.
A no% prefix turns off that specific trapping mode.
To be effective, compile the main program with this option.
For further information, see the “Floating–Point Arithmetic” chapter in the Fortran Programming Guide.