Error handling requirements of inlining code.

Paul Reger paulr at sequent.UUCP
Sat Aug 26 03:42:37 AEST 1989


Have a question about inlining code.  Say a compiler is able to inline
code for optimzation reasons.  What error handling requirements are
imposed on the compiler when doing so ??

For example, say the code:

#include <math.h>
...
    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 standard library practice
for the error is to set errno to EDOM in this case, and return 0.0).

Or is this defined ??

Any help would be greatly appreciated.


Thank you,

             paulr       (Paul Reger)
     Sequent Computer Systems  Beaverton, OR.
 ... {sun,ucbvax!rutgers!ogccse,uunet}!sequent!paulr



More information about the Comp.std.c mailing list