[cfe-dev] naked attribute

reed kotler rkotler at mips.com
Thu May 9 13:59:34 PDT 2013


On 05/09/2013 01:19 PM, Anton Korobeynikov wrote:
>> OK. I think we can all agree that producing an unreachable instead of
>> a ret for naked funcions is an improvement. I suggest we do that first
>> and then see which warnings, if any, should be produced.
> LGTM
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
I think we should only produce the unreachable in places where the 
compiler would implicitly insert a return.

If the user actually has a "return" or "return xxx", we should honor 
that; however it's not clear
what it would mean exactly.

If we don't intend to honor the explicit return, then we should print a 
warning and say what we are doing: i.e. turning it into unreachable, or 
ignoring it, or whatever it is that we are doing, or maybe make it an 
error to have an explicit return in a naked procedure.

We discussed this earlier but I just wanted to bring it up again.






More information about the cfe-dev mailing list