-qcomplexgccincl

Category

Compiler customization

Pragma equivalent

None.

Purpose

Specifies whether to use GCC parameter-passing conventions for complex data types (equivalent to enabling -qfloat=complexgcc) for selected include files only.

When -qcomplexgccincl is in effect, the compiler internally wraps #pragma complexgcc(on) and #pragma complexgcc(pop) directives around the files located in specified directories. When -qnocomplexgccincl is in effect, include files found in the specified directories are not wrapped by these directives.

You can also use the pragma directives to enable or disable GCC parameter-passing conventions for complex data types for selected files or sections of code.

Syntax

Read syntax diagramSkip visual syntax diagram
Option syntax

        .-complexgccincl---.                      
>>- -q--+-nocomplexgccincl-+--=--directory_path----------------><

Read syntax diagramSkip visual syntax diagram
Pragma syntax

>>-#--pragma--complexgcc--(--+-on--+--)------------------------><
                             +-off-+      
                             '-pop-'      

Defaults

By default, files located in the standard directories for the XL C/C++ and GCC header files are wrapped with #pragma complexgcc directives. For a list of these, see Directory search sequence for include files.

Parameters

directory_path (option only)
The directory in which the include files to be wrapped with #pragma complexgcc directives are located. If you do not specify a directory_path, the compiler assumes the default directories listed above.
on (pragma only)
Sets -qfloat=gccomplex for the code that follows it. This instructs the compiler to use the GCC conventions for passing and returning parameters of complex type, by using general purpose registers.
off (pragma only)
Sets -qfloat=nogccomplex for the code that follows it. This instructs the compiler to use AIX® conventions for passing and returning parameters of complex type, by using floating-point registers.
pop (pragma only)
Discards the current pragma setting and reverts to the setting specified by the previous pragma directive. If no previous pragma was specified, reverts to the command-line or default option setting.

Usage

The current setting of the pragma affects only functions declared or defined while the setting is in effect. It does not affect other functions.

Calling functions through pointers to functions will always use the convention set by the -qfloat=[no]complexgcc command-line option in effect. An error will result if you mix and match functions that pass complex values by value or return complex values. For example, assume the following code is compiled with -qfloat=nocomplexgcc:
#pragma complexgcc(on) 
void p (_Complex double x) {} 

#pragma complexgcc(pop) 
typedef void (*fcnptr) (_Complex double); 

int main() { 
    fcnptr ptr = p;	/* error: function pointer is -qfloat=nocomplexgcc; 
                              function is -qfloat=complexgcc */ 
}

Predefined macros

None.

Related information