IEEE Std 1003.1-2001 Interpretation #23

Copyright © 2006 IEEE. All rights reserved.

Interpretation Number:	023
                  	Topic:			feupdate raising saved exceptions
                    	Relevant Sections:	feupdateenv()

------------------------------------------------------------------------

7 Defect Report concerning (number and title of International Standard or DIS final text, if applicable):

The System Interfaces volume of IEEE Std 1003.1-2001

------------------------------------------------------------------------

8 Qualifier (e.g. error, omission, clarification required):

3. Clarification required

------------------------------------------------------------------------

9 References in document (e.g. page, clause, figure, and/or table numbers):

Edition of Specification (Year): 2003 Page: 358 Line: 11630 Section: feupdateenv()

Reference XSH Latest ERN 28

------------------------------------------------------------------------

10 Nature of defect (complete, concise explanation of the perceived problem):

We are requesting clarification on the following:

The description of feupdateenv() states "The feupdateenv() function shall attempt to save the currently raised floating-point exceptions in its automatic storage, attempt to install the floating-point environment represented by the object pointed to by envp, and then attempt to raise the saved floating-point exceptions. The argument envp shall point to an object set by a call to feholdexcept() or fegetenv(), or equal a floating-point environment macro."

Regarding the statement "and then attempt to raise the saved floating-point exceptions." what floating-point exceptions get raised? (1) Those that were originally saved away in the automatic storage or (2) those that are indicated by envp?

Please clarify which floating point exceptions get raise.

------------------------------------------------------------------------

11 Solution proposed by the submitter (optional):

None.

------------------------------------------------------------------------

Interpretation response ------------------------ The standard clearly states the requirements for feupdateenv() that the floating-point exceptions that should be raised are those that are saved, and conforming implementations must conform to this.

Rationale: --------- In effect, feupdateenv is like (ignoring unsuccessful calls):

int now; now = fetestexcept(FE_ALL_EXCEPT); /* save current exceptions */ fesetenv(envp); /* restore environment */ feraiseexcept(now); /* re-raise current exceptions */

Back to IEEE Standards Interpretations for IEEE Std 1003.1-2001