Submitter:CFP
Submission Date: 2024-10-13
Document: WG14 N3378
Title:SIGFPE and I/O
Reference Documents:N3301
Summary
7.12.2#1 says that SIGFPE is not allowed to be raised for any <math.h> function. However, SIGFPE could be raised for an I/O function or a numeric conversion function. For example, scanf of 1e999999 is an overflow. So need a broader statement.
Proposal
Add to "7.1.4 Use of library functions" another bullet:
A library function shall execute without raising SIGFPE. (The raise function is an exception to this rule.)
Change 7.12.2 Treatment of error conditions #1:
...as if it were a single operationtowithout raising SIGFPE andwithout generating any of the floating-point exceptions "invalid", "divide-by-zero", or "overflow" except to reflect the result of the function.
...as if it were a single operation without generating any of the floating-point exceptions "invalid", "divide-by-zero", or "overflow" except to reflect the result of the function (and without raising SIGFPE).