Everything
4.1.2 Implementation-defined behavior of C99

This section covers the implementation-defined behavior given by the C99 standard.

(1)

How a diagnostic is identified (3.10, 5.1.1.3).

Refer to "10. MESSAGE".

(2)

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).

Retained as they are.

(3)

The mapping between physical source file multi-byte characters and the source character set in translation phase 1 (5.1.1.2).

Multibyte characters are mapped to the corresponding source character set according to the compile option.

(4)

The name and type of the function called at program startup in a freestanding environment (5.1.2.1).

Not defined. Depends on the startup implementation.

(5)

The effect of program termination in a freestanding environment (5.1.2.1).

Depends on startup in a normal termination. The abort function is used to terminate the program abnormally.

(6)

An alternative manner in which the main function may be defined (5.1.2.2.1).

Not defined because of a freestanding environment.

(7)

The values given to the strings pointed to by the argv argument to main (5.1.2.2.1).

Not defined because of a freestanding environment.

(8)

What constitutes an interactive device (5.1.2.3).

Not defined for the configuration of an interactive device.

(9)

The set of signals, their semantics, and their default handling (7.14).

The signal handling functions are not supported.

(10)

Signal values other than SIGFPE, SIGILL, and SIGSEGV that correspond to a computational exception (7.14.1.1).

The signal handling functions are not supported.

(11)

Signals for which the equivalent of signal(sig, SIG_IGN); is executed at program startup (7.14.1.1).

The signal handling functions are not supported.

(12)

The set of environment names and the method for altering the environment list used by the getenv function (7.20.4.5).

The getenv function is not supported.

(13)

The manner of execution of the string by the system function (7.20.4.6).

The system function is not supported.

(14)

Which additional multibyte characters may appear in identifiers and their correspondence to universal character names (6.4.2).

Multibyte characters cannot be used as identifiers.

(15)

The number of significant initial characters in an identifier (5.2.4.1, 6.4.2).

The entire identifier is handled as meaningful. The length of an identifier is unlimited.

(16)

The number of bits in a byte (3.6).

8 bits.

(17)

The values of the members of the execution character set (5.2.1).

The element values of the execution character set are ASCII code, EUC, SJIS, UTF-8, big5 and gb2312 values.

(18)

The unique value of the member of the execution character set produced for each of the standard alphabetic escape sequences (5.2.2).

Escape Sequence

Value (ASCII)

"\a"

0x07

"\b"

0x08

"\f"

0x0C

"\n"

0x0A

"\r"

0x0D

"\t"

0x09

"\v"

0x0B

(19)

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).

Value that is type-converted to char type.

(20)

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 char type has the same range of values, the same representation format and the same behavior as the unsigned char type. However, it can be switched to the signed char type by option -signed_char.

(21)

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).

Associated with the element having the same value.

(22)

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 simple character constant consisting of up to two characters has a two-byte value with the lower byte being the last character and the upper byte being the start character. A character constant having three or more characters results in an error. A character which is not represented by basic execution environment character set is regarded as a simple character constant having that value. In an invalid backslash representation, the backslash is ignored and the next character is regarded as a simple character constant.

(23)

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).

Left-most character value as a multibyte character.

(24)

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).

Locale is not supported.

(25)

The current locale used to convert a wide string literal into corresponding wide character codes (6.4.5).

Locale is not supported.

(26)

The value of a string literal containing a multi-byte character or escape sequence not represented in the execution character set (6.4.5).

Corresponding byte value for escape sequence or corresponding each byte value for a multibyte character.

(27)

Any extended integer types that exist in the implementation (6.2.5).

No extended integer types are provided.

(28)

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).

The signed integer type is represented in two's complement, and there are no trap representations.

(29)

The rank of any extended integer type relative to another extended integer type with the same precision (6.3.1.1).

No extended integer types are provided.

(30)

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).

Bit string masked by the width of the conversion target type (with the upper bits truncated).

(31)

The results of some bit-wise operations on signed integers (6.5).

Arithmetic shift is performed for a shift operator. For other operators, a signed integer is calculated as an unsigned value (as a bit image).

(32)

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).

Unknown.

(33)

The rounding behaviors characterized by non-standard values of FLT_ROUNDS (5.2.4.2.2).

No nonstandard value is defined for FLT_ROUNDS.

(34)

The evaluation methods characterized by non-standard negative values of FLT_EVAL_METHOD (5.2.4.2.2).

No nonstandard value is defined for FLT_EVAL_METHOD.

