IBM Support

IV72030: CONTINUATION LINE IN COMMENT SECTION AFFECTING #LINE NUMBERS

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Error message line numbers are not matching the compiled code
    when preprocessing with the -C preserve comments option.
    
    The issue is triggered when a continuation line ( '\' ) is found
    in  the comment section.  The #line statements generated inside
    the comment section are correct, but after the comment section
    the line numbers for actual code are misaligned.
    
    
    
       === TEST CASE ===
    
    test.c, with error on line 9 'aaa bbb':
    
         1  /* \
         2
         3  \
         4
         5  \
         6
         7  \
         8  */
         9  aaa bbb;
        10  int main(void)
        11  {
        12   printf("Hello, world! \n");
        13   return 0;
        14  }
    
    when preprocessed with comments preserved (-E -C):
    
         1  #line 1 "test.c"
         2  /* \
         3
         4  #line 3
         5  \
         6
         7  #line 5
         8  \
         9
        10  #line 7
        11  \
        12  */
        13  aaa bbb;
        14  int main(void)
        15  {
        16   printf("Hello, world! \n");
        17   return 0;
        18  }
    
    compiling the preprocessed file gives the 'aaa bbb' error as
    being on line 12:
    
    "test.c", line 12.1: 1506-166 (S) Definition of function aaa
    requires parentheses.
    "test.c", line 12.5: 1506-276 (S) Syntax error: possible missing
    '{'?
    

Local fix

Problem summary

  • PROBLEM DESCRIPTION:
    Incorrect source code line numbers when compiling after
    preprocessing with the -C option.
    
    USERS AFFECTED:
    Users who preprocess code with the -C option.
    

Problem conclusion

  • Line number directives in preprocessed code comment sections
    have been removed.  The correct line numbers are now reported.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV72030

  • Reported component name

    XL C FOR AIX

  • Reported component ID

    5725C7100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-04-10

  • Closed date

    2015-04-10

  • Last modified date

    2015-04-10

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

    IV67892

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

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RC10 PSY

       



Document information

More support for: XL C for AIX
Compiler

Software version: 12.1

Reference #: IV72030

Modified date: 10 April 2015