Fixes are available
October 2009 Update for XL C/C++ for Linux, V10.1
June 2011 Update for XL C/C++ for Linux, V10.1
XL C/C++ for Linux Fix Pack 8 (January 2014 Update) for 10.1
August 2010 Update for XL C/C++ for Linux, V10.1
January 2011 Update for XL C/C++ for Linux, V10.1
January 2012 Update for XL C/C++ for Linux, V10.1
July 2012 Update for XL C/C++ for Linux, V10.1
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:
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
RA10 PSN LI74316
UP06/09/13
[{"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