This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/83859] Please add new attribute which will establish relation between parameters for buffer and its size
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Feb 2018 07:13:35 +0000
- Subject: [Bug c/83859] Please add new attribute which will establish relation between parameters for buffer and its size
- Auto-submitted: auto-generated
- References: <bug-83859-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83859
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #7 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #4)
> On Mon, 15 Jan 2018, msebor at gcc dot gnu.org wrote:
>
> > 1) How to annotate constant size buffers. I'd like to be able to express that
> > a function requires a buffer of at least N elements without making N an
> > argument to the function. E.g., annotate the declaration 'void f (int[2])' to
> > let GCC understand that it requires an array of at least 2 ints.
>
> "void f (int[static 2])" means that; no GNU-specific syntax is needed.
For that to be useful, both bug 50584 and bug 67793 would have to be fixed