<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for OS/2 (vers 1 September 2005), see www.w3.org">
<style type="text/css">
      del { font-weight:bold;background-color:#ffa0a0 }
      ins { font-weight:bold;background-color:#a0ffa0 }
      blockquote {
      display: block;
      font-family: "Times New Roman";
      background-color:lightgray;
      margin-top: 1em;
      margin-bottom: 1em;
      margin-left: 40px;
      margin-right: 40px
      }
</style>

  <title>SIGFPE and I/O</title>
</head>

<body>
  <p><br>
  <!-- Who are the authors... -->
   <b>Submitter:</b>CFP<br>
  <!-- What is the date of submission. yyyy-mm-dd -->
   <b>Submission Date:</b> 2024-??-??<br>
  <b>Document:</b> WG14 N33??<br>
  <b>Title:</b>SIGFPE and I/O<br>
  <b>Reference Documents:</b>N3301</p>

  <p><b>Summary</b></p>

  <p>7.12.2#1 says that <b>SIGFPE</b> is not allowed to be raised
  for any <math.h> function. However, <b>SIGFPE</b> could be
  raised for an I/O function or a numeric conversion function. For
  example, <b>scanf</b> of 1e999999 is an overflow. So need a
  broader statement.</p>

  <p><b>Proposal</b></p>

  <p>Add to "7.1.4 Use of library functions" another bullet:</p>

  <blockquote>
    A library function shall execute without raising <b>SIGFPE</b>.
    (The <b>raise</b> function is an exception to this rule.)
  </blockquote>

  <p>Change 7.12.2 Treatment of error conditions #1:<br></p>

  <blockquote>
    ...as if it were a single operation without raising
    <b>SIGFPE</b> and without generating any of the floating-point
    exceptions "invalid", "divide-by-zero", or "overflow" except to
    reflect the result of the function.
  </blockquote>to

  <blockquote>
    ...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 <b>SIGFPE</b>).
  </blockquote>
</body>
</html>