#pragma weak

In IBM® XL C/C++ for AIX® 16.1.0 or earlier releases, #pragma weak prevents the linker from issuing error messages if it encounters a symbol multiply-defined during linking, or if it does not find a definition for a symbol.

IBM Open XL C/C++ for AIX 17.1.4 does not support #pragma weak. You are recommended to use the __attribute__((weak)) attribute or the #pragma clang attribute push ([[weak]], apply_to = any(function)) as alternatives.

Related information