C/C++ Compiler (cl.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Generating Function Declarations (/Zg)
◄Up► ◄Contents► ◄Index► ◄Back►
─────C/C++ Compiler─────────────────────────────────────────────────────────
Syntax: /Zg
This option generates a function prototype for each function
defined in the source file but does not compile the source file.
The function prototype includes the function return type and an
argument-type list. The argument-type list is generated from the
types of the formal parameters of the function. Any function
prototypes already present in the source file are ignored.
The generated list of prototypes is written to the standard
output. You may find this list helpful to verify that actual
arguments and formal parameters of a function are compatible. You
can save the list by redirecting standard output to a file. Then
you can use #include to make it a part of your source file as
function prototypes. This is a useful technique, as the presence
of function prototypes allows the compiler to perform argument
type checking.
If you use the /Zg option and your program contains formal
parameters that have structure, enumeration, or union type (or
pointers to such types), the prototype for each structure,
enumeration, or union type must have a tag.
-♦-