-qkeepinlines (C++ only)

Category

Object code control

Pragma equivalent

None.

Purpose

Keeps or discards definitions for unreferenced extern inline functions.

When -qnokeepinlines is in effect, the compiler discards the definitions of unreferenced external inline functions. When -qkeepinlines is in effect, the compiler keeps the definitions of unreferenced external inline functions.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nokeepinlines-.                       
>>- -q--+-keepinlines---+--+----------------+------------------><
                           '-=----exports---'   

Defaults

-qnokeepinlines

Parameters

exports
Ensures that the compiler does not discard the inline functions that are in the export lists.

Usage

-qnokeepinlines reduces the size of the object files. -qkeepinlines provides the same behavior as VisualAge® C++ compilers previous to the v5.0.2.1 update level, allowing compatibility with shared libraries and object files built with the earlier releases of the compiler.

If you want the compiler to keep the list of symbols and their definitions that were built by using an earlier version of the compiler, you can use -qkeepinlines=exports to make sure that the compiler does not discard these symbols and their definitions while inlining program functions. However, if you do not specify an export file, or the export file does not contain any symbols, the compiler generates the same object file as -qnokeepinlines.

When you use -qkeepinlines=exports to compile a program, you must use either the -bE or the -bexport option to specify a file that contains the symbols to export as shown in the following examples:
xlC -qmkshrobj -qkeepinlines=exports -bE:file_name source_file
xlC -qmkshrobj -qkeepinlines=exports -bexport:file_name source_file

Predefined macros

None.

Related information