[cfe-dev] no warning for arrays that are too short?
Richard Smith
richard at metafoo.co.uk
Wed Dec 5 18:15:42 PST 2012
On Wed, Dec 5, 2012 at 6:07 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> If you want checking of array parameter bounds, you have to say "double
> arg[static 4]".
>
Given that that's a C-only feature, it wouldn't seem unreasonable to also
provide a warning for the non-static case (for use in C++). You can use
'const double (&arg)[4]' in C++, but that doesn't allow arrays larger than
4 elements.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121205/773abaad/attachment.html>
More information about the cfe-dev
mailing list