[cfe-dev] Test suite additions request

Joerg Sonnenberger joerg at britannica.bec.de
Sun Sep 4 16:03:42 PDT 2011


On Sun, Sep 04, 2011 at 11:38:20PM +0100, Philip Ashmore wrote:
> Next I noticed that clang(++) doesn't support __attribute__((ms_abi)), 
> gcc's way of saying Pascal calling
> convention, in which the callee pops the stack - I think my code is 
> smaller and faster with it.

In general, the impact is relatively small. clang will accumulate stack
space used for arguments to a degree. You can use the fastcall attribute
for a very similar effect, if you really care.

> Next I noticed that clang doesn't understand "extern inline int fn() 
> __attribute((always_inline));",
> , followed by "extern inline int fn() { return 1; }" which means
> "never put this function in an object file, always expand".

extern inline is an old GCCism. Look up the C99 inline syntax for
getting the same effect.

Joerg



More information about the cfe-dev mailing list