IBM Support

PH36254: XLCLANG++ CANNOT APPLY __PTR32 QUALIFIER OVER TYPEDEF

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When compiling code with the xlclang++ invocation, the usage of
    a __ptr32 type qualifier on a typedef of a valid pointer type
    causes an unexpected compile error.
    
    
    
       === TEST CASE ===
    
    #include <stdlib.h>
    #include <stdio.h>
    typedef char * MYTYPE;
    struct myStruct {
      char * __ptr32 ex1;
      MYTYPE __ptr32 ex2;
    };
    
    int main(int argc, char* argv[])
    {
    
    return 0;
    }
    
    
    $ xlclang++ apar.cpp
    ./apar.cpp:6:10: error: '__ptr32' attribute only applies to
    pointer arguments
      MYTYPE __ptr32 ex2;
             ^
    1 error generated.
    Error while processing ./apar.cpp.
    CCN0793(I) Compilation failed for file ./apar.cpp.  Object file
    not created.
    $
    

Local fix

  • Do not use the qualifier on typedefs
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of the Z/OS V2R4M1 compiler            *
    ****************************************************************
    * PROBLEM DESCRIPTION: When compiling code with the xlclang++  *
    *                      invocation, the usage of                *
    *                      a __ptr32 type qualifier on a typedef   *
    *                      of a valid pointer type                 *
    *                      causes an unexpected compile error.     *
    ****************************************************************
    * RECOMMENDATION: Apply the PTF                                *
    ****************************************************************
    When compiling code with the xlclang++ invocation, the usage of
    a __ptr32 type qualifier on a typedef of a valid pointer type
    causes an unexpected compile error.
    

Problem conclusion

  • Apply the PTF
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH36254

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7C1

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-04-13

  • Closed date

    2021-10-13

  • Last modified date

    2021-11-01

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

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

    UI77566

Modules/Macros

  • CLCECL   CLCECWI  CLCED241 CLCEDWRT CLCEFILT CLCEOPTP CLCETBY
    CLCIVPSH CLCJHOPT CLCJHOPX CLCJOPT  CLCJOPX  CLCMSGE  CLCMSGT
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C1 PSY UI77566

       UP21/10/27 P F110

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

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

Document Information

Modified date:
02 November 2021