Sun WorkShop Compiler C 5.0 User's Guide

Basic Modes

The ANSI/ISO C compiler allows both old-style and new-style C code. The following -X (note case) options provide varying degrees of compliance to the ANSI/ISO C standard. -Xa is the default mode.

-Xa

(a = ANSI) ANSI/ISO C plus K&R C compatibility extensions, with semantic changes required by ANSI/ISO C. Where K&R C and ANSI/ISO C specify different semantics for the same construct, the compiler issues warnings about the conflict and uses the ANSI/ISO C interpretation. This is the default mode.

-Xc

(c = conformance) Maximally conformant ANSI/ISO C, without K&R C compatibility extensions. The compiler issues errors and warnings for programs that use non-ANSI/ISO C constructs.

-Xs

(s = K&R C) The compiled language includes all features compatible with pre-ANSI/ISO K&R C. The computer warns about all language constructs that have differing behavior between ANSI/ISO C and K&R C.

-Xt

(t = transition) ANSI/ISO C plus K&R C compatibility extensions, without semantic changes required by ANSI/ISO C. Where K&R C and ANSI/ISO C specify different semantics for the same construct, the compiler issues warnings about the conflict and uses the K&R C interpretation.