Troubleshooting
Problem
Binaries built with the -qnamemangling=compat option and with functions that contain repeated typedef parameters prior to the fix in APAR IY63617 are not compatible with binaries that are built after IY63617.
Cause
Prior to the fix in APAR IY63617, repeated function parameters that were cv-qualified typedef equivalents of non-cv qualified built-in types were treated as distinct types and were not mangled using the compression scheme normally used for repeated parameter types. After the fix in APAR IY63617, these repeated parameters were mangled according to the compression scheme.
Resolving The Problem
To restore the behavior prior to the fix in IY63617 for users who are compiling with -qnamemangling=compat, the following backward compatibility option and pragma are added in XL C/C++ Enterprise Edition V7.0 and V8.0 for AIX:
- -qnamemanglingrulefor=compat=[no]fnparmstypedefscmp
- #pragma nameManglingRule(fnparmstypedefscmp, on|off|pop)
Syntax
----------
The syntax for the option and pragma are as follows:
>>--q-namemanglingrulefor-=-(--compat-=-fnparmstypedefscmp---)--><
|--nofnparmstypedefscmp--|
>>--#--pragma--nameManglingRule-(--fnparmstypedefscmp--,--off--)-><
|--on---|
|--pop--|
Suboptions
----------------
The suboptions for the option and pragma are as follows:
Option | Pragma | Description |
compat=fnparmstypedefscmp | fnparmstypedefscmp, on | Applies the compression scheme to repeated typedef parameters. This is the default behaviour under -qnamemangling=compat. |
compat=nofnparmstypedefscmp | fnparmstypedefscmp, off | Does not apply the compression scheme to repeated typedef parameters. This suboption overwrites the default -qnamemangling=compat behavior and reverts to the old behavior. |
n/a | fnparmstypedefscmp, pop | Discards the current #pragma nameManglingRule setting, and replaces it with the previous #pragma nameManglingRule setting in on the stack. If no previous settings remain on the stack, the default #pragma nameManglingRule setting is used. |
Example
----------------
The following example shows the result of new option or pragma setting:
Usage
----------
The new option and pragma are only applicable when -qnamemangling=compat is in effect, and the code to be compiled contains repeated function arguments which are typedefs of equivalent types that are not cv-qualified.
Related Information
Was this topic helpful?
Document Information
Modified date:
06 December 2018
UID
swg21251671