[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 10:15:29 PDT 2022


MaskRay added a comment.

Sound good to land the current form (we have sufficient tests for Sema and -fsanitize=array-bounds now) and have `=3` as a separate discussion.



================
Comment at: clang/test/CodeGen/bounds-checking-fam.c:8
+// one-element array as the last emember of a structure as an alternative.
+// E.g. https://github.com/python/cpython/issues/94250
+// Suppress such errors with -fstrict-flex-arrays=0.
----------------
84301 is the official CPython bug number. 94250 has been marked as a duplicate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126864/new/

https://reviews.llvm.org/D126864



More information about the cfe-commits mailing list