BugZero found this defect 75 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/6/2024
C/aC++ Software for HP-UX
C/aC++ Software for HP-UX, HPE PA C/aC++ Developers Bundle on Integrity (XPADE)
No fixed releases provided.
According to QXCR1001024405 documented in patch PHSS_41400( https://support.hpe.com/hpesc/public/docDisplay?docId=pdb_na-PHSS_41500 ) QXCR1001024405: Support has been added to the compiler for initialization of FAM (Flexible Array Member). However, when compiling program using FAM initialization with a C++ compiler fails with the error: "test.cpp", line 5: error #2070: incomplete type is not allowed char data[ ]; ^ 1 error detected in the compilation of "test.cpp". Sample Program -QXCR1001024405 compiled as C++ code -: # cat test.cpp#include "stdio.h"struct util_like_el_literal { int count; char data[];}; int main(){ printf("hello world\n"); return 0;} # aCC -VaCC: HP C/aC++ B3910B A.06.29 [Oct 18 2016]# aCC test.cpp"test.cpp", line 5: error #2070: incomplete type is not allowed char data[ ]; ^
Any HPE Integrity server running HP-UX 11.31 and the following: C.11.31.09 HP C/aC++ Developer's Bundle (Part Number B9007AA) PHSS_44485 aC++ Runtime (IA: A.06.28, PA: A.03.90)
aCC in any of HP-UX ansi C++ mode is expected to fail to compile FAM initialization. FAM initialization is not defined in any C++ standard definition up to C++23 draft. FAM initialization is defined in C99 standard, and works as expected compiling in ansiC mode (-AC99) For reference: P1039R0: I got you, FAM - Flexible Array Members for C++ (open-std.org) , proposed over C++ 2018 draft and had not been included to std C++ as C++23 HP-UX aC++ supports partially up to standard C++11 GNU C++ allows FAM initialisation As a workaround, due to GNU C++ allowing FAM initialization, and a partial GNU C++ dialect is available with HPUX ansi C/C++, using the option "-Ag++" compile C++ codes which may include FAM initialization, examples: # aCC +std=g++ test.cpp # aCC +std=++ +std=c++11 test.cpp Disclaimer: One or more of the links above will take you outside the HPE website. HPE is not responsible for content outside of its domain. RECEIVE PROACTIVE UPDATES : Receive support alerts (such as Customer Advisories), as well as updates on drivers, software, firmware, and customer replaceable components, proactively in your e-mail through HPE Support Alerts. Sign up for Support Alerts at the following URL: HPE Email Preference Center. NAVIGATION TIP: For hints on navigating HPE.com to locate the latest drivers, patches and other support software downloads, refer to the Navigation Tips document. SEARCH TIP: For hints on locating similar documents on HPE.com, refer to the Search Tips document.