EasyManua.ls Logo

Intel i960 - Longjmp and Volatile Data

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...
Caveats
12-7
12
This code really is erroneous, because the scope of the struct mumble
prototype is limited to the argument list containing it. It does not refer to
the
struct mumble defined with file scope immediately below — they are
two unrelated types with similar names in different scopes.
But in the definition of
foo, the file-scope type is used because that is
available to be inherited. Thus, the definition and the prototype do not
match, and you get an error.
longjmp and Volatile Data
If you use longjmp, beware of automatic variables. ANSI C says that
automatic variables that are not declared
volatile have undefined values
after a
longjmp. And this is all the compiler promises to do, because it is
very difficult to restore register variables correctly, and one of the
compiler's features is that it can put variables in registers without being
asked.
Incorrect debug information generated for arrays
with unspecified bounds
Consider the following example
int arr[];
The compiler generates debug information for the above declaration as if
arr were an array of 1 integer. As a result, when you do a ptype arr
in gdb960 the type of arr is displayed as int [1].

Table of Contents

Related product manuals