IBM Support

PH62540: __GRP NAME COLLISION BETWEEN GRP.H AND LOCALE

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A compile-time error is seen when including header files <grp.h>
    and <locale>.
      === TEST CASE ===
    #include <grp.h>
    #include <locale>
    int main() { return 0; }
    
    $ ibm-clang++ t.C
    In file included from t.C:2:
    include/c++/v1/locale:2328:15: error: expected ')'
    2328 |       string& __grp,
         |               ^
    util/usr/include/grp.h:5:34: note: expanded from macro '__grp'
       5 |                    #define __grp 1
         |                                  ^
    include/c++/v1/locale:2322:28: note: to match this '('
    2322 |   static void __gather_info(
         |
    ...                            ^
    

Local fix

  • Switch the order of the header files:
    
    #include <locale>
    #include <grp.h>
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: C++ users including system header, grp.h     *
    *                 before the locale system header. For         *
    *                 example:                                     *
    *                 #include <grp.h>                             *
    *                 #include                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: Compiler issues the following error     *
    *                      due to __grp macro collision:           *
    *                      include/c++/v1/locale:2724:56: error:   *
    *                      expected ')'                            *
    *                      char_type& __ts, string& __grp,         *
    ****************************************************************
    * RECOMMENDATION: Apply the PTF                                *
    ****************************************************************
    Macro __grp in <grp.h> collides with template parameter name
    used in .
    

Problem conclusion

  • System headers should be fixed to prevent name collision as
    reported.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH62540

  • Reported component name

    ANSI C++ CLASS

  • Reported component ID

    568819807

  • Reported release

    7D0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2024-07-30

  • Closed date

    2024-07-31

  • Last modified date

    2024-10-03

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

    PH62537

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

    UI97856

Modules/Macros

  • CELQDEST CRTDHCXA CRTDHCXE CRTDHCXG CRTDHCXH CRTDHCXP CRTDHCXS
    CRTDHUNW CRTDNCXA CRTDNCXE CRTDNCXH CRTDNCXP CRTDNUNW CRTDOCXA
    CRTDQCXA CRTDQCXE CRTDQCXG CRTDQCXH CRTDQCXP CRTDQCXS CRTDQUNW
    CRTDQXLA CRTEHCXA CRTEHCXE CRTEHCXG CRTEHCXH CRTEHCXP CRTEHCXS
    CRTEHUNW CRTENCXA CRTENCXE CRTENCXH CRTENCXP CRTENUNW CRTEOCXA
    CRTEQCXA CRTEQCXE CRTEQCXG CRTEQCXH CRTEQCXP CRTEQCXS CRTEQUNW
    CRTEQXLA EDCHDEST
    

Fix information

  • Fixed component name

    ANSI C++ CLASS

  • Fixed component ID

    568819807

Applicable component levels

  • R7D0 PSY UI97856

       UP24/09/20 P F409

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.

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

Document Information

Modified date:
03 October 2024