This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/83859] Please add new attribute which will establish relation between parameters for buffer and its size


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]