[cfe-dev] naked attribute
rkotler at mips.com
Fri May 3 12:55:16 PDT 2013
My original main post was on the idea of not emitting implicit "return"
statements, and instead to emit implicit "unreachable".
However if the code contains an explicit "return", clang should honor that.
On 05/03/2013 10:51 AM, Anton Korobeynikov wrote:
> The original intent when the naked attribute to clang / llvm was added
> had been to make it work on all the platforms regardless whether gcc
> supports it or not.
> The main motivation is that in LLVM case everything is done in
> target-independent way.
> I really do not see a point of warning here, especially given that gcc
> side is largely undocumented.
> On Fri, May 3, 2013 at 9:30 PM, Rafael Espíndola
> <rafael.espindola at gmail.com> wrote:
>>> I agree. At least in the clang/llvm mode where we don't care about strict
>>> compatibility with gcc.
>>> For the serious embedded programmer, this is a life saver and helpful
>> OK, so what about:
>> * On targets where gcc supports this attribute, we support it too, no warnings.
>> * An targets where gcc doesn't support it, we get two options.
>> 1. Implement it and have a warning that this is a clang extension
>> 2. Don't implement it and warn about an ignored attribute (like gcc does).
>> If a target follows 1 or 2 is mostly dependent of llvm having
>> implemented the naked attribute on that target.
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
More information about the cfe-dev