🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #6036

Re: matherr -- pANSand OCS

#6036
From: Doug Gwyn
Date: Mon, 15 May 1989 20:19
21 lines
1538 bytes
In article <120200005@hcx2> daver@hcx2.SSD.HARRIS.COM writes:
>The 88open Trial Use OCS (3/10/89) lists 'matherr' as a service residing in 
>libm (see section 7.4).
>Can an implementation, then, be both ANSI C and 88k OCS compliant in this 
>regard?  Or can both "standards" be satisfied by having a routine such as
>'__matherr'?

I don't know what the OCS says, but there is no injunction in the C Standard
against an implementation providing additional functions in its C library,
so long as no constraint of the Standard is thereby violated.

The way this would have to be implemented would be for the math library
functions to call __matherr() and for <math.h> to #define matherr __matherr
as well as to declare struct exception.  However, such definitions of
reserved-for-application-use symbols must be controlled by some mechanism,
e.g. #ifdef _POSIX_SOURCE, that ensures that the definitions will not occur
when compiling in an ANSI-conforming mode.

Vendors with IEEE floating-point architectures are already angry enough
about having to mess around with errno; I can imagine what they must think
about having to call matherr().
Technical Details
Message-ID: <10264@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn
References: <120200005@hcx2>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: matherr -- pANSand OCS
Message-ID: <10264@smoke.BRL.MIL>
Date: 15 May 89 20:19:55 GMT
References: <120200005@hcx2>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 21