IBM Support

LI75052: INVALID NAME-LOOKUP ERROR MESSAGE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following redueced test case gives out invalid name lookup
    error message compiled on xlC:
    
    /* nt.cpp */
    struct Base  {};
    
    struct Fifo{
       void end();
    };
    
    // 38
    struct FifoWithSync2:public Fifo{
          typedef Fifo Base;
    
          Fifo* other() const;
          void end() {
             // 57 (S)
            other()->Base::end();
          }
    };
    
    $xlC nt.cpp
    
    "nt.cpp", line 16.18: 1540-0259 (S) The name lookups of "Base"
    do not yield the same type in the context of the expression and
    in the context of the class of the object expression.
    "nt.cpp", line 16.18: 1540-1209 (I) The name lookup in the
    context of "struct Fifo" resolved to "struct Base".
    "nt.cpp", line 16.18: 1540-1210 (I) Name lookup in the context
    of the expression resolved to "FifoWithSync2::Base".
    

Local fix

  • Change the tydef statement to another name, or remove it
    altogether.
    
    For example:
    
          typedef Fifo Base1;
    
          ...
    
          other()->Base1::end();
    
    
    Or
    
         // typedef Fifo Base;
    
          ...
    
          other()->Fifo::end();
    

Problem summary

  • USER AFFECTED:
    The problem will only happen on a member access (. or ->)
    followed by a qualified name, when there is more
    than one name found by name lookup.
    
    PROBLEM DESCRIPTION:
    An incorrect name lookup caused the compiler to pick
    two names and report them in conflict.
    

Problem conclusion

  • The issue with name lookup has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75052

  • Reported component name

    XL C/C++ RHEL52

  • Reported component ID

    5724U8310

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-12-01

  • Closed date

    2009-12-01

  • Last modified date

    2009-12-01

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

    IZ51545

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

Fix information

  • Fixed component name

    XL C/C++ RHEL52

  • Fixed component ID

    5724U8310

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
14 October 2021