extended level C, the default language level, adheres to the ANSI/ISO C definition except where adherence conflicts with compatibility with the RT C implementation. In the case of certain obsolete RT C language definitions, adherence to the ANSI/ISO C standard takes precedence over compatibility with RT C.
This page lists the conflicts between:
Conflicts Between
extended C and ansi C
The following are areas where extended
level C supports RT C constructs and conventions not supported by
ansi level C:
Macro parameters found within quoted strings in replacement text are not replaced in ansi mode but are replaced in extended mode.
extended level C follows the rules outlined in Arithmetic Conversions for langlvl=extended, which differ from the ansi level C conversion rules defined in section 3.2.1.5 of the ANSI/ISO C Standard.
In ansi mode, external functions have block scope. In extended mode, they have file scope.
extended mode allows assignment of a pointer to an object of a different type. In ansi mode, a cast operation is necessary if conversion is to be done.
In ansi mode, an attempt to assign pointers of different types to each other produces an error message. extended mode accepts the assignment.
Accepted in extended mode but not in ansi mode.
ansi mode requires a function declared static to be defined in the same file as the declaration. In extended mode, a function that is declared static but is not defined in the same file as the declaration is implicitly redeclared extern. An informational message is produced.
Allowed by extended but not by ansi.
Both ansi and extended modes give you the choice of making string literals either modifiable or unmodifiable, but the defaults are different. The default is modifiable for extended and unmodifiable for ansi.
The ANSI/ISO C standard defines a relaxed, strict, and initialization ref/def model for objects with external linkage. extended mode supports the relaxed model, whereas ansi mode supports a combination of the strict and initialization models.
Allowed in extended mode but not in ansi mode. In extended mode, an error message is issued, but compilation continues. Both unsigned char and unsigned short are changed to unsigned int. For bit fields, unsigned char and unsigned short are changed to unsigned int.
Allowed in extended mode but not in ansi mode.
In ansi mode the C compiler distinguishes between the three character types; in extended mode, the C compiler does not distinguish between char and unsigned char.
ansi level C requires that a macro be undefined before it can be defined again in a #define directive. extended level C allows macros to be redefined without first being undefined. An informational message is issued that states that the second definition is used.
In extended mode only, the compiler allows the $ (dollar sign) character to be used in identifier names to facilitate calls between different languages. The $ (dollar sign) is not a valid character for identifiers in ansi mode.
Allowed by extended but not by ansi.
Conflicts Between extended
C and RT C
Ideally, extended mode should
handle all RT C source code without conflict. Certain obsolete RT
C definitions do conflict with ANSI/ISO C. For these, extended
mode follows ANSI/ISO C and conflicts with RT C.
extended level C does not support the following RT C definitions:
Extensions to RT C
Provided by extended C
Exceptions to ansi
C Addressed by classic C
saal2
C Deviations from SAA Level 2 C
Arithmetic
Conversions for extended Level C
Summary of C
Language Level Conflicts