From -4385507959139690477
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,dcef0df6016e8f01
X-Google-Attributes: gidf78e5,public
From: "James Russell Kuyper Jr." <kuyper@wizard.net>
Subject: Re: about #pragma ident
Date: 1998/10/05
Message-ID: <361825C1.2275575B@wizard.net>#1/1
X-Deja-AN: 397832598
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <19981003185805.03740.00003431@ng-fb1.aol.com> <6v6ijp$bf3$1@engnews1.eng.sun.com>
X-Original-Date: Sun, 04 Oct 1998 21:49:53 -0400
Content-Type: text/plain; charset=us-ascii
X-Trace: news6.ispnews.com 907552200 206.161.15.124 (Sun, 04 Oct 1998 21:50:00  EDT)
Organization: Not Enough
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANhhzTOEDnX0m9pzZAQFQRgGAkZq7FflQAjiYyoeSGESjDXXQiJH1+14a XKfnvJlZpRFSu50h4Bc5Pzn85GH//wwS =SqEJ
Mime-Version: 1.0
NNTP-Posting-Date: Sun, 04 Oct 1998 21:50:00 EDT
Newsgroups: comp.std.c++

Steve Clamage wrote:
....
> All pragmas are entirely implementation-defined, according
> to the C++ standard (and the C standard as well). By definition,
> there is no standard use or behavior for any pragma, except
> that compilers are required to ignore unrecognized pragmas.

You're right about C++, and about the current C standard. However, the
following #pragma's have a standard-defined meaning in the draft C9X
standard:

	#pragma STDC FP_CONTRACT on-off-switch
	#pragma STDC FENV_ACCESS on-off-switch
	#pragma STDC CX_LIMITED_RANGE on-off-switch

Where on-off-switch is either OFF or ON. No other #pragmas starting with
"STDC" will be legal in C9X (and therefore, a strictly conforming
program can't be sensitive to whether or not they are supported by the
implementation).

FP_CONTRACT determines whether floating point operations are permitted
to be contracted, so as to avoid the rounding errors implied by the
actually written operations.
FENV_ACCESS indicates whether the code will need access to the floating
point environment test/set functions.
CX_LIMITED_RANGE allows the compiler to use the faster simplified
formulas for such things as complex muliply, divide, and absolute value,
that only work correctly for a limited (but large) range of values.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