(35)

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).

Rounded to the nearest representable direction.

(36)

The direction of rounding when a floating-point number is converted to a narrower floating-point number (6.3.1.5).

Rounded to the nearest representable direction.

(37)

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).

Rounded to the nearest value.

(38)

Whether and how floating expressions are contracted when not disallowed by the FP_CONTRACT pragma (6.5).

Contraction of expressions depends on each option specification.

The FP_CONTRACT pragma does not work.

#pragma STDC FP_CONTRACT is ignored even if it is specified.

(39)

The default state for the FENV_ACCESS pragma (7.6.1).

The default state of the FENV_ACCESS pragma is ON.

#pragma STDC FENV_ACCESS is ignored even if it is specified.

(40)

Additional floating-point exceptions, rounding modes, environments, and classifications, and their macro names (7.6, 7.12).

As per the math.h library provided by the compiler. There are no additional definitions.

(41)

The default state for the FP_CONTRACT pragma (7.12.2).

The default state of the FP_CONTRACT pragma is ON.

(42)

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).

Floating-point exceptions are not supported.

No "inexact" floating-point exception is generated.

(43)

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).

Floating-point exceptions are not supported. No "underflow" or "inexact" floating-point exception is generated.

(44)

The result of converting a pointer to an integer or vice versa (6.3.2.3).

Refer to "Specifying memory allocation area (__near /__far)" in "4.2.6 Using extended language specifications".

(45)

The size of the result of subtracting two pointers to elements of the same array (6.5.6).

The resultant type is the signed int type.

(46)

The extent to which suggestions made by using the register storage-class specifier are effective (6.7.1).

User requests for register variables are not honored.

(47)

The extent to which suggestions made by using the inline function specifier are effective (6.7.4).

Inlining is always tried. However, inlining may not be performed depending on the condition.

(48)

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).

Treated as an unsigned int type. However, this can be changed by option -signed_bitfield.

(49)

Allowable bit-field types other than _Bool, signed int, and unsigned int (6.7.2.1).

All integer types are allowed.

(50)

Whether a bit-field can straddle a storage-unit boundary (6.7.2.1).

When structure type packing is not specified, a bit-field cannot straddle a strage-unit boundary, but it is allocated to the next area.

When structure type packing is specified, a bit-field may straddle a strage-unit boundary.

(51)

The order of allocation of bit-fields within a unit (6.7.2.1).

Allocated from the lower order.

(52)

The alignment of non-bit-field members of structures (6.7.2.1).

Refer to "4.1.3 Internal representation and value area of data".

(53)

The integer type compatible with each enumerated type (6.7.2.2).

Any of the char, signed char, unsigned char or signed short type. Minimum type that an enumerated type fits in.

(54)

What constitutes an access to an object that has volatile-qualified type (6.7.3).

Although the access width, and order and number of accesses are as described in the C source, this does not apply to those accesses to a type for which the microcomputer does not have a corresponding instruction.

(55)

How sequences in both forms of header names are mapped to headers or external source file names (6.4.7).

A character string described in the #include is interpreted as the character code specified as the source character set and is associated with a header name or an external source file name.

(56)

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 value for the character constant specified in conditional inclusion is equal to the character constant value that appears in other expressions.

(57)

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).

A character constant cannot be a negative value if it is a plain char type (char type which is neither signed nor unsigned) and a plain char type is unsigned. It can be a negative value if a plain char type is signed.

(58)

The places that are searched for an included < > delimited header, and how the places are specified other header is identified (6.10.2).

Folders are searched in this order and a file having the same name in the folder is identified as the header.

(1) Folder specified by the path (if it is full-path)

(2) Folder specified by option -I

(3) Standard include file folder (..\inc folder with a relative path from the bin folder where the compiler is placed)

(59)

How the named source file is searched for in an included " " delimited header (6.10.2).

Searched in this order:

(1) Folder specified by the path (if it is full-path)

(2) Folder having the source file

(3) Folder specified by option -I

(4) Standard include file folder (..\inc folder with a relative path from the bin folder where the compiler is placed)

(60)

The method by which preprocessing tokens (possibly resulting from macro expansion) in a #include directive are combined into a header name (6.10.2).

Treated as a preprocessing token of a single header or file name only in a macro that replaces preprocessing tokens with a single <character string> or "character string" format.

(61)

The nesting limit for #include processing (6.10.2).

There are no limits.

(62)

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).

A \ character is not inserted in front of the first \ character.

(63)

The behavior on each recognized non-STDC #pragma directive (6.10.6).

Refer to "4.2.4 #pragma directive" in the User's Manual.

(64)

The definitions for __DATE__ and __TIME__ when respectively, the date and time of translation are not available (6.10.8).

A date and time are always obtained.

(65)

Any library facilities available to a freestanding program, other than the minimal set required by clause 4 (5.1.2.1).

Refer to "7. LIBRARY FUNCTIONAL SPECIFICATIONS".

(66)

The format of the diagnostic printed by the assert macro (7.2.1.1).

As follows:

Assertion failed: Expression, function function_name, file file_name, line line_number

(67)

The representation of the floating-point status flags stored by the fegetexceptflag function (7.6.2.2).

The fegetexceptflag function is not supported.

(68)

Whether the feraiseexcept function raises the "inexact" floating-point exception in addition to the "overflow" or "underflow" floating-point exception (7.6.2.3).

The feraiseexcept function is not supported.

(69)

Strings other than "C" and "" that may be passed as the second argument to the setlocale function (7.11.1.1).

The setlocale function is not supported.

(70)

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).

float_t is defined as the float type and double_t as the double type.

(71)

Domain errors for the mathematics functions, other that those required by this International Standard (7.12.1).

A domain error occurs if:

-

The input argument of the cos, sin, tan function groups is NaN or +/- Inf.

-

The input argument of the atan, fabs, ceil, or floor function groups is NaN.

-

Either input argument of the atan2 function group is NaN, or both arguments are +/- Inf.

-

The input argument val of the frexp, modf function groups is NaN or +/- Inf.

-

The input argument val of the ldexp function groups is NaN.

-

The input argument x of the scalbn, scalbln function groups is NaN.

-

Either argument of the fmod function group is NaN or +/- Inf.

 

For details, refer to (72).

(72)

The values returned by the mathematics functions on domain errors (7.12.1).

The table below summarizes the conditions in which a domain error occurs and returned values.

functions

Domain error occurrence condition and return value

cos/cosf/cosl

sin/sinf/sinl

tan/tanf/tanl

Returns NaN if the input argument is NaN or +/- Inf.

atan/atanf/atanl

fabs/fabsf/fabsl

ceil/ceilf/ceill

floor/floorf/floorl

Returns NaN if the input argument is NaN.

atan2/atan2f/atan2l

Returns NaN if either input argument is NaN or both input arguments are +/- Inf.

frexp/frexpf/frexpl

Returns NaN if the input argument val is NaN or +/- Inf, and returns 0 to argument *exp.

ldexp/ldexpf/ldexpl

Returns NaN if the input argument val is NaN.

scalbn/scalbnf/scalbnl

scalbln/scalblnf/scalblnl

Returns NaN if the input argument x is NaN.

fmod/fmodf/fmodl

Returns NaN if the input argument x or y is NaN.

Returns Nan if the input argument x is +/- Inf or the input argument y is 0.

Returns x if the input argument x is not +/- Inf and the input argument y is +/- Inf.

modf/modff/modfl

Returns 0 if the input argument val is +/- Inf, and returns +/- Inf to argument iptr.

Returns NaN if the input argument val is NaN, and returns NaN to argument iptr.

Other functions

Returns NaN if a domain error occurs in accordance with the C99 standard.

(73)

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).

The return value is 0 or a denormalized number. ERANGE is set in errno in case of an underflow. No "underflow" floating-point exception is generated.

(74)

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 is generated. For details, see the description about the fmod function group.

(75)

The base-2 logarithm of the modulus used by the remquo functions in reducing the quotient (7.12.10.3).

The remquo function group is not supported.

(76)

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 signal handling functions are not supported.

(77)

The null pointer constant to which the macro NULL expands (7.17).

(void *)0.

(78)

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 character.

(79)

Whether space characters that are written out to a text stream immediately before a new-line character appear when read in (7.19.2).

Space characters appear when data is read.

(80)

The number of null characters that may be appended to data written to a binary stream (7.19.2).

0.

(81)

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 handling functions are not supported.

(82)

Whether a write on a text stream causes the associated file to be truncated beyond that point (7.19.3).

The file handling functions are not supported.

(83)

The characteristics of file buffering (7.19.3).

The file handling functions are not supported.

(84)

Whether a zero-length file actually exists (7.19.3).

The file handling functions are not supported.

(85)

The rules for composing valid file names (7.19.3).

The file handling functions are not supported.

(86)

Whether the same file can be simultaneously open multiple times (7.19.3).

