------- Comment #11 from hp at gcc dot gnu dot org 2008-01-17 23:09 ------- (In reply to comment #9) > > Since this topic came up, I've seen various suggestions for how to guarantee > that a function gets inlined -- e.g., make it a varargs function, or include > an > empty asm statement.
I assume you're referring to the thread at <http://gcc.gnu.org/ml/gcc/2008-01/msg00165.html>? If it's elsewhere, I wouldn't count on it. > The obvious danger there (aside from the apparent lack of > clarity as to what constitutes inlining) is that such guarantees are not > explicit and so may go away the next time gcc developers get ambitious about > inlining. Exactly the point of that thread. The intent is to come to a consensus on the canonical mechanism, then document it and keep it working. It seems there's agreement; I'm just waiting for the issue to go cold with time for "everybody"'s voice to be heard before fixing the documentation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34563