i960 Processor Compiler User's Guide
8-2
8
char Types
The ic960 compiler (all releases) treats default char types as signed,
whereas gcc960 treats them as
unsigned. gcc960 emulates ic960's
behavior if the
mic3.0-compat or mic2.0-compat options (see below)
are selected, or if the
fsigned-char option is selected. The preprocessor
symbol
__CHAR_UNSIGNED__ is set appropriately to allow programs to
determine which model is in use.
Identifying Architectures
The traditions for architecture-identifying preprocessor macro definitions
are somewhat different between ic960 and gcc960. Both interfaces define
the macros
__i960, __i960
xx
, and _i960, where
xx
is the architecture
(e.g., CA for the i960 CA processor, as selected by the
ACA option). These
are the recommended macros for testing for the i960 processor
architecture.
For compatibility reasons, the compilation system also defines additional
variations on these macros, as shown in Table 8-1.
Table 8-1 Architecture Macros and Compatibility
gcc960 ic960
_ _i960_ _X -
_i960
xx
-X
_
_i960_
xx
_ _X -
_ _i960
xx
_ _X -