Sun WorkShop Compiler C 5.0 User's Guide

-X[a|c|s|t]

The -X (note uppercase X) options specify varying degrees of compliance to the ANSI/ISO C standard. -Xa is the default mode.

-Xa

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

-Xc

(c = conformance) Issues errors and warnings for programs that use non-ANSI/ISO C constructs. This option is strictly conformant ANSI/ISO C, without K&R C compatibility extensions.

-Xs

(s = K&R C) Attempts to warn about all language constructs that have differing behavior between ANSI/ISO C and K&R C. The compiler language includes all features compatible with K&R C. This option invokes /usr/ccs/lib/cpp for preprocessing. _ _STDC_ _ is not defined in this mode. See Appendix G, K&R Sun C / Sun ANSI/ISO C Differences for a discussion of differences between ANSI/ISO C and K&R C.

-Xt

(t = transition) This option uses 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.