IBM Support

IY70447: INAPPROPRIATE WARNING WITH -QWARN64 AND INT_MAX

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • *** This APAR was originally reported on, and fixed on, another
    compiler platform. The following text is taken from the APAR for
    the original product and platform. ***
    .
    The following test case, when compiled with -qwarn64, produces
    an inappropriate error message.
    
    Test case:
    ----
    #include <limits.h>
    #include <stdio.h>
    
    long bar (int i) { return
    static_cast<long>(static_cast<unsigned>(i)); }
    
    int main ()
    {
        printf ("%i == %li\n", INT_MAX, bar (INT_MAX));
        printf ("%i == %li\n", INT_MIN, bar (INT_MIN));
    }
    ----
    
    Actual output:
    ----
    $ xlC -qwarn64 t.cpp
    "t.cpp", line 5.19: 1540-5329 (I) 64-bit portability : possible
    difference in results.  In 32-bit mode values greater than
    INT_MAX would be truncated, but not in 64-bit mode.
    $
    ----
    
    Expected output:
    ----
    $ xlC -qwarn64 t.cpp
    $
    ----
    

Local fix

Problem summary

  • This issue was resolved.
    

Problem conclusion

  • A defect in the code was fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IY70447

  • Reported component name

    XL C++ FOR AIX

  • Reported component ID

    5724I1100

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2005-04-18

  • Closed date

    2005-04-18

  • Last modified date

    2007-08-02

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

    IY67798

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

Fix information

  • Fixed component name

    XL C++ FOR AIX

  • Fixed component ID

    5724I1100

Applicable component levels

  • R700 PSN U812862

       UP07/08/02 I 1000

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0"}]

Document Information

Modified date:
02 October 2021