[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays
Stephan Bergmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 28 23:43:29 PDT 2022
sberg added a comment.
In D126864#3614297 <https://reviews.llvm.org/D126864#3614297>, @MaskRay wrote:
> Oh, I did not see this when pushing a test efd90ffbfc427ad4c4675ac1fcae9d53cc7f1322 <https://reviews.llvm.org/rGefd90ffbfc427ad4c4675ac1fcae9d53cc7f1322> . Consider adding additional tests in `clang/test/CodeGen/bounds-checking-fam.c`.
see https://reviews.llvm.org/D128783 "Check for more -fsanitize=array-bounds regressions"
> It's worth bringing up such issue to the project. GCC and Clang have been working around them so far but they should eventually be fixed.
All the issues I encountered were in C++ code, and I'm not sure replacing one non-standard behavior (treating trailing length-one arrays as flexible) with another (C flexible array members) is something I feel confident to suggest to those projects.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits