Installation guide

example, the DIGITAL UNIX compiler might issue errors or warnings in
cases for which the ULTRIX compiler does not. To minimize the effect of
these differences, use the DIGITAL UNIX compiler option that provides the
most compatibility, as shown in Table 7–3.
Table 7–3: Compilation Options that Are Compatible with ULTRIX C on
RISC Systems
If You Use This ULTRIX
Option
Use This DIGITAL UNIX Option
Default K&R C with
ANSI extensions.
Default (std0)—K&R C with ANSI extensions.
Some ANSI extensions are implemented differently.
std
std (Issues a warning message for certain
non-ANSI syntax. This mode is stricter on a
DIGITAL UNIX system, so you receive more
warnings than you do on an ULTRIX system.)
Although the DIGITAL UNIX compiler options offer compatibility with the
ULTRIX C for RISC compiler, some differences between the two compilers
exist. The ULTRIX and DIGITAL UNIX compilers operate differently in
some respects regardless of which DIGITAL UNIX compiler mode you use.
Other differences occur only when you use the std0 or the std1 option.
The rest of this section describes these differences.
7.4.2.1 Differences that Apply to All Modes
The following list describes compilation differences between ULTRIX C on
RISC systems and DIGITAL UNIX C. You might notice the following
differences regardless of the compilation mode you use:
The DIGITAL UNIX C compiler issues a warning if constants are
longer than the maximum allowed by ULONG_MAX. A similar warning
occurs if octal and hexadecimal character escape sequences exceed the
value of UCHAR_MAX. The ULTRIX C compiler issues no warnings in
these situations.
If a signed multicharacter constant is converted to an integer, the value
of the integer might differ between DIGITAL UNIX systems and
ULTRIX systems. This situation is true if the constant contains a
negative value.
As required by the ANSI C standard, the DIGITAL UNIX C compiler
strips a backslash (\) followed by a carriage return (^M) during the
preprocessing stage. On ULTRIX systems, these characters are stripped
during the later translation phase. Programs containing such constructs
might not work properly when input to the DIGITAL UNIX C compiler.
Migrating Your ULTRIX Application to a DIGITAL UNIX System 7–23