Fixes are available
APAR status
Closed as program error.
Error description
The above test case tries to use %a, %A, %j, %t, %z printf format specifiers introduced by C99. XLC/C++ compilers work correctly - test case compiles and runs with expected output. However, during compilation, C/C++ gives out the following informational/warning messages when -qformat=all -qinfo=all is present: 1540-2839 (I) The platform does not support the use of a non-portable extension character 'j' in the format. This informational message is incorrect and unnecessary. ====TEST CASE: $cat xlc12_defect_format_conversion.c #include <stdio.h> #include <stdint.h> #include <stddef.h> signed main(void) { printf("%A\n", 10.5); printf("%a\n", 10.5); printf("%ju\n", (uintmax_t)1000000); printf("%td\n", (ptrdiff_t)1000000); printf("%zu\n", (size_t)1000000); return 0; } $ xlc -qlanglvl=extc1x -qinfo=all -qformat=all xlc12_defect_format_conversion.c $xlC -qsourcetype=c++ -qlanglvl=extended0x -qinfo=all -qformat=all xlc12_defect_format_conversion.c ====ACTUAL OUTPUT: "xlc12_defect_format_conversion.c", line 73.10: 1540-2839 (I) The platform does not support the use of a non-portable extension character 'A' in the format. "xlc12_defect_format_conversion.c", line 74.10: 1540-2839 (I) The platform does not support the use of a non-portable extension character 'a' in the format. "xlc12_defect_format_conversion.c", line 81.10: 1540-2839 (I) The platform does not support the use of a non-portable extension character 'j' in the format. "xlc12_defect_format_conversion.c", line 81.10: 1540-2845 (W) Invalid uintmax_t format for unsigned long long argument type in argument 2. "xlc12_defect_format_conversion.c", line 87.10: 1540-2839 (I) The platform does not support the use of a non-portable extension character 't' in the format. "xlc12_defect_format_conversion.c", line 93.10: 1540-2839 (I) The platform does not support the use of a non-portable extension character 'z' in the format. ====EXPECTED OUTPUT: None of these Informational Messages.
Local fix
N/A
Problem summary
PROBLEM DESCRIPTION: The compiler was issuing out-of-date informational messages for printf format specifiers that are now part of the C99 standard. USERS AFFECTED: Users of -qinfo=all -qformat=all looking for information about non-portable format specifiers
Problem conclusion
The messages have been updated to include C99 format specifiers Aatjuz
Temporary fix
Comments
APAR Information
APAR number
IV35873
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
2013-01-24
Closed date
2013-03-12
Last modified date
2013-03-13
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 U858497
UP C
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.