Download Open Systems Portability Checker User Guide
Transcript
remote. What is more common is for two types that are compatible to be given different
checksums (because C allows the same type to be written in different ways). Objects
having these types are then flagged as being incompatable. Where possible the
checksum has been created so as to minimise the possibility of two compatible types
having different checksums.
The -FUlltype option controls which form of type checking is performed. Switching
this option on causes the type checking to be as per the C standard.
mcl prog1 prog2 -fuIf file1.c contains:
enum qw {a, b, c} x1;
enum ge {a1, b1, c1} x2;
struct gs {
int mem1;
long mem2;
} gx;
int f1();
int f2();
and file2.c contains:
enum qw {c = 2, b = 1, a = 0}x1;
enum ge {a1, b1, ccc1} x2;
struct gs {
int mem1;
long mem2_2;
} gx;
int f1(int);
int f2(char);
The warnings generated would depend on the setting of the -FUlltype option.
FUlltype+
x1 are compatible
x2 are not compatible
gx are not compatible
f1 are compatible
f2 are not compatible
FUlltype-
x1 are not compatible
x2 are compatible
gx are compatible
f1 are compatible
f2 are compatible
If ‘quick’ type checking is being used and there is some doubt as to the incompatability
of the identifiers being flagged. It is recommended that full type checking be used.
One advantage of using full type checking is that the types will be displayed in a
readable form if incompatable types are found.