IV30906: INCORRECT TEMPLATE SIGNATURE FOR CONST TYPE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The signature for a template function with a const type
    parameter is being generated the same as the template function
    with a non-const type parameter.  This is causing internal and
    external linkage conflicts because the same function name is
    being used for two different functions.
    
    
        ===== TEST CASE =====
    
    template<class T>
    class MyClass { };
    
    float testfunc(MyClass<float>)      { return 1; }
    float testfunc(MyClass<const float>){ return 2; }
    
    void test() {
        MyClass<float>       withfloat;
        MyClass<const float> withconstfloat;
    
        1 == testfunc(withfloat);
        2 == testfunc(withconstfloat);
    }
    
    
    line 5.7: 1540-0704 (S) The definitions of "float
    testfunc(MyClass<const float>)" and "float
    testfunc(MyClass<float>)" have the same linkage signature
    "testfunc__F7MyClassXTf_".
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION:
    A problem with name mangling of template type parameters causes
    a compilation error.
    
    USERS AFFECTED:
    Users of templates instantiated using datatypes with
    cv-qualified names.
    

Problem conclusion

  • The name mangling behaviour was corrected in the V12.1 compiler
    by default.  The fix for the V11.1 compiler is controlled via
    the option:  -qxflag=MangleCVOnTemplateTypeArgs
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV30906

  • Reported component name

    XL C/C++ AIX

  • Reported component ID

    5724X1300

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-10-26

  • Closed date

    2013-02-07

  • Last modified date

    2013-02-08

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI77446

Fix information

  • Fixed component name

    XL C/C++ AIX

  • Fixed component ID

    5724X1300

Applicable component levels

  • RB10 PSY U858036

       UP C



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

XL C/C++ for AIX

Software version:

11.1

Reference #:

IV30906

Modified date:

2013-02-08

Translate my page

Machine Translation

Content navigation