Topic: about #pragma ident
Author: stephen.clamage@sun.com (Steve Clamage)
Date: 1998/10/04 Raw View
deepbag1@aol.com (DeepBag1) writes:
>I would like to know when, where, how, and why
> #pragma ident " ... "
>is used.
You will have to read your compiler's documentation.
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.
--
Steve Clamage, stephen.clamage@sun.com
[ 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 ]
Author: "James Russell Kuyper Jr." <kuyper@wizard.net>
Date: 1998/10/05 Raw View
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 ]