https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016
--- Comment #18 from Bill Wendling <isanbard at gmail dot com> --- (In reply to qinzhao from comment #12) > (In reply to Bill Wendling from comment #10) > > The Clang implementation will probably have a prototype of something like: > > > > void __builtin_set_counted_by(void *, size_t) > > > > The 'void *' could be questionable, but I'm not sure how else to specify it > > (of course the compiler will do its magic internally to verify that it's a > > pointer to a FAM and has the 'counted_by' attribute, etc.). If we use 'void > > *', is it considered an error for the first parameter to NOT be a FAM? Or > > does the builtin silently become a no-op? > > my question, is it possible for CLANG to define this builtin as a language > extension as well? I'm not sure what the difference is with builtins, to be honest. I think of a language extension as something like 'attribute' or 'asm', which didn't show up in the original KNR, but were added later and then codified. If the only difference is that the builtin will be handled in the FE rather than the ME, then that's what I was planning on doing. So in that case, yes, it would be a "language extension."