https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016

--- Comment #19 from Bill Wendling <isanbard at gmail dot com> ---
(In reply to Siddhesh Poyarekar from comment #13)
> (In reply to qinzhao from comment #11)
> > After the discussion with Kees on the major usage of this new builtin, I
> > think that the above Category A might be a natural fit for this new
> > __builtin_set_counted_by. i.e, a C language extension (RID_BUILTIN). 
> > 
> > We could define the new __builtin_set_counted_by as
> > 
> > void __builtin_set_counted_by (FAM_exp, count_exp)
> > 
> > The FAM_exp expression must be a flexible array member reference. The second
> 
> Does it have to be a FAM?  What is the problem if this is used on, e.g. an
> arbitrary pointer?
> 

IMO once we have support for 'counted_by' on pointers the builtin should handle
it. In that case, a 'void *', or equivalent, seems like the better option for
future expansion.

Reply via email to