This section explains items dependent on implementation in the ANSI standards.
See "4.1.5Internal representation and value area of data".
The ANSI standards specify eight translation stages (known as "phases") of priorities among syntax rules for translation. The arrangement of "non-empty white space characters excluding line feed characters" which is defined as implementation dependent in phase 3 "Decomposition of source file into preprocessing tokens and white space characters" is maintained as it is without being replaced by single white space character.
When syntax rule violation or restriction violation occurs on a translation unit, the compiler outputs as error message containing source file name and (when it can be determined) the number of line containing the error. These error messages are classified: "Warning", "Fatal error", "Error" and "other" messages. For output formats of messages, see the "10.2Message Formats".
The name, type, and arguments of a function that is called on starting program processing are not stipulted.
Therefore, it is dependent on the user-own coding and target system.
The configuration of the interactive unit is not stipulated.
Therefore, it is dependent on the user-own coding and target system.
The values of elements of the source code character set and execution character set are ASCII codes, EUC, SJIS, UTF-8, big5, and gb2312.
Japanese and Chinese characters are supported in comments and character strings.
The values of expanded notation are stipulated as follows.
There are limits on translation as shown below. In addition to the absolute quantitative limits of the compiler, there are limits depending on the memory of the host machine on which the compiler is running.
In a single declaration, the maximum number of pointer, array, and function declarators (and their combinations) that qualify a single arithmetic type, structure type, union type, or incomplete type is 128. |
The maximum number of bytes for one object is 32767 (in the host environment). However, when the -large_variable option is specified, the maximum number is 65,535. |
The limits.h file specifies the limit values of the values that can be expressed as general integer types (char type, signed/unsigned integer type, and enumerated type).
The limit values defined by the limits.h file are as follows.
The limit values related to characteristics of the floating-point type are defined in float.h file.
The limit values defined by the float.h file are as follows.
The values in parentheses are for the case when the -dbl_size=4 option is used, which specifies sizeof(double) = sizeof(long double) = 4. -dbl_size=4 is the default setting in the CC-RL.
All identifiers are considered to have meaning.
Uppercase and lowercase characters are distinguished.
If a quantity that is not a member of the source character set is stored in the char type, it is handled as the value converted to the char type.
When the -signed_char option is not used, the plain char type has the same range of values as that of the unsigned char type. When the -signed_char option is used, the plain char type has the same range of values as that of the signed char type.
A value is rounded toward the result obtained by assuming an infinite number of significant digits. The center value between a multiplication result and the result obtained by assuming an infinite number of significant digits is rounded so that the result becomes an even value.
Both the character set of the source program and the character set in the execution environment are basically ASCII codes, and correspond to members having the same value. |
An integer character constant containing two or less characters has the value of the int type in which the lower byte holds the last character and the upper byte holds the first character. A character constant containing three or more characters will lead to an error. |
A character that cannot be expressed by the basic execution environment character set or escape sequence is expressed as follows. |
An octal or hexadecimal escape sequence takes the value indicated by the octal or hexadecimal notation |
Values of \a, \b, \f, \n, \r, \t, \v are same as the values explained in "(8)Significance of character display". |
A character string can be described in Japanese and Chinese.
The default character code is Shift JIS.
A character code in input source file can be selected by using the -character_set option of the CC-RL.
The method to reflect the string in the two formats (< > and " ") of a header file name on the header file or an external source file name is stipulated in "(35)Loading header file".
A comment can be described in Japanese and Chinese. The character code is the same as the character string in "(15)Character string".
A plain char type not specified as signed or unsigned is handled as unsigned. When the -signed_char option is specified, it is handled as signed.
If the value of a general integer type is converted into a signed integer of a smaller size, the higher bits are truncated and a bit string image is copied.
If an unsigned integer is converted into the corresponding signed integer, the internal representation is not changed.
If the value of a general integer type is converted into the value of a floating-point type, and if the value to be converted is within a range that can be expressed but not accurately, the result is rounded toward the result obtained by assuming an infinite number of significant digits. An intermediate value is rounded so that the result becomes an even value.
When casting a double to a float, or a long double to a double or a float, if the typecast value cannot be represented accurately in the available value range, the result is rounded toward the result obtained by assuming an infinite number of significant digits. An intermediate value is rounded so that the result becomes an even value.
The characteristics of the shift operator conform to the stipulation in "(29)Shift operator in bit units".
The other operators in bit units for signed type are calculated as unsigned values (as in the bit image).
If the value of a union member is stored in a different member, the value will be stored in accordance with the alignment condition. As a result, access to members of the union will be of the subsequently accessed type.
The result of the "sizeof" operator is handled as the unsigned int type.
When a pointer is converted to a general integer type, the required variable size is as follows.
The bit string is saved as is as the conversion result. Note that the most significant byte (undefined value) of a far pointer is converted to 0.
Any integer can be converted to a pointer type but if the size of the pointer type is smaller than that of the integer type, the value is truncated to the pointer size. If the size of the pointer type is larger than that of the integer type, the integer type is normally converted up to the pointer size and then converted to the pointer type.
As the near and far pointers affect conversion, see the "Cast" description in "Specifying memory allocation area (__near /__far)".
The result of the division operator ("/") when the operands are negative and do not divide perfectly with integer division, is as follows: If either the divisor or the dividend is negative, the result is the smallest integer greater than the algebraic quotient.
If both the divisor and the dividend are negative, the result is the largest integer less than the algebraic quotient.
If the operand is negative, the result of the "%" operator takes the sign of the first operand in the expression.
If two pointers indicating the elements of the same array are subtracted, the type of the result is signed int type.
If E1 of "E1 >> E2" is of signed type and takes a negative value, an arithmetic shift is executed.
Optimize for the fastest possible access, regardless of whether there is a storage-class area specifier "register" declaration.
A simple int type bit field not specified as signed or unsigned is handled as an unsigned int type. However, when the -signed_bitfield option is specified, it becomes the value of signed int. |
To retain a bit field, a storage area unit to which any address with sufficient size can be assigned can be allocated. If there is insufficient area, however, the bit field that does not match is packed into to the next unit according to the alignment condition of the type of the field. |
Types other than the above except for structure type and union type, and 2-byte enumerated type |
When a member is a structure or union object, it is aligned to the boundary specified in the structure or union definition of the member.
The type of an enumerator is char, signed char, unsigned char, or signed short depending on the range of the enumeration constants to be defined. For the details of description, see "(4)Enumerated type".
The configuration of access to data having a type qualified to be "volatile" is dependent upon the address (I/O port, etc.) to which the data is mapped. However, optimization is not applied to the locations where such a variable is accessed.
The size of access to such a variable is guaranteed when the following conditions are satisfied.
When a variable is not a bit field and is declared in any of the following types, the variable is accessed in the same size as the declared type. |
The value for the constant specified for condition embedding and the value of the character constant appearing in the other expressions are equal. |
A preprocessing directive in the form of "#include <character string>" searches for a header file from the folder specified by the -I option if "character string" does not begin with "\"Note, and then searches standard include file folder (..\inc folder with a relative path from the bin folder where the ccrl is placed).
If a header file uniformly identified is searched with a character string specified between delimiters "<" and ">", the whole contents of the header file are replaced.
The search order is as follows.
A preprocessing directive in the form of "#include "character string"" searches for a header file from the folder where the source file exists if "character string" does not begin with "\"Note, and then searches specified folder (-I option), and then searches standard include file folder (..\inc folder with a relative path from the bin folder where the ccrl is placed).
If a header file uniformly identified is searched with a character string specified between delimiters " " " and " " ", the whole contents of the header file are replaced.
The search order is as follows.
The format of "#include preprocessing character phrase string" is treated as the preprocessing character phrase of single header file only if the preprocessing character phrase string is a macro that is replaced to the form of <character string> or "character string".
Between a string delimited (finally) and a header file name, the length of the alphabetic characters in the strings is identified,
"And the file name length valid in the compiler operating environment is valid."
The folder where the file is searched for conforms to the above stipulation.
See "4.2.3#pragma directive".
See "4.2.2Macro".
The NULL macro is defined as follows.
The following shows the implementation-defined items regarding standard library functions.
The sets of characters tested for by the isalnum, isalpha, iscntrl, islower, isprint, and isupper functions |
|
The values returned by the mathematics functions on domain errors |
Refer to "7.5Library Function". |
Whether the mathematics functions set the integer expression errno to the value of the macro ERANGE on underflow range errors |
Refer to "7.5Library Function". |
Whether a domain error occurs or zero is returned when the fmod function has a second argument of zero |
Refer to "7.5Library Function". |
The semantics for each signal recognized by the signal function |
|
The default handling and the handling at program startup for each signal recognized by the signal function |
|
If the equivalent of signal (sig, SIG_DFL); is not executed prior to the call of a signal handler, the blocking of the signal that is performed |
|
Whether the default handling is reset if the SIGILL signal is received by a handler specified to the signal function |
|
Whether the last line of a text stream requires a terminating new-line character |
|
Whether space characters that are written out to a text stream immediately before a new-line character appear when read in |
|
The number of null characters that may be appended to data written 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 |
|
Whether a write on a text stream causes the associated file to be truncated beyond that point |
|
The effect if a file with the new name exists prior to a call to the rename function |
|
Refer to "7.5Library Function". |
|
Refer to "7.5Library Function". |
|
The interpretation of a - character that is neither the first nor the last character in the scanlist for %[ conversion in the fscanf function |
|
The value to which the macro errno is set by the fgetpos or ftell function on failure |
|
Refer to "7.5Library Function". |
|
The behavior of the calloc, malloc, or realloc function if the size requested is zero |
Refer to "7.5Library Function". |
The behavior of the abort function with regard to open and temporary files |
|
The status returned by the exit function if the value of the argument is other than zero, EXIT_SUCCESS, or EXIT_FAILURE |
|
The set of environment names and the method for altering the environment list used by the getenv function |
|
The contents and mode of execution of the string by the system function |
|
The contents of the error message strings returned by the strerror function |
Refer to "7.5Library Function". |