IBM Support

LI74423: INCORRECTLY HANDLING TYPEDEF NAMES.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When compiling with -qtempinc, the compiler emits the following
    error message:
    "tempinc/templ.hpp.C", line 4.29: 1540-0193 (S) A typedef name
    cannot be used in this context.
    xlC_r: 1501-240 (S) Previous errors were found when compiling
    tempinc/templ.hpp.C
    
    ===== COMPILE COMMAND:
    xlC_r -qtempinc foo.cpp -o foo
    
    ===== TESTCASE:
    Note: When you do a new compile, be sure to:
    rm -rf tempinc
    
    $ cat foo.cpp
    #include "templ.hpp"
    #include <stdio.h>
    
    class FooClient {
    public:
    
     FooClient()
     {
       FooTemplate<FILE*> someObj;
       return;
     };
    
    };
    
    int main(int argc, char *argv[])
    {
    
      FooClient myObj;
      return 0;
    } /* end of main */
    $
    $ cat templ.cpp
    template <class Type>
    FooTemplate<Type>::FooTemplate() {};
    $
    $ cat templ.hpp
    template <class Type>
    class FooTemplate {
      public:
      FooTemplate();
    
    };
    #pragma implementation("templ.cpp")
    $
    
    ===== ACTUAL OUTPUT:
    "tempinc/templ.hpp.C", line 4.29: 1540-0193 (S) A typedef name
    cannot be used in this context.
    xlC_r: 1501-240 (S) Previous errors were found when compiling
    tempinc/templ.hpp.C
    
    ===== EXPECTED OUTPUT:
    Should compile clean.
    

Local fix

  • n/a
    

Problem summary

  • Programmers who use -qtempinc maybe affected by this issue.
    
    If, during template instantiation, the
    template parameter is a typedef to an aggregate,
    compilation using -qtempinc fails with a syntax error.
    

Problem conclusion

  • The syntax error generated in the
    tempinc file was fixed, thus avoiding the failure in the
    subsequent compilation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI74423

  • 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-03-31

  • Closed date

    2009-03-31

  • Last modified date

    2009-03-31

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

    LI74316

  • 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++"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
31 March 2009