i960 Processor Compiler User's Guide
12-6
12
All that is needed here is to make MY_PORT volatile, as follows:
#define MY_PORT *((volatile int *) 0x10000)
This suppresses (2), as MY_PORT must be considered to have changed
between iterations of the loop.
Known Problems Using the Compiler
Here are some of the things that have caused trouble for people using the
compiler.
Type Promotion
Users often think it is a bug when the compiler reports an error for code
like this:
int foo (short);
int foo (x)
short x;
{...}
The error message is correct: this code really is erroneous, because the
old-style non-prototype definition passes subword integers in their
promoted types. In other words, the argument is really an
int, not a
short. The correct prototype is this:
int foo (int);
Prototype Scope
Users often think it is a bug when the compiler reports an error for code
like this:
int foo (struct mumble *);
struct mumble { ... };
int foo (struct mumble *x)
{ ... }