Installation guide
• The DIGITAL UNIX C compiler does not allow you to modify a type you
create with the typedef statement. For example, the following
statement is invalid on DIGITAL UNIX systems:
typedef int account;
.
.
.
account monthly;
unsigned account display_account;
To achieve this effect on DIGITAL UNIX systems, you must create both
a signed and unsigned type, as shown:
typedef int account;
typedef unsigned int display_variable;
.
.
.
account monthly;
display_variable display_account;
• On DIGITAL UNIX systems, you cannot declare or define a type within
a function prototype. The ULTRIX compiler allows this, although doing
so causes the parameter to be incompatible with any other type.
For example, suppose the structure S shown in the following
declaration has not been declared previously. Any further type
matching of the parameter list results in an error. At the end of the
prototype, the scope ends, which means that S is no longer available:
int convert_array (struct S *p);
On DIGITAL UNIX systems, you must declare the structure S outside
of the function prototype, as shown:
struct S *p;
int convert_array(struct S);
• If you include a directory specification as an option to the #line
directive, the DIGITAL UNIX C preprocessor uses the directory as the
local directory for all subsequent #include directives. The ULTRIX C
preprocessor did not process the #line directives in this manner. To
force the compiler to search locally instead of using the #line directive
information, use the −I option to the cc command and specify the local
directory (the period character), as follows:
cc −g −O0 −I. −c sample_module.c
Since various C code generators (for example, lex and yacc) insert a
#line directive into the generated C code, you might encounter this
error inadvertently.
7–24 Migrating Your ULTRIX Application to a DIGITAL UNIX System