<div class="gmail_quote">On Thu, Jun 7, 2012 at 5:39 PM, Greg Fitzgerald <span dir="ltr"><<a href="mailto:gregf@codeaurora.org" target="_blank">gregf@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p>Hi!<u></u><u></u></p><p><u></u> <u></u></p><p>When clang is invoked with the ‘-fno-inline’ flag and the C function is prefixed by ‘__attribute__((always_inline))’, clang does not inline the function whereas GCC does.  GCC’s behavior seems more intuitive to me - that the file-level annotation should override the command-line flag.  Do you agree?  Can we make clang match gcc?</p>
</div></div></blockquote><div>Yes, I generally agree with GCC's interpretation here. Care to write a patch implementing this? I'm happy to review it.</div><div><br></div><div>For reference, the 'always_inline' attribute often has a semantic contract -- failing to inline it can produce wrong code, not just slow code, so it should trump almost everything else.</div>
</div>