| Syntax: | Default: |
| file(genProto[, yes]) file(genProto, no) file(genProto, withParameterNames) |
file(genProto, no) |
This option determines whether ANSI C prototypes are produced from K&R function definitions. The prototypes will be produced in a file with the same base name as the original source file and the file extension .proto. They will also be echoed to stdout.
By default, ANSI prototypes are not produced.
Setting file(genProto, yes) will cause prototypes to be generated without parameter names. Parameter names are included in the prototype when file(genProto, withParameterNames) is set.
For example, for the following function:
foo(a,b,c) float a; int *b; /* ... */
specifying file(genProto, yes) produces the following prototype:
int foo(a,b,c) foo(double, int*, int);
The parameter names are dropped. On the other hand, specifying file(genProto, withParameterNames) produces the following prototype:
int foo(a,b,c) foo(double a, int* b, int c);
In this case the parameter names are kept.
Note that float a is represented as double
or double a in the prototype, since ANSI
states that all narrow-type arguments (such as char, short, and
float) are widened before they are passed to K&R functions.
![]()
C Compilation
Configuration
Files
