Fixes are available
March 2009 Update for XL C/C++ for Linux, V10.1
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
===== DESCRIPTION: When using an unsigned short array to store string characters, some values are stored incorrectly as a different value. ===== TESTCASE: #include <stdio.h> #define CHECK(a, b) \ if ( (long)(a) != (long)(b) ) \ { printf("Error %ld != %ld (File: %s Line: \ %d)\n",(long)a,(long)b,__FILE__, __LINE__); } \ else {printf("Success %ld == %ld (File: %s Line:%d)\n",(long)a, (long)b,__FILE__, __LINE__); } int main() { const unsigned short *s0 = u"\n\t\a\100XYZ"; CHECK ( s0[0], 0xa ); CHECK ( s0[1], 0x9 ); CHECK ( s0[2], 0x7 ); CHECK ( s0[3], 64 ); //a CHECK ( s0[4], 'X' ); } ===== ACTUAL OUTPUT: Success 10 == 10 (File: TestCase.cpp Line:12) Success 9 == 9 (File: TestCase.cpp Line:13) Success 7 == 7 (File: TestCase.cpp Line:14) Error 16384 != 64 (File: TestCase.cpp Line: 15) Error 22528 != 88 (File: TestCase.cpp Line: 16) ===== EXPECTED OUTPUT: Success 10 == 10 (File: TestCase.cpp Line:12) Success 9 == 9 (File: TestCase.cpp Line:13) Success 7 == 7 (File: TestCase.cpp Line:14) Success 64 == 64 (File: TestCase.cpp Line: 15) Success 88 == 88 (File: TestCase.cpp Line: 16)
Local fix
N/A
Problem summary
Programmers who use hex or octal escape sequences in character or string literals. In certain instances, the generated code is incorrect. A complete (and detailed) list, provided above, is to be published in a Technote.
Problem conclusion
We fixed all instances of incorrect code generation
Temporary fix
Comments
APAR Information
APAR number
LI74348
Reported component name
XL C/C++ SLES10
Reported component ID
5724U8300
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++ SLES10
Fixed component ID
5724U8300
Applicable component levels
RA10 PSN IZ39039
UP06/09/13
[{"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:
16 October 2021