https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127311
--- Comment #5 from Feiyang Huang <220255623 at seu dot edu.cn> --- (In reply to Jakub Jelinek from comment #4) > Well, C++ doesn't have flexible array members at all (it is only a GNU > extension), so using -fstrict-flex-arrays=3 for C++ doesn't make much sense, > standard C++ code has to use workarounds for it (or not the trailing array > idioms at all). Thanks. I understand that C++ has no standard flexible array members and that the testcase relies on the GNU extension. The report was based on the manual saying "-fstrict-flex-arrays ... (C and C++ only)" and on GCC accepting the trailing-array extension in C++. If the option is intentionally not meaningful for C++, should the C++ wording in the manual be clarified, or is this behavior considered expected for the GNU extension? The observed C/C++ object-size and diagnostic divergence is still reproducible on all tested GCC versions.
