This section describes behavior that is not defined by the ANSI standard.
A message is output if a source file contains a character not specified by the character set.
A message is output if there is a single or double quotation mark ("/") in the last category (a delimiter or a single non-white-space character that does not lexically match another preprocessing lexical type).
Since all identifier characters have meaning, there are no meaningless characters.
If the same identifier appears for both internal linkage and external linkage within a single translation unit, a warning message will be output. If there is a declaration that contains no storage class specifier, external linkage is assumed. If there is no declaration that contains no storage class specifier and both static and extern storage class specifiers are used, internal linkage is assumed.
extern int xxx; static int xxx; // A warning is output and xxx is handled as an external // variable. int xxx; // A warning is output and xxx is handled as an external // variable. |
All declarations referencing the same object or function must be compatible. If they are not compatible within a single translation unit, a message is output. Otherwise, it is undefined.
Specific non-graphical characters can be expressed by means of extended notation, consisting of a backslash (\) followed by a lower-case letter. The following are available: \a, \b, \f, \n, \r, \t, and \v. There is no other extended notation; other letters following a backslash (\) become that letter.
When a simple string literal is adjacent to a wide string literal token, they are concatenated into a wide string literal.
Users modify string literals at their own risk.
If the following characters appear in strings between the delimiter characters < and >, or between two double quotation marks ("), then they are treated as part of the file name: characters, comma (,), double quote ("), two slashes (//), or slash-asterisk (/*). The backslash (\) is treated as a folder separator, not as an escape character.
If a floating-point type is typecast into an integral type, and the integer portion cannot be expressed as an integral type, then it is undefined.
If the lvalue has an incomplete type and does not have an array type, then the CC-RL operation is undefined.
If the number of arguments does not match the number of formal parameters, then the CC-RL operation is undefined.
If a function is defined without a function prototype, and the types of the extended arguments do not match the types of the extended formal parameters, then it is undefined.
If a function is defined with a type that is not compatible with the type specified by the expression indicating the called function, then it is undefined.
If a function is defined in a form that includes a function prototype, and the type of an extended argument is not compatible with that of a formal parameter, or if the function prototype ends with an ellipsis, then it is undefined.
If an incorrect value is assigned to a pointer, then the behavior of the unary * operator will either output a message, obtain an undefined value, or result in an illegal access, depending on the hardware design and the contents of the incorrect value.
If a typecast pointer is used to call a function with other than the original type, then it is undefined.
If a pointer is cast into an integral type, and the amount of storage is too small, then it is undefined.
A message will be output and code for a divide by zero will be generated if a divide by zero is detected during compilation.
If addition or subtraction is performed on a pointer that does other than indicate elements in an array object, then it is undefined.
If subtraction is performed using two pointers that do not indicate elements in the same array object, then it is undefined.
If the right operand is negative or the expanded left operand is wider than the bit width, then it is undefined.
If the objects referred to by the pointers being compared are not members of the same aggregate or union object, then it is undefined.
If a value stored in an object is accessed via another object that overlaps that object's storage area in some way, then the overlapping portion must match exactly. Furthermore, the types of the two objects must have modified or non-modified versions with compatible types. Assignment to non-matching overlapping storage could cause the value of the assignment source to become corrupted. The value after assignment is not guaranteed.
If the member declaration list does not include named members, then a message will be output warning. Note, however, that the same message will be output accompanied by an error if the -ansi option is specified.
If an object defined with a const modifier is modified using an lvalue that is the non-const modified version, then it is undefined.
If an object defined with a const modifier is modified using an lvalue that is the non-const modified version, then it is undefined.
If a return statement without an expression is executed, and the caller uses the return value of the function, then it is undefined.
If a function taking a variable number of arguments is defined without a parameter type list that ends with an ellipsis, then the values of the formal parameters will be undefined.
If a replacement operation generates a "defined" token, or if the usage of the "defined" unary operator before macro replacement does not match one of the two formats specified in the constraints, then it is undefined.
If the arguments (before argument replacement) do not contain preprocessing tokens, then it is undefined.
If an argument list contains a preprocessor token stream that would function as a processing directive in another circumstance, then it is undefined.
A message is output if the results of replacement are not a correct simple string literal.
A message is output if the results of replacement are not a correct preprocessing tokens.