EasyManua.ls Logo

Intel i960 - C Version Incompatibilities

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i960 Processor Compiler User's Guide
12-8
12
C Version Incompatibilities
There are several noteworthy incompatibilities between Intel C for the
80960 architecture and some (non-ANSI) versions of C.
String Constants Read-only
The compiler normally makes string constants read-only. If several
identical-looking string constants are used, the compiler stores only one
copy of the string.
If this is a problem for your application, the best solution is to change the
program to use
char-array variables with initialization strings for these
purposes instead of string constants. But if this is not possible, you can
use the
fwritable-strings flag, which directs the compiler to handle
string constants the same way most C compilers do.
ftraditional also
has this effect, among others.
No Macro Argument Substitution in Strings
The compiler does not substitute macro arguments when they appear
inside of string constants. For example, the following macro:
#define foo(a) "a"
produces output "a" regardless of what the argument a is.
The
ftraditional option directs the compiler to handle such cases
(among others) in the old-fashioned (non-ANSI) fashion.
External Variables and Functions in Blocks
Declarations of external variables and functions within a block apply only
to the block containing the declaration. In other words, they have the
same scope as any other declaration in the same place.

Table of Contents

Related product manuals