[cfe-commits] [patch] Add the returns_twice attribute to know functions

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Oct 11 16:13:16 PDT 2011


> I see added risk and added incompatibility with GCC, but no added
> value. I'd prefer that this go in as a Decl-only attribute for now,
> and we can revisit making it a type attribute down the road if we see
> any benefits.

I wrote a small testcase to check what gcc does. Compiling it with gcc I 
get a warning

warning: ‘returns_twice’ attribute ignored

and if optimizations are enabled both h1 and h3 are tail called, so it 
looks like gcc uses this as an decl only attribute. I will try to 
implement that.

> - Doug

Cheers,
Rafael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111011/512a9646/attachment.c>


More information about the cfe-commits mailing list