Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!usc!ginosko!aplcen!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Error handling requirements of inlining code. Keywords: Error handling, Inlining, Optimization Message-ID: <10834@smoke.BRL.MIL> Date: 28 Aug 89 04:54:17 GMT References: <20708@sequent.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <20708@sequent.UUCP> paulr@sequent.UUCP (Paul Reger) writes: -For example, say the code: -#include - double x; - x = sqrt(-1.0); -is given the compiler, and it decides to inline sqrt(). Would the -standard require the compiler to also provide error handling of sqrt() -according to the standard library ??? The in-line code doesn't have to agree with the library, but it does have to conform to the Standard. On a domain error (as in your example), EDOM must be stored in errno, and the function returns an implementation- defined value (which may be a NaN, for example). An exception must not be raised.