Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Introduction to Porting
Open System Services Porting Guide520573-006
1-5
Porting Is Easier When Standards Are Used
ISO/ANSI C Features
Some ISO/ANSI C standard features are implementation-defined. The vendor can
choose what values to give to those features.
Table 1-1 lists new ISO/ANSI C features, not supported in Common C. New ISO/ANSI
C features are important only if your program is written in Common C.
Table 1-1. ISO/ANSI C Features Not Supported in Common C (page1of2)
Feature
Type ISO/ANSI C Feature
Preprocessor ## added for concatenation of tokens
# added for creation of strings
#pragma added (nonportable)
#elif added
Parameters inside strings are not replaced
Splicing lines with the backslash (\) is allowed everywhere
Character set Trigraphs added
wchar_t added for wide-character strings
Can be signed as well as unsigned
Identifiers Minimum significance of internal identifiers increased to 31 characters
Names beginning with underscore (_) followed by another underscore or a
capital letter are reserved by the system
Inclusion of the system header file might result in some names being
reserved
Keywords void
, const, volatile, signed, and enum
Operators Assignment operators -=, +=, and so on are treated as single tokens
unary + added
size of yields size_t instead of unsigned int
& operator can always be applied to arrays
& operator can never be used with an object declared as a register
Strings List of \x escapes expanded
Adjacent string literals are concatenated
String constants can be placed in read-only memory
Switch
statements
The controlling expression and case labels can have any integral type
Arithmetic Arithmetic conversions use the smallest type that can hold the result
Shifting by a long count does not coerce the shifted operands to long