On Fri, 27 Nov 2009 12:50:19 +0300, bearophile <bearophileh...@lycos.com>
wrote:
Walter Bright:
Naked is not an externally visible attribute of a function, signature or
type, it only concerns the internals. Therefore, it shouldn't be an
attribute.
On the other hand I agree with them that currently "naked" is not in the
best place. So let's try another alternative:
void foo() {
@naked asm {
...
}
}
No, it applies @naked to an asm block, which is misleading: naked should
be applied to the whole function body. More like
void foo()
@naked body
{
// ...
}
But I still prefer @naked void foo();, especially since there was a
movement towards drop of body keyword (see My Body Is Ugly thread).
(To do that attributes have to be usable inside functions too).
Bye,
bearophile