Fixes are available
XL C for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 21 (January 2019 Update) for 12.1
XL C for AIX Fix Pack 21 (January 2019 Update) for 12.1
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:
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
Modified date:
13 September 2021