https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016
qinzhao at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |qinzhao at gcc dot gnu.org
--- Comment #3 from qinzhao at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #2)
> So, what would be the prototype of the builtin?
> Would it be type-generic for both arguments, i.e. effectively
> void __builtin_set_counted_by (...);
> which would just verify that 2 arguments are passed, the first one is some
> flexible array member with counted_by argument and the second argument has
> some type implicitly convertible to the type of the counted_by member?
Is the prototype of this builtin good enough:
void __builtin_set_counted_by (ptr->FAM, const_exp_with_int_type)
i.e, the first argument should be a FAM array reference (in which, ptr is a
pointer to the object that include the FAM), and the second argument is a
constant expression with integer type.