Fixes are available
APAR status
Closed as program error.
Error description
The -qinfo=rea diagnostic for unreachable code is incorrectly flagging a reachable statement. The issue appears related to exception handling code flow. === TEST CASE === #include <iostream> using namespace std; void funcThatThrows() { throw 25; } int main () { try { funcThatThrows(); return 1; } catch (int e) { if (e > 100) throw; } cout << "reachable" << endl; return 0; } $ xlC -qinfo=rea apar.cpp "test.cpp", line 22.24: 1540-5340 (I) The statement is unreachable. $ ./a.out reachable $
Local fix
Problem summary
PROBLEM DESCRIPTION: The compiler was missing the fact that a function call in a try block may throw and bypass a return statement in the try block after the function call. USERS AFFECTED: Users of option -qinfo=rea to get compiler warnings of unreachable statements.
Problem conclusion
The problem has been solved.
Temporary fix
Comments
APAR Information
APAR number
IV91637
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
D13
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-12-21
Closed date
2016-12-21
Last modified date
2016-12-21
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++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D13","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
19 August 2024