-qproto

Category

Object code control

Pragma equivalent

#pragma options [no]proto

Purpose

Specifies the linkage conventions for passing floating-point arguments to functions that have not been prototyped.

When proto is in effect, the compiler assumes that the arguments in function calls are the same types as the corresponding parameters of the function definition, even if the function has not been prototyped. By asserting that an unprototyped function actually expects a floating-point argument if it is called with one, you allow the compiler to pass floating-point arguments in floating-point registers exclusively. When noproto is in effect, the compiler does not make this assumption, and must pass floating-point parameters in floating-point and general purpose registers.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noproto-.   
>>- -q--+-proto---+--------------------------------------------><

Defaults

-qnoproto

Usage

This option is only valid when the compiler allows unprototyped functions; that is, with the cc or xlc invocation command, or with the -qlanglvl option set to classic | extended | extc89 | extc99.

Predefined macros

None.

Examples

To compile my_c_program.c to allow the compiler to use the standard linkage conventions for floating-point parameters, even when functions are not prototyped, enter:
xlc my_c_program.c -qproto