IBM Support

IV68009: CONFUSING DIAGNOSTIC ON TEMPLATE MISMATCH

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When diagnosing a template mismatch error, the compiler outputs
    an error message lacking the template name.  In a large
    application this may be confusing when trying to identify and
    fix the error.
    
    
       === TEST CASE ===
    
    namespace B { class ZZ; }
    namespace A { template <typename T> T test(B::ZZ); }
    namespace C { class ZZ ; }
    namespace A { template <> bool test(C::ZZ) { return false; } }
    
    
    "test.cpp", line 4.32: 1540-1278 (S) The deduced type "bool
    (ZZ)" does not match the specialized type "bool (ZZ)".
    

Local fix

Problem summary

  • PROBLEM DESCRIPTION:
    Confusing template diagnostic message causing difficult error
    debugging.
    
    USERS AFFECTED:
    Users with template mismatch.
    

Problem conclusion

  • A new message is now output that should correctly pinpoint the
    issue in the code.  For the example above, the following
    message is now output:
    
    'apar.cpp', line 4.32: 1540-1286 (S) The specialization does
    not match 'template T A::test(B::ZZ)'.A new message is now
    output that should correctly pinpoint the issue in the code.
    For the example above, the following message is now output:
    
    'apar.cpp', line 4.32: 1540-1286 (S) The specialization does
    not match 'template T A::test(B::ZZ)'.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV68009

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-12-17

  • Closed date

    2014-12-17

  • Last modified date

    2014-12-17

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

    IV63660

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

Fix information

  • Fixed component name

    XL C/C++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

  • RD10 PSY

       

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1"}]

Document Information

Modified date:
03 October 2021