IV44275: INCORRECT RECOGNITION OF INT & CONST INT

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The below two testcases demonstrate a similar issue with
    recognition of const and const int in the compiler front end.
    
    The first test case involves boost library and gives this error
    message at compile time for a header in boost:
    1540-0218 (S) The call does not match any parameter list for
    "objects::function_object".
    
    The second test case does not involve boost, and prints out
    incorrect result at runtime (prints out "failure") due to
    incorrect processing of the if( typeid(void (*)(int))==
    typeid(void (*)(const int)) statement.
    
    $cat test_case1.orig.cpp
    # include "boost/python.hpp"
    using namespace boost::python;
    
    struct A { A(int); };
    struct B { B(const int); };
    void test()
    {
        class_<A>("A", init<int>() ) ;
        class_<B>("B", init<const int>() ) ;
    }
    
    
    testcase2 does not involve boost:
    
    $cat test_case2.cpp
    #include <typeinfo>
    #include <stdio.h>
    int main(int argc, char **argv)
    {
        if(
            typeid(void (*)(int))
            ==
            typeid(void (*)(const int))
          )
            printf("success\n");
        else
            printf("failure\n");
        return 0;
    }
    

Local fix

  • n/a
    

Problem summary

  • PROBLEM DESCRIPTION: Incorrect recognition of int & const int
    
    USERS AFFECTED: The compiler may instantiate 2 templates with
    the same type when the template is instantiated with an
    argument that has a cv-qualifier on a function type
    

Problem conclusion

  • The problem has been resolved.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV44275

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-06-17

  • Closed date

    2013-06-17

  • Last modified date

    2013-06-17

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

    IV39832

  • 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

  • RC10 PSY U860073

       UP C



Rate this page:

(0 users)Average rating

Document information


More support for:

XL C/C++ for AIX
Compiler

Software version:

12.1

Reference #:

IV44275

Modified date:

2013-06-17

Translate my page

Machine Translation

Content navigation