Стандарт языка Си С99 TC (1113411), страница 85
Текст из файла (страница 85)
The following are implementation-defined:J.3.1 Translation1— How a diagnostic is identified (3.10, 5.1.1.3).— Whether each nonempty sequence of white-space characters other than new-line isretained or replaced by one space character in translation phase 3 (5.1.1.2).J.3.2 Environment1— The mapping between physical source file multibyte characters and the sourcecharacter set in translation phase 1 (5.1.1.2).— The name and type of the function called at program startup in a freestandingenvironment (5.1.2.1).— The effect of program termination in a freestanding environment (5.1.2.1).— An alternative manner in which the main function may be defined (5.1.2.2.1).— The values given to the strings pointed to by the argv argument to main (5.1.2.2.1).— What constitutes an interactive device (5.1.2.3).— The set of signals, their semantics, and their default handling (7.14).— Signal values other than SIGFPE, SIGILL, and SIGSEGV that correspond to acomputational exception (7.14.1.1).— Signals for which the equivalent of signal(sig, SIG_IGN); is executed atprogram startup (7.14.1.1).— The set of environment names and the method for altering the environment list usedby the getenv function (7.20.4.5).— The manner of execution of the string by the system function (7.20.4.6).J.3.3 Identifiers1— Which additional multibyte characters may appear in identifiers and theircorrespondence to universal character names (6.4.2).— The number of significant initial characters in an identifier (5.2.4.1, 6.4.2).§J.3.3Portability issues505ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256J.3.4 Characters1— The number of bits in a byte (3.6).— The values of the members of the execution character set (5.2.1).— The unique value of the member of the execution character set produced for each ofthe standard alphabetic escape sequences (5.2.2).— The value of a char object into which has been stored any character other than amember of the basic execution character set (6.2.5).— Which of signed char or unsigned char has the same range, representation,and behavior as ‘‘plain’’ char (6.2.5, 6.3.1.1).— The mapping of members of the source character set (in character constants and stringliterals) to members of the execution character set (6.4.4.4, 5.1.1.2).— The value of an integer character constant containing more than one character orcontaining a character or escape sequence that does not map to a single-byteexecution character (6.4.4.4).— The value of a wide character constant containing more than one multibyte character,or containing a multibyte character or escape sequence not represented in theextended execution character set (6.4.4.4).— The current locale used to convert a wide character constant consisting of a singlemultibyte character that maps to a member of the extended execution character setinto a corresponding wide character code (6.4.4.4).— The current locale used to convert a wide string literal into corresponding widecharacter codes (6.4.5).— The value of a string literal containing a multibyte character or escape sequence notrepresented in the execution character set (6.4.5).J.3.5 Integers1— Any extended integer types that exist in the implementation (6.2.5).— Whether signed integer types are represented using sign and magnitude, two’scomplement, or ones’ complement, and whether the extraordinary value is a traprepresentation or an ordinary value (6.2.6.2).— The rank of any extended integer type relative to another extended integer type withthe same precision (6.3.1.1).— The result of, or the signal raised by, converting an integer to a signed integer typewhen the value cannot be represented in an object of that type (6.3.1.3).506Portability issues§J.3.5WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— The results of some bitwise operations on signed integers (6.5).J.3.6 Floating point1— The accuracy of the floating-point operations and of the library functions in<math.h> and <complex.h> that return floating-point results (5.2.4.2.2).— The accuracy of the conversions between floating-point internal representations andstring representations performed by the library functions in <stdio.h>,<stdlib.h>, and <wchar.h> (5.2.4.2.2).— The rounding behaviors characterized by non-standard values of FLT_ROUNDS(5.2.4.2.2).— The evaluation methods characterized by non-standard negative values ofFLT_EVAL_METHOD (5.2.4.2.2).— The direction of rounding when an integer is converted to a floating-point number thatcannot exactly represent the original value (6.3.1.4).— The direction of rounding when a floating-point number is converted to a narrowerfloating-point number (6.3.1.5).— How the nearest representable value or the larger or smaller representable valueimmediately adjacent to the nearest representable value is chosen for certain floatingconstants (6.4.4.2).— Whether and how floating expressions are contracted when not disallowed by theFP_CONTRACT pragma (6.5).— The default state for the FENV_ACCESS pragma (7.6.1).— Additional floating-point exceptions, roundingclassifications, and their macro names (7.6, 7.12).modes,environments,and∗— The default state for the FP_CONTRACT pragma (7.12.2).J.3.7 Arrays and pointers1— The result of converting a pointer to an integer or vice versa (6.3.2.3).— The size of the result of subtracting two pointers to elements of the same array(6.5.6).§J.3.7Portability issues507ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256J.3.8 Hints1— The extent to which suggestions made by using the register storage-classspecifier are effective (6.7.1).— The extent to which suggestions made by using the inline function specifier areeffective (6.7.4).J.3.9 Structures, unions, enumerations, and bit-fields1— Whether a ‘‘plain’’ int bit-field is treated as a signed int bit-field or as anunsigned int bit-field (6.7.2, 6.7.2.1).— Allowable bit-field types other than _Bool, signed int, and unsigned int(6.7.2.1).— Whether a bit-field can straddle a storage-unit boundary (6.7.2.1).— The order of allocation of bit-fields within a unit (6.7.2.1).— The alignment of non-bit-field members of structures (6.7.2.1).
This should presentno problem unless binary data written by one implementation is read by another.— The integer type compatible with each enumerated type (6.7.2.2).J.3.10 Qualifiers1— What constitutes an access to an object that has volatile-qualified type (6.7.3).J.3.11 Preprocessing directives1— The locations within #pragma directives where header name preprocessing tokensare recognized (6.4, 6.4.7).— How sequences in both forms of header names are mapped to headers or externalsource file names (6.4.7).— Whether the value of a character constant in a constant expression that controlsconditional inclusion matches the value of the same character constant in theexecution character set (6.10.1).— Whether the value of a single-character character constant in a constant expressionthat controls conditional inclusion may have a negative value (6.10.1).— The places that are searched for an included < > delimited header, and how the placesare specified or the header is identified (6.10.2).— How the named source file is searched for in an included " " delimited header(6.10.2).— The method by which preprocessing tokens (possibly resulting from macroexpansion) in a #include directive are combined into a header name (6.10.2).508Portability issues§J.3.11WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— The nesting limit for #include processing (6.10.2).— Whether the # operator inserts a \ character before the \ character that begins auniversal character name in a character constant or string literal (6.10.3.2).— The behavior on each recognized non-STDC #pragma directive (6.10.6).— The definitions for _ _DATE_ _ and _ _TIME_ _ when respectively, the date andtime of translation are not available (6.10.8).J.3.12 Library functions1— Any library facilities available to a freestanding program, other than the minimal setrequired by clause 4 (5.1.2.1).— The format of the diagnostic printed by the assert macro (7.2.1.1).— The representation of the floating-pointfegetexceptflag function (7.6.2.2).statusflagsstoredbythe— Whether the feraiseexcept function raises the ‘‘inexact’’ floating-pointexception in addition to the ‘‘overflow’’ or ‘‘underflow’’ floating-point exception(7.6.2.3).— Strings other than "C" and "" that may be passed as the second argument to thesetlocale function (7.11.1.1).— The types defined for float_t and double_t when the value of theFLT_EVAL_METHOD macro is less than 0 (7.12).— Domain errors for the mathematics functions, other than those required by thisInternational Standard (7.12.1).— The values returned by the mathematics functions on domain errors (7.12.1).— The values returned by the mathematics functions on underflow range errors, whethererrno is set to the value of the macro ERANGE when the integer expressionmath_errhandling & MATH_ERRNO is nonzero, and whether the ‘‘underflow’’floating-point exception is raised when the integer expression math_errhandling& MATH_ERREXCEPT is nonzero.
(7.12.1).— Whether a domain error occurs or zero is returned when an fmod function has asecond argument of zero (7.12.10.1).— Whether a domain error occurs or zero is returned when a remainder function hasa second argument of zero (7.12.10.2).— The base-2 logarithm of the modulus used by the remquo functions in reducing thequotient (7.12.10.3).§J.3.12Portability issues509ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256— Whether a domain error occurs or zero is returned when a remquo function has asecond argument of zero (7.12.10.3).— Whether the equivalent of signal(sig, SIG_DFL); is executed prior to the callof a signal handler, and, if not, the blocking of signals that is performed (7.14.1.1).— The null pointer constant to which the macro NULL expands (7.17).— Whether the last line of a text stream requires a terminating new-line character(7.19.2).— Whether space characters that are written out to a text stream immediately before anew-line character appear when read in (7.19.2).— The number of null characters that may be appended to data written to a binarystream (7.19.2).— Whether the file position indicator of an append-mode stream is initially positioned atthe beginning or end of the file (7.19.3).— Whether a write on a text stream causes the associated file to be truncated beyond thatpoint (7.19.3).— The characteristics of file buffering (7.19.3).— Whether a zero-length file actually exists (7.19.3).— The rules for composing valid file names (7.19.3).— Whether the same file can be simultaneously open multiple times (7.19.3).— The nature and choice of encodings used for multibyte characters in files (7.19.3).— The effect of the remove function on an open file (7.19.4.1).— The effect if a file with the new name exists prior to a call to the rename function(7.19.4.2).— Whether an open temporary file is removed upon abnormal program termination(7.19.4.3).— Which changes of mode are permitted (if any), and under what circumstances(7.19.5.4).— The style used to print an infinity or NaN, and the meaning of any n-char or n-wcharsequence printed for a NaN (7.19.6.1, 7.24.2.1).— The output for %p conversion in the fprintf or fwprintf function (7.19.6.1,7.24.2.1).— The interpretation of a - character that is neither the first nor the last character, northe second where a ^ character is the first, in the scanlist for %[ conversion in thefscanf or fwscanf function (7.19.6.2, 7.24.2.1).510Portability issues§J.3.12WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3— The set of sequences matched by a %p conversion and the interpretation of thecorresponding input item in the fscanf or fwscanf function (7.19.6.2, 7.24.2.2).— The value to which the macro errno is set by the fgetpos, fsetpos, or ftellfunctions on failure (7.19.9.1, 7.19.9.3, 7.19.9.4).— The meaning of any n-char or n-wchar sequence in a string representing a NaN that isconverted by the strtod, strtof, strtold, wcstod, wcstof, or wcstoldfunction (7.20.1.3, 7.24.4.1.1).— Whether or not the strtod, strtof, strtold, wcstod, wcstof, or wcstoldfunction sets errno to ERANGE when underflow occurs (7.20.1.3, 7.24.4.1.1).— Whether the calloc, malloc, and realloc functions return a null pointer or apointer to an allocated object when the size requested is zero (7.20.3).— Whether open streams with unwritten buffered data are flushed, open streams areclosed, or temporary files are removed when the abort or _Exit function is called(7.20.4.1, 7.20.4.4).— The termination status returned to the host environment by the abort, exit, or_Exit function (7.20.4.1, 7.20.4.3, 7.20.4.4).— The value returned by the system function when its argument is not a null pointer(7.20.4.6).— The local time zone and Daylight Saving Time (7.23.1).— The range and precision of times representable in clock_t and time_t (7.23).— The era for the clock function (7.23.2.1).— The replacement string for the %Z specifier to the strftime, and wcsftimefunctions in the "C" locale (7.23.3.5, 7.24.5.1).— Whether the functions in <math.h> honor the rounding direction mode in anIEC 60559 conformant implementation, unless explicitly specified otherwise (F.9).J.3.13 Architecture1— The values or expressions assigned to the macros specified in the headers<float.h>, <limits.h>, and <stdint.h> (5.2.4.2, 7.18.2, 7.18.3).— The number, order, and encoding of bytes in any object (when not explicitly specifiedin this International Standard) (6.2.6.1).— The value of the result of the sizeof operator (6.5.3.4).§J.3.13Portability issues511ISO/IEC 9899:TC3Committee Draft — Septermber 7, 2007WG14/N1256J.4 Locale-specific behavior1The following characteristics of a hosted environment are locale-specific and are requiredto be documented by the implementation:— Additional members of the source and execution character sets beyond the basiccharacter set (5.2.1).— The presence, meaning, and representation of additional multibyte characters in theexecution character set beyond the basic character set (5.2.1.2).— The shift states used for the encoding of multibyte characters (5.2.1.2).— The direction of writing of successive printing characters (5.2.2).— The decimal-point character (7.1.1).— The set of printing characters (7.4, 7.25.2).— The set of control characters (7.4, 7.25.2).— The sets of characters tested for by the isalpha, isblank, islower, ispunct,isspace, isupper, iswalpha, iswblank, iswlower, iswpunct,iswspace, or iswupper functions (7.4.1.2, 7.4.1.3, 7.4.1.7, 7.4.1.9, 7.4.1.10,7.4.1.11, 7.25.2.1.2, 7.25.2.1.3, 7.25.2.1.7, 7.25.2.1.9, 7.25.2.1.10, 7.25.2.1.11).— The native environment (7.11.1.1).— Additional subject sequences accepted by the numeric conversion functions (7.20.1,7.24.4.1).— The collation sequence of the execution character set (7.21.4.3, 7.24.4.4.2).— The contents of the error message strings set up by the strerror function(7.21.6.2).— The formats for time and date (7.23.3.5, 7.24.5.1).— Character mappings that are supported by the towctrans function (7.25.1).— Character classifications that are supported by the iswctype function (7.25.1).512Portability issues§J.4WG14/N1256Committee Draft — Septermber 7, 2007ISO/IEC 9899:TC3J.5 Common extensions1The following extensions are widely used in many systems, but are not portable to allimplementations.