IBM Support

IZ53751: ISSUES WITH C++ STYLE COMMENTS AND C COMPILER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • New copyright information was added to some header files in
    V10.1 which included C++ style commenting. When the C compiler
    tries to compile these header files, it produces a compile time
    error message.
    
    ===== COMPILE COMMAND:
    cc_r -c -w test.c
    
    ===== TESTCASE:
    $cat test.c
    #include <demangle.h>
    
    int toto()
    {
    }
    
    
    ===== ACTUAL OUTPUT:
    $
    /.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101//aix/soluti
    on/latest/bin/cc_r -c -w test.c
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 1.1: 1506-046 (S) Syntax
    error.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 2.4: 1506-166 (S)
    Definition of function Licensed requires parentheses.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 10.49: 1506-189 (S)
    Floating-point constant .101.aix is not valid.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 10.59: 1506-260 (S)
    Octal integer constant 081009 is not valid.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 11.10: 1506-260 (S)
    Octal integer constant 08 is not valid.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 11.13: 1506-189 (S)
    Floating-point constant 1.14.1.12 is not valid.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 120.10: 1506-045 (S)
    Undeclared identifier False.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 120.21: 1506-045 (S)
    Undeclared identifier True.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 120.30: 1506-277 (S)
    Syntax error: possible missing ';' or ','?
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 610.5: 1506-166 (S)
    Definition of function Boolean requires parentheses.
    "/.../torolab.ibm.com/fs/projects/vabld/run/vacpp/101/aix/soluti
    on/090510/usr/include/demangle.h", line 610.13: 1506-276 (S)
    Syntax error: possible missing '{'?
    $
    
    ===== EXPECTED OUTPUT:
    Should not produce those error messages.
    

Local fix

  • You can use -qcpluscmt to have the C compiler accept C++ style
    comments as a workaround.
    

Problem summary

  • Any C (ie. 'cc', not 'c89') user who is
    trying to include our publically available demangle.h
    file will encounter this problem.
    
    A previous fix to the runtime
    replaced the existing C-style copyright with a newer
    copyright, which happened to use C++-style comments.
    

Problem conclusion

  • Reverted the comments back to C-style.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ53751

  • Reported component name

    XL C++ AIX

  • Reported component ID

    5724U8100

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-06-22

  • Closed date

    2009-07-31

  • Last modified date

    2009-08-27

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

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

    LI75061 LI75163

Fix information

  • Fixed component name

    XL C++ AIX

  • Fixed component ID

    5724U8100

Applicable component levels

[{"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":"A.1"}]

Document Information

Modified date:
04 October 2021