[cfe-dev] -Warray-bounds seems over-zealous on Clang

Ted Kremenek kremenek at apple.com
Wed Jul 13 08:49:04 PDT 2011

On Jul 13, 2011, at 8:05 AM, David Blaikie wrote:

> So, options that seem to be being discussed include:
> 1) suppress this warning in all cases where the array is of length 1 and the last element in a struct
>   1.1) refinement: only when the length is specified explicitly and not via macro expansion, etc. (as John suggested)
>   1.2) refinement: under c99 recommend a fixup to use flexible arrays
> 2) split the warning in two, the second being the cases suppressed by the above option (probably less interesting if 1.1 is implemented)

(1) and (2) aren't mutually exclusive.  (2) is still useful when the heuristics implied by 1.1 and 1.2 aren't good enough.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110713/bf0abc77/attachment.html>

More information about the cfe-dev mailing list