The file handling functions are not supported.

(87)

The nature and choice of encodings used for multibyte characters in files (7.19.3).

The file handling functions are not supported.

(88)

The effect of the remove function on an open file (7.19.4.1).

The file handling functions are not supported.

(89)

The effect if a file with the new name exists prior to a call to the rename function (7.19.4.2).

The file handling functions are not supported.

(90)

Whether an open temporary file is removed upon abnormal program termination (7.19.4.3).

The file handling functions are not supported.

(91)

Which changes of mode are permitted (if any), and under what circumstances (7.19.5.4).

The file handling functions are not supported.

(92)

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 or INF is output for a positive infinity, -inf or -INF for a negative infinity, and nan or NAN for a NaN.

n character strings or n wide character strings are not supported when a NaN is written.

(93)

The output for %p conversion in the fprintf or fwprintf function (7.19.6.1, 7.24.2.1).

Hexadecimal notation.

The fprintf and fwprintf functions are not supported.

(94)

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).

Refer to "scanf" in "7.5.7 Standard I/O functions".

The fscanf and fwscanf functions are not supported.

(95)

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).

Hexadecimal number.

The fscanf and fwscanf functions are not supported.

(96)

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).

The file handling functions are not supported.

(97)

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).

Interpreted as a value other than a number of floating-point type in case of the strtod, strtof ot strtold function.

The wcstod, wcstof, and wcstold functions are not supported.

(98)

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).

The strtod, strtof and strtold functions set ERANGE in global variable errno.

The wcstod, wcstof, and wcstold functions are not supported.

(99)

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).

NULL is returned.

(100)

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 file handling functions are not supported.

(101)

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).

Not defined because of a freestanding environment.

(102)

The value returned by the system function when its argument is not a null pointer (7.20.4.6).

The system function is not supported.

(103)

The local time zone and Daylight Saving Time (7.23.1).

time.h is not supported.

(104)

The range and precision of times representable in clock_t and time_t (7.23).

time.h is not supported.

(105)

The era for the clock function (7.23.2.1).

time.h is not supported.

(106)

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).

time.h is not supported.

(107)

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).

No "inexact" floating-point exception is generated

(108)

Whether the functions in <math.h> honor the rounding direction mode in an IEC 60559 conformant implementation (F.9).

The rounding direction mode is fixed.

The fesetround function is not supported.

(109)

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).

Refer to "Standard header" in "4.2.3 C99 language specifications supported in conjunction with C90".

(110)

The number, order, and encoding of bytes in any object (when not explicitly specified in this International Standard) (6.2.6.1).

Refer to "4.1.3 Internal representation and value area of data".

(111)

The value of the result of the sizeof operator (6.5.3.4).

Refer to "4.1.3 Internal representation and value area of data".

Translation limits

The table below shows the translation limits of CC-RL.

The upper limit depends on the memory situation of the host environment for the item "No limit".

Table 4.2

Translation limits (C99)

Item

C99

CC-RL

Number of nesting levels of blocks

127

No limit

Number of nesting levels of conditional inclusion

63

No limit

Number of pointers, arrays, and function declarators (in any combinations) qualifying an arithmetic, structure, union, or incomplete type in a declaration

12

128

Number of nesting levels of parenthesized declarators within a full declarator

63

No limit

Number of nesting levels of parenthesized expressions within a full expression

63

No limit

Number of significant initial characters in an internal identifier or a macro name

63

No limit

Number of significant initial characters in an external identifier

31

No limit

Number of external identifiers in one translation unit

4095

No limit

Number of identifiers with block scope declared in one block

511

No limit

Number of macro identifiers simultaneously defined in one preprocessing translation unit

4095

No limit

Number of parameters in one function definition

127

No limit

Number of arguments in one function call

127

No limit

Number of parameters in one macro definition

127

No limit

Number of arguments in one macro invocation

127

No limit

Number of characters in a logical source line

4095

No limit

Number of characters in a character string literal or wide string literal (after concatenation)

4095

No limit

Number of bytes in an object (in a hosted environment only)

65535

32767(65535)Note1

Number of nesting levels for #included files

15

No limit

Number of case labels for a switch statement (excluding those for any nested switch statements)

1023

65535

Number of members in a single structure or union

1023

No limit

Number of enumeration constants in a single enumeration

1023

No limit

Number of levels of nested structure or union definitions in a single struct-declaration-list

63

No limit

Note 1.

The value in parentheses indicates the number of bytes in cases where -large_variable is specified.