IBM Support

PH47104: MISSING LINE NUMBER AND ENDIF IN SOURCE LISTING

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When compiling certain C source modules there is a line number
    and endif missing in the resulting source listing.
    
    
    
    =====COMPILE COMMAND:
    
    /xlc -c source.c -DNS_AS400  -Wc,"AGGREGATE ARCHITECTURE(10)
    DLL EXPMAC EXPORTALL FLOAT(AFP(VOLATILE)),NOIGNERRNO INLINE
    NOLIBANSI LIST(surce.lst), LONGNAME
    MARGINS(1,80),OPTIMIZE(2),RENT NOROCONST NOROSTRING SHOWINC
    NOSEQUENCE SKIPSRC(HIDE),SOURCE SSCOM STRICT TUNE(10),XREF
    PHASEID"
    
    
    
    ===== TESTCASE:
    
    >cat source.c
    
    #define STRING "hello world"
    
    #include "ns_patch.h"
    #include <stdio.h>
    int hello () {
    
    printf ("%s\n", STRING);
    printf ("%s\n", "hello world");
    return 0;
    }
    
    
    
    
    >cat ns_patch.h
    #if defined(NS_AS400) || defined(NS_MVS)|| defined(NS_CICS)
    #     define wPtr2S(s,p) wI2S(s,NS_P2L(p))
    #       define wS2Ptr(s) NS_L2P(wS2I(s))
    # define NS_cdsNull 0
    #   define wDSRelease1(pDS)
    #     define wDSIncrUse1(pDS)
    #       define wGetHeapArrayCnt(ptr) 0
    # ifdef _NSTHINGS_H
    #           define THINGS_S2P(s) wS2Ptr(s)
    static NS_PTR THINGS_GET_VAR3P(NS_PTR thing, NS_PCHAR varName,
    NS_PTR vl
       NS_LONG vr)
    {
      NS_CHAR ret[256];
        return THINGS_S2P(szTHINGS_GET_VAR3(ret, thing, varName, vl,
    vr));
    }
    #               define szTHINGS_GET_VAR3D szTHINGS_GET_VAR3
    # endif
    #   if !defined(nsNO_THINGS_UPDATE_CTRLS)
    #             if defined(NS_AS400) || defined(NS_MVS)
    #                       define nsNO_THINGS_UPDATE_CTRLS
    #         endif
    #   endif
    #else
    #       define THINGS_S2P(s) s
    #endif
    
    
    
    
    ===== From Listing (snippet):
        21       |#         endif
        22       |#   endif
        23       |#else
        25       |
    
    =====
    Misssing endif and also the line number 24
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users compiling C source using compiler      *
    *                 options SOURCE(), SHOWINC and SKIPSRC(HIDE)  *
    ****************************************************************
    * PROBLEM DESCRIPTION: The source listing is missing the       *
    *                      last #endif directive from an included  *
    *                      header file.                            *
    ****************************************************************
    * RECOMMENDATION: Insall this PTF.                             *
    ****************************************************************
    When compiling a C source which includes
    a header file with conditional directives the listing is missing
    the last
    #endif in that header file when compiled with options SOURCE,
    SHOWINC and SKIPSRC(HIDE).
    

Problem conclusion

  • The C preprocessor did not properly keep track
    of #endif directives from an included header file.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH47104

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7C0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-06-09

  • Closed date

    2022-08-05

  • Last modified date

    2022-10-03

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

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

Modules/Macros

  • CCNECICS CCNECWI  CCNED240 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7C0 PSY UI81828

       UP22/09/07 P F209

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":"7C0","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
03 October 2022