IBM Support

IZ76017: XLC ACCEPTS TEMPLATES WITHOUT ARGUMENT LIST

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • For the following reduced test case where the template has no
    argument list, xlC compiler accepts it and does not give out
    error message.
    
    
    struct container{
       template <class A, class B> struct inner;
    };
    
    struct tester : public container {
       friend class container::inner;
    };
    
    xlC
    clean compile
    
    
    It should give out errors similar to:
    
    b.cpp:8: error: invalid use of template-name 'container::inner'
    without an argument list
    b.cpp:8: error: friend declaration does not name a class or
    function
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION: The compiler was failing to emit a
    diagnostic for a failed name lookup for a member class of a
    template
    
    USERS AFFECTED: The problem affects name lookup of a member
    class of a template class
    

Problem conclusion

  • 'b.cpp', line 6.4: 1540-1113 (S) The class template name
    'inner' must be followed by a < in this context.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ76017

  • Reported component name

    XL C++ AIX

  • Reported component ID

    5724U8100

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-05-13

  • Closed date

    2010-10-05

  • Last modified date

    2010-10-05

Fix information

  • Fixed component name

    XL C++ AIX

  • Fixed component ID

    5724U8100

Applicable component levels

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

Document Information

Modified date:
06 October 2021