⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 implement-c.texi

📁 理解和实践操作系统的一本好书
💻 TEXI
📖 第 1 页 / 共 2 页
字号:
@c Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.@c This is part of the GCC manual.@c For copying conditions, see the file gcc.texi.@node C Implementation@chapter C Implementation-defined behavior@cindex implementation-defined behavior, C languageA conforming implementation of ISO C is required to document itschoice of behavior in each of the areas that are designated``implementation defined''.  The following lists all such areas,along with the section numbers from the ISO/IEC 9899:1990 and ISO/IEC9899:1999 standards.  Some areas are only implementation-defined inone version of the standard.Some choices depend on the externally determined ABI for the platform(including standard character encodings) which GCC follows; these arelisted as ``determined by ABI'' below.  @xref{Compatibility, , BinaryCompatibility}, and @uref{http://gcc.gnu.org/readings.html}.  Somechoices are documented in the preprocessor manual.@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.  Some choices are made by thelibrary and operating system (or other environment when compiling fora freestanding environment); refer to their documentation for details.@menu* Translation implementation::* Environment implementation::* Identifiers implementation::* Characters implementation::* Integers implementation::* Floating point implementation::* Arrays and pointers implementation::* Hints implementation::* Structures unions enumerations and bit-fields implementation::* Qualifiers implementation::* Declarators implementation::* Statements implementation::* Preprocessing directives implementation::* Library functions implementation::* Architecture implementation::* Locale-specific behavior implementation::@end menu@node Translation implementation@section Translation@itemize @bullet@item@cite{How a diagnostic is identified (C90 3.7, C99 3.10, C90 and C99 5.1.1.3).}Diagnostics consist of all the output sent to stderr by GCC@.@item@cite{Whether each nonempty sequence of white-space characters other thannew-line is retained or replaced by one space character in translationphase 3 (C90 and C99 5.1.1.2).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@end itemize@node Environment implementation@section EnvironmentThe behavior of most of these points are dependent on the implementationof the C library, and are not defined by GCC itself.@itemize @bullet@item@cite{The mapping between physical source file multibyte charactersand the source character set in translation phase 1 (C90 and C99 5.1.1.2).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@end itemize@node Identifiers implementation@section Identifiers@itemize @bullet@item@cite{Which additional multibyte characters may appear in identifiersand their correspondence to universal character names (C99 6.4.2).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@item@cite{The number of significant initial characters in an identifier(C90 6.1.2, C90 and C99 5.2.4.1, C99 6.4.2).}For internal names, all characters are significant.  For external names,the number of significant characters are defined by the linker; foralmost all targets, all characters are significant.@item@cite{Whether case distinctions are significant in an identifier withexternal linkage (C90 6.1.2).}This is a property of the linker.  C99 requires that case distinctionsare always significant in identifiers with external linkage andsystems without this property are not supported by GCC@.@end itemize@node Characters implementation@section Characters@itemize @bullet@item@cite{The number of bits in a byte (C90 3.4, C99 3.6).}Determined by ABI@.@item@cite{The values of the members of the execution character set (C90and C99 5.2.1).}Determined by ABI@.@item@cite{The unique value of the member of the execution character set producedfor each of the standard alphabetic escape sequences (C90 and C99 5.2.2).}Determined by ABI@.@item@cite{The value of a @code{char} object into which has been stored anycharacter other than a member of the basic execution character set(C90 6.1.2.5, C99 6.2.5).}Determined by ABI@.@item@cite{Which of @code{signed char} or @code{unsigned char} has the samerange, representation, and behavior as ``plain'' @code{char} (C906.1.2.5, C90 6.2.1.1, C99 6.2.5, C99 6.3.1.1).}@opindex fsigned-char@opindex funsigned-charDetermined by ABI@.  The options @option{-funsigned-char} and@option{-fsigned-char} change the default.  @xref{C Dialect Options, ,Options Controlling C Dialect}.@item@cite{The mapping of members of the source character set (in characterconstants and string literals) to members of the execution characterset (C90 6.1.3.4, C99 6.4.4.4, C90 and C99 5.1.1.2).}Determined by ABI@.@item@cite{The value of an integer character constant containing more than onecharacter or containing a character or escape sequence that does not mapto a single-byte execution character (C90 6.1.3.4, C99 6.4.4.4).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@item@cite{The value of a wide character constant containing more than onemultibyte character, or containing a multibyte character or escapesequence not represented in the extended execution character set (C906.1.3.4, C99 6.4.4.4).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@item@cite{The current locale used to convert a wide character constant consistingof a single multibyte character that maps to a member of the extendedexecution character set into a corresponding wide character code (C906.1.3.4, C99 6.4.4.4).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@item@cite{The current locale used to convert a wide string literal intocorresponding wide character codes (C90 6.1.4, C99 6.4.5).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@item@cite{The value of a string literal containing a multibyte character or escapesequence not represented in the execution character set (C90 6.1.4, C99 6.4.5).}@xref{Implementation-defined behavior, , Implementation-definedbehavior, cpp, The C Preprocessor}.@end itemize@node Integers implementation@section Integers@itemize @bullet@item@cite{Any extended integer types that exist in the implementation (C99 6.2.5).}GCC does not support any extended integer types.@c The __mode__ attribute might create types of precisions not@c otherwise supported, but the syntax isn't right for use everywhere@c the standard type names might be used.  Predefined typedefs should@c be used if any extended integer types are to be defined.  The@c __int128_t and __uint128_t typedefs are not extended integer types@c as they are generally longer than the ABI-specified intmax_t.@item@cite{Whether signed integer types are represented using sign and magnitude,two's complement, or one's complement, and whether the extraordinary valueis a trap representation or an ordinary value (C99 6.2.6.2).}GCC supports only two's complement integer types, and all bit patternsare ordinary values.@item@cite{The rank of any extended integer type relative to another extendedinteger type with the same precision (C99 6.3.1.1).}GCC does not support any extended integer types.@c If it did, there would only be one of each precision and signedness.@item@cite{The result of, or the signal raised by, converting an integer to asigned integer type when the value cannot be represented in an object ofthat type (C90 6.2.1.2, C99 6.3.1.3).}For conversion to a type of width @math{N}, the value is reducedmodulo @math{2^N} to be within range of the type; no signal is raised.@item@cite{The results of some bitwise operations on signed integers (C906.3, C99 6.5).}Bitwise operators act on the representation of the value includingboth the sign and value bits, where the sign bit is consideredimmediately above the highest-value value bit.  Signed @samp{>>} actson negative numbers by sign extension.GCC does not use the latitude given in C99 only to treat certainaspects of signed @samp{<<} as undefined, but this is subject tochange.@item@cite{The sign of the remainder on integer division (C90 6.3.5).}GCC always follows the C99 requirement that the result of division istruncated towards zero.@end itemize@node Floating point implementation@section Floating point@itemize @bullet@item@cite{The accuracy of the floating-point operations and of the libraryfunctions in @code{<math.h>} and @code{<complex.h>} that return floating-pointresults (C90 and C99 5.2.4.2.2).}The accuracy is unknown.@item@cite{The rounding behaviors characterized by non-standard valuesof @code{FLT_ROUNDS} @gol(C90 and C99 5.2.4.2.2).}GCC does not use such values.@item@cite{The evaluation methods characterized by non-standard negativevalues of @code{FLT_EVAL_METHOD} (C99 5.2.4.2.2).}GCC does not use such values.@item@cite{The direction of rounding when an integer is converted to afloating-point number that cannot exactly represent the originalvalue (C90 6.2.1.3, C99 6.3.1.4).}C99 Annex F is followed.@item@cite{The direction of rounding when a floating-point number isconverted to a narrower floating-point number (C90 6.2.1.4, C996.3.1.5).}C99 Annex F is followed.@item@cite{How the nearest representable value or the larger or smallerrepresentable value immediately adjacent to the nearest representablevalue is chosen for certain floating constants (C90 6.1.3.1, C996.4.4.2).}C99 Annex F is followed.@item@cite{Whether and how floating expressions are contracted when notdisallowed by the @code{FP_CONTRACT} pragma (C99 6.5).}Expressions are currently only contracted if@option{-funsafe-math-optimizations} or @option{-ffast-math} are used.This is subject to change.@item@cite{The default state for the @code{FENV_ACCESS} pragma (C99 7.6.1).}This pragma is not implemented, but the default is to ``off'' unless@option{-frounding-math} is used in which case it is ``on''.@item@cite{Additional floating-point exceptions, rounding modes, environments,and classifications, and their macro names (C99 7.6, C99 7.12).}This is dependent on the implementation of the C library, and is notdefined by GCC itself.@item@cite{The default state for the @code{FP_CONTRACT} pragma (C99 7.12.2).}This pragma is not implemented.  Expressions are currently onlycontracted if @option{-funsafe-math-optimizations} or@option{-ffast-math} are used.  This is subject to change.@item@cite{Whether the ``inexact'' floating-point exception can be raisedwhen the rounded result actually does equal the mathematical resultin an IEC 60559 conformant implementation (C99 F.9).}This is dependent on the implementation of the C library, and is notdefined by GCC itself.@item@cite{Whether the ``underflow'' (and ``inexact'') floating-point

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -