Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: C User's Guide Oracle Solaris Studio 12.3 Information Library |
1. Introduction to the C Compiler
2. C-Compiler Implementation-Specific Information
7. Converting Applications for a 64-Bit Environment
8. cscope: Interactively Examining a C Program
A. Compiler Options Grouped by Functionality
B. C Compiler Options Reference
C. Implementation-Defined ISO/IEC C99 Behavior
C.1 Implementation-defined Behavior (J.3 )
C.1.7 Arrays and Pointers (J.3.7)
C.1.9 Structures, Unions, Enumerations, and Bit-fields (J.3.9)
C.1.11 Preprocessing Directives (J.3.11)
E. Implementation-Defined ISO/IEC C90 Behavior
H. Oracle Solaris Studio C: Differences Between K&R C and ISO C
A conforming implementation is required to document its choice of behavior in each of the areas listed in this subclause. The following are implementation-defined:
How a diagnostic is identified (3.10, 5.1.1.3).
Error and warning messages have the following format:
filename, line number: message
Where filename is the name of the file that contains the error or warning,
line number is the number of the line on which the error or warning is found, and message is the diagnostic message.
Whether each non-empty sequence of white-space characters other than new-line is retained or replaced by one space character in translation phase 3 (5.1.1.2).
A sequence of non-empty characters consisting of a tab (\t), form-feed (\f), or vertical-feed (\v) are replaced by a single space character.
The mapping between physical source file multi-byte characters and the source character set in translation phase 1 (5.1.1.2).
There are eight bits in a character for the ASCII portion; locale-specific multiples of eight bits for locale-specific extended portion.
The name and type of the function called at program startup in a freestanding environment (5.1.2.1).
The implementation is hosted environment.
The effect of program termination in a freestanding environment (5.1.2.1).
The implementation is in a hosted environment.
An alternative manner in which the main function may be defined (5.1.2.2.1).
There is no alternative way to define main other than that defined in the standard.
The values given to the strings pointed to by the argv argument to main (5.1.2.2.1).
argv is an array of pointers to the command-line arguments, where argv[0] represents the program name if it is available.
What constitutes an interactive device (5.1.2.3).
An interactive device is one for which the system library call isatty() returns a nonzero value
The set of signals, their semantics, and their default handling (7.14).
The following table shows the semantics for each signal as recognized by the signal function:
Table C-1 Semantics of signal Function Signals
|
Signal values other than SIGFPE, SIGILL, and SIGSEGV that correspond to a computational exception (7.14.1.1).
SIGILL, SIGFPE, SIGSEGV, SIGTRAP, SIGBUS, and SIGEMT, see Table C-1.
Signals for which the equivalent of signal(sig, SIG_IGN); is executed at program startup (7.14.1.1).
SIGILL, SIGFPE, SIGSEGV, SIGTRAP, SIGBUS, and SIGEMT, see Table C-1.
The set of environment names and the method for altering the environment list used by the getenv function (7.20.4.5).
The environment names are listed in the man page environ(5).
The manner of execution of the string by the system function (7.20.4.6).
From the system(3C) man page:
The system() function causes string to be given to the shell as input, as if string had been typed as a command at a terminal. The invoker waits until the shell has completed, then returns the exit status of the shell in the format specified by waitpid(2).
If string is a null pointer, system() checks if the shell exists and is executable. If the shell is available, system() returns a non-zero value; otherwise, it returns 0.
Which additional multibyte characters may appear in identifiers and their correspondence to universal character names (6.4.2).
None
The number of significant initial characters in an identifier (5.2.4.1, 6.4.2).
1023
The number of bits in a byte (3.6).
There are 8 bits in a byte.
The values of the members of the execution character set (5.2.1).
Mapping is identical between source and execution characters.
The unique value of the member of the execution character set produced for each of the standard alphabetic escape sequences (5.2.2).
Table C-2 Standard Alphabetic Escape Sequence Unique Values
|
The value of a char object into which has been stored any character other than a member of the basic execution character set (6.2.5).
It is the numerical value of the low order 8 bits associated with the character assigned to the char object.
Which of signed char or unsigned char has the same range, representation, and behavior as “plain” char (6.2.5, 6.3.1.1).
A signed char is treated as a “plain” char.
The mapping of members of the source character set (in character constants and string literals) to members of the execution character set (6.4.4.4, 5.1.1.2).
Mapping is identical between source and execution characters.
The value of an integer character constant containing more than one character or containing a character or escape sequence that does not map to a single-byte execution character (6.4.4.4).
A multiple-character constant that is not an escape sequence has a value derived from the numeric values of each character.
The value of a wide character constant containing more than one multibyte character, or containing a multibyte character or escape sequence not represented in the extended execution character set (6.4.4.4).
A multiple-character wide character constant that is not an escape sequence has a value derived from the numeric values of each character.
The current locale used to convert a wide character constant consisting of a single multi-byte character that maps to a member of the extended execution character set into a corresponding wide character code (6.4.4.4).
The valid locale specified by LC_ALL, LC_CTYPE, or LANG environment variable.
The current locale used to convert a wide string literal into corresponding wide character codes (6.4.5).
The valid locale specified by LC_ALL, LC_CTYPE, or LANG environment variable.
The value of a string literal containing a multi-byte character or escape sequence not represented in the execution character set (6.4.5).
Each byte of the multi-byte character forms a character of the string literal, with a value equivalent to the numerical value of that byte in the multi-byte character.
Any extended integer types that exist in the implementation (6.2.5).
None
Whether signed integer types are represented using sign and magnitude, two’s complement, or one’s complement, and whether the extraordinary value is a trap representation or an ordinary value (6.2.6.2).
Signed integer types are represented as two’s complement. Extraordinary value is an ordinary value.
The rank of any extended integer type relative to another extended integer type with the same precision (6.3.1.1).
Not applicable to this implementation.
The result of, or the signal raised by, converting an integer to a signed integer type when the value cannot be represented in an object of that type (6.3.1.3).
When an integer is converted to a shorter signed integer, the low order bits are copied from the longer integer to the shorter signed integer. The result may be negative.
When an unsigned integer is converted to a signed integer of equal size, the low order bits are copied from the unsigned integer to the signed integer. The result may be negative.
The results of some bit-wise operations on signed integers (6.5).
The result of a bit-wise operation applied to a signed type is the bit-wise operation of the operands, including the sign bit. Thus, each bit in the result is set if--and only if--each of the corresponding bits in both of the operands is set.
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 floating point operations is consistent with the settings of FLT_EVAL_METHOD. The accuracy of the library functions in <math.h> and <complex.h> is as specified in the libm(3LIB) man page.
The rounding behaviors characterized by non-standard values of FLT_ROUNDS (5.2.4.2.2).
Not applicable to this implementation.
The evaluation methods characterized by non-standard negative values of FLT_EVAL_METHOD (5.2.4.2.2).
Not applicable to this implementation.
The direction of rounding when an integer is converted to a floating-point number that cannot exactly represent the original value (6.3.1.4).
It honors the prevailing rounding direction mode.
The direction of rounding when a floating-point number is converted to a narrower floating-point number (6.3.1.5).
It honors the prevailing rounding direction mode.
How the nearest representable value or the larger or smaller representable value immediately adjacent to the nearest representable value is chosen for certain floating constants (6.4.4.2).
Floating-point constant is always rounded to the nearest representable value.
Whether and how floating expressions are contracted when not disallowed by the FP_CONTRACT pragma (6.5).
Not applicable to this implementation.
The default state for the FENV_ACCESS pragma (7.6.1).
For -fsimple=0, the default value is ON. Otherwise for all other values of -fsimple, the default value for FENV_ACCESS is OFF.
Additional floating-point exceptions, rounding modes, environments, and classifications, and their macro names (7.6, 7.12).
Not applicable to this implementation.
The default state for the FP_CONTRACT pragma (7.12.2).
For -fsimple=0, the default value is OFF. Otherwise for all other values of -fsimple, the default value for FP_CONTRACT is ON.
Whether the “inexact” floating-point exception can be raised when the rounded result actually does equal the mathematical result in an IEC 60559 conformant implementation (F.9).
Results are indeterminable.
Whether the underflow (and ”inexact) floating-point exception can be raised when a result is tiny but not inexact in an IEC 60559 conformant implementation(F.9).
The hardware does not raise underflow or inexact in such cases when trapping on underflow is disabled (the default).
The result of converting a pointer to an integer or to 64 bits, vice versa (6.3.2.3).
The bit pattern does not change when converting pointers and integers. Except when the results cannot be represented in the integer or pointer type, and then the results are undefined.
The size of the result of subtracting two pointers to elements of the same array (6.5.6).
int as defined in stddef.h. long for -m64
The extent to which suggestions made by using the register storage-class specifier are effective (6.7.1).
The number of effective register declarations depends on patterns of use and definition within each function and is bounded by the number of registers available for allocation. Neither the compiler nor the optimizer is required to honor register declarations.
The extent to which suggestions made by using the inline function specifier are effective (6.7.4).
The inline keyword is effective in causing the inlining of code only when using optimization, and only when the optimizer determines it is profitable to inline. See A.1.1 Optimization and Performance Options for a list of optimization options.
Whether a “plain” int bit-field is treated as signed int bit-field or as an unsigned int bit-field (6.7.2, 6.7.2.1).
It is treated as an unsigned int.
Allowable bit-field types other than _Bool, signed int, and unsigned int (6.7.2.1).
A bit field can be declared as any integer type.
Whether a bit-field can straddle a storage-unit boundary (6.7.2.1).
Bit-fields do not straddle storage-unit boundaries.
The order of allocation of bit-fields within a unit (6.7.2.1).
Bit-fields are allocated within a storage unit from high-order to low-order.
The alignment of non-bit-field members of structures (6.7.2.1). This should present no problem unless binary data written by one implementation is read by another.
Table C-3 Padding and Alignment of Structure Members
|
The integer type compatible with each enumerated type (6.7.2.2).
This is an int.
What constitutes an access to an object that has volatile-qualified type (6.7.3).
Each reference to the name of an object constitutes one access to the object.
How sequences in both forms of header names are mapped to headers or external source file names (6.4.7).
Source file characters are mapped to their corresponding ASCII values.
Whether the value of a character constant in a constant expression that controls conditional inclusion matches the value of the same character constant in the execution character set (6.10.1).
A character constant within a preprocessing directive has the same numeric value as it has within any other expression.
Whether the value of a single-character character constant in a constant expression that controls conditional inclusion may have a negative value (6.10.1).
Character constants in this context may have negative values .
The places that are searched for an included < > delimited header, and how the places are specified other header is identified (6.10.2).
The location of header files depends upon the options specified on the command line, and in which file the #include directive appears. For more information, see 2.16 How to Specify Include Files.
How the named source file is searched for in an included " " delimited header (6.10.2).
The location of header files depends upon the options specified on the command line, and in which file the #include directive appears. For more information, see 2.16 How to Specify Include Files.
The method by which preprocessing tokens (possibly resulting from macro expansion) in a #include directive are combined into a header name (6.10.2).
All the tokens making up the header name (including white space) are treated as the file path used when searching for the header as described in 2.16 How to Specify Include Files.
The nesting limit for #include processing (6.10.2).
No limit is imposed by the compiler.
Whether the # operator inserts a \ character before the \ character that begins a universal character name in a character constant or string literal (6.10.3.2).
No.
The behavior on each recognized non-STDC #pragma directive (6.10.6).
See 2.11 Pragmas for a description of the behavior of each recognized non-STDC #pragma directive.
The definitions for __DATE__ and __TIME__ when respectively, the date and time of translation are not available (6.10.8).
These macros are always available from the environment.
Any library facilities available to a freestanding program, other than the minimal set required by clause 4 (5.1.2.1).
The implementation is on a hosted environment.
The format of the diagnostic printed by the assert macro (7.2.1.1).
The diagnostic is structured as follows:
Assertion failed: statement. file filename, line number, function name
statement is the statement which failed the assertion. filename is the value of __FILE__. line number is the value of __LINE__. function name is the value of __func__.
The representation of the floating-point status flags stored by the fegetexceptflag function (7.6.2.2).
Each exception stored in the status flag by fegetexceptflag expands to an integer constant expression with values such that bitwise-inclusive ORs of all combinations of the constants result in distinct values.
Whether the feraiseexcept function raises the “inexact” floating-point exception in addition to the “overflow” or “underflow” floating-point exception (7.6.2.3).
No, “inexact” is not raised.
Strings other than “C” and “” that may be passed as the second argument to the setlocale function (7.11.1.1).
Intentionally left blank.
The types defined for float_t and double_t when the value of the FLT_EVAL_METHOD macro is less than zero or greater than two (7.12).
For SPARC, the types are as follows:
typedef float float_t;
typedef double double_t;
For x86 the types are as follows:
typedef long double float_t;
typedef long double double_t;
Domain errors for the mathematics functions, other that those required by this International Standard (7.12.1).
ilogb(), ilogbf() and ilogbl() raise the invalid exception if the input argument is 0, +/-Inf or NaN.
The values returned by the mathematics functions on domain errors (7.12.1).
The values returned on domain errors in full C99 mode (-xc99=%all,lib), are as specified in Annex F of ISO/IEC 9899:1999, Programming Languages - C.
The values returned by the mathematics functions on underflow range errors, whether errno is set to the value of the macro ERANGE when the integer expression math_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).
For underflow range errors: if the value can be represented as a subnormal number, the subnormal number is returned; otherwise +-0 is returned as appropriate.
As for whether errno is set to the value of the macro ERANGE when the integer expression math_errhandling & MATH_ERRNO is nonzero, since (math_errhandling & MATH_ERRNO) == 0 in our implementation, this part does not apply.
Whether the “underflow” floating-point exception is raised when the integer expression math_errhandling & MATH_ERREXCEPT is nonzero (7.12.1), the exception is raised when a floating-point underflow is coupled with loss of accuracy.
Whether a domain error occurs or zero is returned when an fmod function has a second argument of zero(7.12.10.1).
A domain error occurs.
The base-2 logarithm of the modulus used by the remquo functions in reducing the quotient (7.12.10.3).
31.
Whether the equivalent of signal(sig, SIG_DFL); is executed prior to the call of a signal handler, and, if not, the blocking of signals that is performed (7.14.1.1).
The equivalent of signal(sig, SIG_DFL); is executed prior to the call of a signal handler.
The null pointer constant to which the macro NULL expands (7.17).
NULL expands to 0.
Whether the last line of a text stream requires a terminating new-line character (7.19.2).
The last line does not need to end in a newline.
Whether space characters that are written out to a text stream immediately before a new-line character appear when read in (7.19.2).
All characters appear when the stream is read.
The number of null characters that may be appended to data written to a binary stream (7.19.2).
No null characters are appended to a binary stream.
Whether the file position indicator of an append-mode stream is initially positioned at the beginning or end of the file (7.19.3).
The file position indicator is initially positioned at the end of the file.
Whether a write on a text stream causes the associated file to be truncated beyond that point (7.19.3).
A write on a text stream does not cause a file to be truncated beyond that point unless a hardware device forces it to happen.
The characteristics of file buffering (7.19.3).
Output streams, with the exception of the standard error stream (stderr), are by default-buffered if the output refers to a file, and line-buffered if the output refers to a terminal. The standard error output stream (stderr) is by default unbuffered.
A buffered output stream saves many characters, and then writes the characters as a block. An unbuffered output stream queues information for immediate writing on the destination file or terminal immediately. Line-buffered output queues each line of output until the line is complete (a newline character is requested).
Whether a zero-length file actually exists (7.19.3).
A zero-length file does exist since it has a directory entry.
The rules for composing valid file names (7.19.3).
A valid file name can be from 1 to 1,023 characters in length and can use all character except the characters null and / (slash).
Whether the same file can be simultaneously open multiple times (7.19.3).
The same file can be opened multiple times.
The nature and choice of encodings used for multibyte characters in files (7.19.3).
The encodings used for multibyte characters are the same for each file.
The effect of the remove function on an open file (7.19.4.1).
The file is deleted on the last call which closes the file. A program cannot open a file which has already been removed.
The effect if a file with the new name exists prior to a call to the rename function (7.19.4.2).
If the file exists, it is removed and the new file is written over the previously existing file.
Whether an open temporary file is removed upon abnormal program termination (7.19.4.3).
If the process is killed in the period between file creation and unlinking, a permanent file may be left behind. See the freopen(3C) man page.
Which changes of mode are permitted (if any), and under what circumstances (7.19.5.4).
The following changes of mode are permitted, depending upon the access mode of the file descriptor underlying the stream:
When + is specified, the file descriptor mode must be O_RDWR.
When r is specified, the file descriptor mode must be O_RDONLY or O_RDWR.
When a or w is specified, the file descriptor mode must be O_WRONLY or O_RDWR.
See the freopen(3C) man page.
The style used to print an infinity or NaN, and the meaning of any n-char or n-wchar sequence printed for a NaN (7.19.6.1, 7.24.2.1).
[-]Inf, [-]NaN. With F conversion specifier, [-]INF, [-]NAN.
The output for %p conversion in the fprintf or fwprintf function (7.19.6.1, 7.24.2.1).
The output for %p is equivalent to %x.
The interpretation of a - character that is neither the first nor the last character, nor the second where a ^ character is the first, in the scanlist for %[ conversion in the fscanf() or fwscanf() function (7.19.6.2, 7.24.2.1).
If a - is in the scanlist and is not the first character, nor the second where the first character is a ^, nor the last character, it indicates a range of characters to be matched.
See the fscanf(3C) man page.
The set of sequences matched by a %p conversion and the interpretation of the corresponding input item in the fscanf() or fwscanf() function (7.19.6.2, 7.24.2.2).
Matches the set of sequences that is the same as the set of sequences that is produced by the %p conversion of the corresponding printf(3C) functions. The corresponding argument must be a pointer to a pointer to void. If the input item is a value converted earlier during the same program execution, the pointer that results will compare equal to that value; otherwise the behavior of the %p conversion is undefined.
See the fscanf(3C) man page.
The value to which the macro errno is set by the fgetpos, fsetpos, or ftell functions on failure (7.19.9.1, 7.19.9.3, 7.19.9.4).
EBADF The file descriptor underlying stream is not valid. See the fgetpos(3C) man page.
ESPIPE The file descriptor underlying stream is associated with a pipe, a FIFO, or a socket. See the fgetpos(3C) man page.
EOVERFLOW The current value of the file position cannot be represented correctly in an object of type fpos_t. See the fgetpos(3C) man page.
EBADF The file descriptor underlying stream is not valid. See the fsetpos(3C) man page.
ESPIPE The file descriptor underlying stream is associated with a pipe, a FIFO, or a socket. See the fsetpos(3C) man page.
EBADF The file descriptor underlying stream is not an open file descriptor. See the ftell(3C) man page.
ESPIPE The file descriptor underlying stream is associated with a pipe, a FIFO, or a socket. See the ftell(3C) man page.
EOVERFLOW The current file offset cannot be represented correctly in an object of type long. See the ftell(3C) man page.
The meaning of any n-char or n-wchar sequence in a string representing a NaN that is converted by the strtod(), strtof(), strtold(), wcstod(), wcstof(), or wcstold() function (7.20.1.3, 7.24.4.1.1).
No special meaning is given to the n-char sequence.
Whether or not the strtod, strtof, strtold, wcstod, wcstof, or wcstold function sets errno to ERANGE when underflow occurs (7.20.1.3, 7.24.4.1.1).
Yes, errno is set to ERANGE on underflow.
Whether the calloc, malloc, and realloc functions return a null pointer or a pointer to an allocated object when the size requested is zero (7.20.3).
Either a null pointer or a unique pointer that can be passed to free() is returned.
See the malloc(3C) man page.
Whether open streams with unwritten buffered data are flushed, open streams are closed, or temporary files are removed when the abort or _Exit function is called (7.20.4.1, 7.20.4.4).
The abnormal termination processing includes at least the effect of fclose(3C) on all open streams. See the abort(3C) man page.
Open streams are closed and do not flush open streams. See the _Exit(2) man page.
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 status made available to wait(3C) or waitpid(3C) by abort will be that of a process terminated by the SIGABRT signal. See the abort(3C), exit(1), and _Exit(2) man pages.
The termination status returned by exit, or _Exit, depends on the what the parent process of the calling process is doing.
If the parent process of the calling process is executing a wait(3C), wait3(3C), waitid(2), or waitpid(3C), and has neither set its SA_NOCLDWAIT flag nor set SIGCHLD to SIG_IGN, it is notified of the calling process’s termination and the low-order eight bits (that is, bits 0377) of status are made available to it. If the parent is not waiting, the child’s status is made available to it when the parent subsequently executes wait(), wait3(), waitid(), or waitpid().
The value returned by the system function when its argument is not a null pointer (7.20.4.6).
The exit status of the shell in the format specified by waitpid(3C).
The local time zone and Daylight Saving Time (7.23.1).
The local time zone is set by the environment variable TZ.
The range and precision of times representable in clock_t and time_t (7.23).
The precision of clock_t and time_t is one millionth of a second. The range is -2147483647-1 to 4294967295 millionths of a second on x86 and sparc v8. And -9223372036854775807LL-1 to 18446744073709551615 on SPARC v9.
The era for the clock function (7.23.2.1).
The era for the clock is represented as clock ticks with the origin at the beginning of the execution of the program.
The replacement string for the %Z specifier to the strftime, and wcsftime functions in the “C” locale (7.23.3.5, 7.24.5.1).
The time zone name or abbreviation, or by no characters if no time zone is determinable.
Whether or when the trigonometric, hyperbolic, base-e exponential, base-e logarithmic, error, and log gamma functions raise the “inexact” floating-point exception in an IEC 60559 conformant implementation (F.9).
The inexact exception is generally raised when the result is not exactly representable. The inexact exception can be raised even when the result is exactly representable.
Whether the functions in <math.h> honor the rounding direction mode in an IEC 60559 conformant implementation (F.9).
No attempt is made to force the default rounding direction mode for all functions in <math.h>.
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).
Here are the values or expressions for the macros specified in <float.h>:
#define CHAR_BIT 8 /* max # of bits in a “char” */ #define SCHAR_MIN (-128) /* min value of a “signed char” */ #define SCHAR_MAX 127 /* max value of a “signed char” */ #define CHAR_MIN SCHAR_MIN /* min value of a “char” */ #define CHAR_MAX SCHAR_MAX /* max value of a “char” */ #define MB_LEN_MAX 5 #define SHRT_MIN (-32768) /* min value of a “short int” */ #define SHRT_MAX 32767 /* max value of a “short int” */ #define USHRT_MAX 65535 /* max value of “unsigned short int” */ #define INT_MIN (-2147483647-1) /* min value of an “int” */ #define INT_MAX 2147483647 /* max value of an “int” */ #define UINT_MAX 4294967295U /* max value of an “unsigned int” */ #define LONG_MIN (-2147483647L-1L) #define LONG_MAX 2147483647L /* max value of a “long int” */ #define ULONG_MAX 4294967295UL /* max value of “unsigned long int” */ #define LLONG_MIN (-9223372036854775807LL-1LL) #define LLONG_MAX 9223372036854775807LL #define ULLONG_MAX 18446744073709551615ULL #define FLT_RADIX 2 #define FLT_MANT_DIG 24 #define DBL_MANT_DIG 53 #define LDBL_MANT_DIG 64 #if defined(__sparc) #define DECIMAL_DIG 36 #elif defined(__i386) #define DECIMAL_DIG 21 #endif #define FLT_DIG 6 #define DBL_DIG 15 #if defined(__sparc) #define LDBL_DIG 33 #elif defined(__i386) #define LDBL_DIG 18 #endif #define FLT_MIN_EXP (-125) #define DBL_MIN_EXP (-1021) #define LDBL_MIN_EXP (-16381) #define FLT_MIN_10_EXP (-37) #define DBL_MIN_10_EXP (-307) #define LDBL_MIN_10_EXP (-4931) #define FLT_MAX_EXP (+128) #define DBL_MAX_EXP (+1024) #define LDBL_MAX_EXP (+16384) #define FLT_EPSILON 1.192092896E-07F #define DBL_EPSILON 2.2204460492503131E-16 #if defined(__sparc) #define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L #elif defined(__i386) #define LDBL_EPSILON 1.0842021724855044340075E-19L #endif #define FLT_MIN 1.175494351E-38F #define DBL_MIN 2.2250738585072014E-308 #if defined(__sparc) #define LDBL_MIN 3.362103143112093506262677817321752603E-4932L #elif defined(__i386) #define LDBL_MIN 3.3621031431120935062627E-4932L #endif
Here are the values or expressions for the macros specified in <limits.h>:
#define INT8_MAX (127) #define INT16_MAX (32767) #define INT32_MAX (2147483647) #define INT64_MAX (9223372036854775807LL) #define INT8_MIN (-128) #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) #define INT64_MIN (-9223372036854775807LL-1) #define UINT8_MAX (255U) #define UINT16_MAX (65535U) #define UINT32_MAX (4294967295U) #define UINT64_MAX (18446744073709551615ULL) #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST64_MIN INT64_MIN #define INT_LEAST8_MAX INT8_MAX #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MAX INT32_MAX #define INT_LEAST64_MAX INT64_MAX #define UINT_LEAST8_MAX UINT8_MAX #define UINT_LEAST16_MAX UINT16_MAX #define UINT_LEAST32_MAX UINT32_MAX #define UINT_LEAST64_MAX UINT64_MAX
Here are the values or expressions for the macros specified in <stdint.h>:
#define INT_FAST8_MIN INT8_MIN #define INT_FAST16_MIN INT16_MIN #define INT_FAST32_MIN INT32_MIN #define INT_FAST64_MIN INT64_MIN #define INT_FAST8_MAX INT8_MAX #define INT_FAST16_MAX INT16_MAX #define INT_FAST32_MAX INT32_MAX #define INT_FAST64_MAX INT64_MAX #define UINT_FAST8_MAX UINT8_MAX #define UINT_FAST16_MAX UINT16_MAX #define UINT_FAST32_MAX UINT32_MAX #define UINT_FAST64_MAX UINT64_MAX
The number, order, and encoding of bytes in any object (when not explicitly specified in this International Standard) (6.2.6.1).
The implementation-defined number, order, and encodings of objects not explicitly specified in the 1999 C standard have be defined elsewhere in this chapter.
The value of the result of the sizeof operator (6.5.3.4).
The following table lists the results for sizeof.
Table C-4 Results From the sizeof Operator in Bytes
|
The following characteristics of a hosted environment are locale-specific and are required to be documented by the implementation:
Additional members of the source and execution character sets beyond the basic character set (5.2.1).
Locale-specific (no extension in C locale).
The presence, meaning, and representation of additional multibyte characters in the execution character set beyond the basic character set (5.2.1.2).
There are no multibyte characters present in the execution characters set in the default or C locales.
The shift states used for the encoding of multibyte characters (5.2.1.2).
There are no shift states.
The direction of writing of successive printing characters (5.2.2).
Printing is always left to right.
The decimal-point character (7.1.1).
Locale-specific (“.” in C locale).
The set of printing characters (7.4, 7.25.2).
Locale-specific (“.” in C locale).
The set of control characters (7.4, 7.25.2).
The control character set is comprised of horizontal tab, vertical tab, form feed, alert, backspace, carriage return, and new line.
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).
See the isalpha(3C) and iswalpha(3C) man pages for descriptions of isalpha() and iswalpha() as well as information on the related macros mentioned above. Note that their behaviors can be modified by changing locale.
The native environment (7.11.1.1).
The native environment is specified by the LANG and LC_* environment variables as described in the setlocale(3C) man page. However, if these environment variables are not set, the native environment is set to the C locale.
Additional subject sequences accepted by the numeric conversion functions (7.20.1, 7.24.4.1).
The radix character is defined in the program’s locale (category LC_NUMERIC), and may be defined as something other than a period (.).
The collation sequence of the execution character set (7.21.4.3, 7.24.4.4.2).
Locale-specific (ASCII collation in C locale).
The contents of the error message strings set up by the strerror function (7.21.6.2).
If the application is linked with -lintl, then messages returned by this function are in the native language specified by the LC_MESSAGES locale category. Otherwise they are in the C locale.
The formats for time and date (7.23.3.5, 7.24.5.1).
Locale-specific. Formats for the C locale are shown in the tables below.
The names of the months are specified below:
Table C-5 The Names of the Months
|
The names of the days of the week are specified below:
Table C-6 Days and Abbreviated Days of the Week
|
The format for time is:
%H:%M:%S
The format for date is:
%m/%d/ -Xc mode.
The formats for AM and PM designation are: AM PM
Character mappings that are supported by the towctrans function (7.25.1).
The rules of the coded character set defined by character mapping information in the program’s locale (category LC_CTYPE) may provide for character mappings other than tolower and toupper. Refer to the Oracle Solaris Internationalization Guide For Developers, for details of available locales and their definitions.
Character classifications that are supported by the iswctype function (7.25.1).
See the Oracle Solaris Internationalization Guide For Developers, for details of available locales and any non-standard reserved character classifications