The Palm OS® Protein C/C++ Compiler is a full-featured, standards-based, optimizing C/C++ compiler.
- The Palm OS compiler supports the C language standard ANSI/ISO/IEC 9899:1999, commonly known as C99, as a freestanding implementation. The compiler uses this language by default for C code.
It is required that you understand both the ANSI/ISO standard C language and library. The ANSI/ISO 9899:1999 C standards document completely describes the standard C library functions, as do several widely-used references including:
- The Palm OS compiler supports the C++ language standard ANSI/ISO/IEC 14882:1998(E). The C++ language standard is also documented in other widely-used references including The C++ Programming Language, Third Edition, by Bjarne Stroustrup, Addison-Wesley, 2000, ISBN 0-20-1700735.
The Palm OS compiler takes as input one or more C and/or C++ language text files (written according to the standards above) and produces a corresponding number of assembly language source files (see the Palm OS Protein C/C++ Compiler Tools Guide for more details).
C Technical Requirements
In addition to the ANSI/ISO/IEC requirements previously mentioned, the C facilities of the Palm OS compiler meet the following additional technical requirements:
- Supports a variety of useful extensions to the base language, particularly those useful to the ARM architecture.
- Supports compiling with extensions removed that are incompatible with the appropriate ANSI specification.
- Produces code for the ARM instruction set for version 4T architecture microprocessors as defined in the ARM Reference Manual, revision E.
- Adheres to the C calling conventions of the base standard ABI for the ARM architecture.
- Adheres to the shared library conventions documented in the ARM-Thumb Shared Library Architecture (ASHLA, document number MADEIRA-0020-CUST-DDES A-01).
- Produces DWARF version 1.1 debugging information, if debugging output is requested.
C++ Technical Requirements
In addition to the ANSI/ISO/IEC requirements previously mentioned, the C++ facilities of the Palm OS compiler meet the following additional technical requirements:
Limitations
There are restrictions on some of the newer, more complex, and more exotic features of the relevant standards.
Restrictions on C99
The C99 implementation is limited is the following ways:
- Complex arithmetic is not supported, and thus all usages of the
_Complex
or_Imaginary
types are unsupported. This includes: - Avoid use of the
long double
type in the Simulator environment. It is unsupported and should not be used. There is a binary compatibility problem with i386 gcc and the compiler used to build the Simulator. - Floating-point environment control is not available, therefore the
__STDC_IEC_559__
and__STDC_IEC_559_COMPLEX__
macros are not defined. - Variable length arrays are available, however during debugging, the array length may not be available. The allocation of local VLAs is implemented via calls to
malloc()
andfree()
.
Restrictions on C++
The C++ implementation is limited is the following way:
Restrictions on Data Types
Table 1.1 lists the maximum and minimum sizes of the integral data types supported by the Palm OS Protein C/C++ Compiler.
Table 1.1 Maximum and minimum sizes of integer types
Table 1.2 lists constants that describe the attributes of floating-point data types.
Table 1.2 Constants describing attributes of floating-point numeric types