HP C originates from the C language designed in 1972 by Dennis Ritchie at Bell Laboratories. It descended from several ALGOL-like languages, most notably BCPL and a language developed by Ken Thompson called B.
C has been called a "low-level, high-level" programming language. C"s operators and data types closely match those found in modern computers. The language is concise and C compilers produce highly efficient code. C has traditionally been used for systems programming, but it is being used increasingly for general applications.
The most important feature that C provides is portability. In addition,
C provides many facilities such as useful data types, including pointers
and strings, and a functional set of data structures, operators, and control
statements.
ANSI Mode
Unless you are writing code that must be recompiled on a system where ANSI
C is not available, it is recommended that you use the ANSI mode of compilation
for your new development. It is also recommended that you use ANSI mode
to recompile existing programs after making any necessary changes.
Because an ANSI-conforming compiler is required to do more thorough error detection and reporting than has been traditional among C compilers in the past, you may find that your productivity will be enhanced because more errors will be caught at compile time. This may be especially true if you use function prototypes.
If you do not specify the mode of compilation, beginning with the HP-UX
10.30 operating system release, it defaults to -Ae.
Compatibility Mode
You may not want to change your existing code, or you may have old code
that relies on certain non-ANSI features. Therefore, a compatibility mode
of compilation has been provided. In this mode, virtually all programs
that compiled and executed under previous releases of HP C/HP-UX will continue
to work as expected.
In HP-UX 10.20 and earlier releases, compatibility mode is the default
compilation mode. In HP-UX 10.30 forward, extended ANSI mode (-Ae)
is the default.
About HP C/HP-UX
HP C presents ANSI C as the standard version of the C language.
Where certain constructs are not available in compatibility mode, or would
work differently, it is noted and the differences are described.
HP C/HP-UX, when invoked in ANSI mode, is a conforming implementation
of ANSI C, as specified by American National Standard 9899-1990. The ANSI C Standard
terminology is used here, and HP C is
defined by that standard, while also documenting the implementation decisions
and extensions made in HP C/HP-UX. It is not the intent of the online help
to replicate the standard. Thus, you are encouraged to refer to the standard
for any fine points of the language not covered here.
HP C Online Help Contents
Online information for HP C is available for users on the IPF platform.
You may access HP C online help with the command line:
/opt/cc/bin/cc +help
The main HP C Online Help page will display links to the following reference and usage information: