IBM Support

LI77711: INCORRECT WARNING FOR UNREACHABLE STATEMENT with throw

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When an exception is thrown, an undeserved message 1540-5340 is
    issued with the below test case.
    
    "xlc12_defect_infounreachable.cpp", line 14.4: 1540-5340 (I)
    The statement is unreachable.
    "xlc12_defect_infounreachable.cpp", line 16.8: 1540-5350 (I)
    The condition always evaluates to false.
    "xlc12_defect_infounreachable.cpp", line 16.15: 1540-5340 (I)
    The statement is unreachable.
    
    For the below example, only the first 1540-5340 is unexpected.
    The second is expected.
    
    ===== TESTCASE:
    $cat xlc12_defect_infounreachable.cpp
    #include <iostream>
    #include <stdexcept>
    #include <cstdlib>
    
    signed main(signed argc, char **) {
       signed result(EXIT_SUCCESS);
    
       if (1 == argc) {
          std::cout << "reachable" << std::endl;
       } else {
          std::string const msg("arg entered");
          std::runtime_error const e(msg);
          throw e;
       } // line 14
    
       if (false) {  //line 16
          std::cout << "unreachable" << std::endl;  //line 17
       }
    
       return result;
    }
    
    xlC -q'info=all' xlc12_defect_infounreachable.cpp
    

Local fix

  • N/A, only warning.
    

Problem summary

  • PROBLEM DESCRIPTION: Incorrect unreachable message was placed
    in compiler generated code, confusing the users.
    
    USERS AFFECTED: Users with -qinfo=rea option on
    

Problem conclusion

  • The message is no longer being emitted incorrectly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI77711

  • Reported component name

    XL C/C++ FOR BG

  • Reported component ID

    5799AG100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2013-11-26

  • Closed date

    2013-11-26

  • Last modified date

    2013-11-26

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

    IV48141

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

Fix information

  • Fixed component name

    XL C/C++ FOR BG

  • Fixed component ID

    5799AG100

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS2LWA","label":"XL C\/C++ for Blue Gene\/Q"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

Modified date:
05 September 2024