staticInlineLinkage Language Option (C++)

Syntax: Default:
lang(staticInlineLinkage[, yes])
lang(staticInlineLinkage, no)
lang(staticInlineLinkage, no)

This option controls whether inline functions are treated as static or extern.

By default, VisualAge C++ treats inline functions as extern. Usually, the default setting is appropriate for incremental compile.

The default facilitates treating header files as sources for builds. If you convert an included file to a primary file, make sure you build with the default. Otherwise, variables and functions declared const but not declared external may acquire internal linkage.

For example, using the default lang(staticInlineLinkage, yes) setting causes function f in the following declaration to be treated as static, even though it is not explicitly declared as such.

inline void f() {/*...*/};

Using the default lang(staticInlineLinkage, no) setting gives f external linkage.

Set staticInlineLinkage to yes for compatibility with C++ compilers provided by previous versions of VisualAge C++ and predecessor products.



Incremental C++ Build
Configuration Files


Convert Included Source Files to Primary Source Files
Set Build Options
Build


Language Options for C++
Build Options
Build Options for Compliance With the C++ Standard
Build Options for Compatibility with Old C++ Compilers