IBM Support

IV85223: PREVIOUS MACRO SUBSTITUTION AND CONCATENATION PREVENTING STRINGIFICATION

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • After a series of macro substitutions and a ## concatenation,
    the C preprocessor is expected to 'stringify' a macro result,
    but isn't able to resolve the stringification's usage of a
    macro itself.
    
    The issue only occurs when 2 substitutions are used in the
    original macro.
    
    
    
       === TEST CASE ===
    
    #define macx x
    #define macy y
    #define xy ok
    
    #define mac(_x,_y)  mac1(_x,_y)
    #define mac1(_x,_y) mac2(_x##_y)
    #define mac2(_xy)   mac3(_xy)
    #define mac3(_xy)   #_xy
    
    int main()
    {
      char *cp=mac(macx,macy);
    }
    
    
    
    $ xlc -E test.c
    #line 10 "test.c"
    int main()
    {
            char *cp="xy";
    }
    $
    

Local fix

Problem summary

  • USERS AFFECTED:
    Users trying to do a series of macro substitutions and a ##
    concatenation maybe affected by this issue.
    
    PROBLEM DESCRIPTION:
    Preprocessor failed a substitution and generated wrong output.
    

Problem conclusion

  • The preprocessor has been fixed to handle this case.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV85223

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-05-27

  • Closed date

    2016-08-15

  • Last modified date

    2016-08-15

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

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

    IV85627

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RD10 PSY

       UP



Document information

More support for: XL C for AIX
Compiler

Software version: 13.1

Reference #: IV85223

Modified date: 15 August 2016