This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Problems with inline functions
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Problems with inline functions
- From: George Anzinger <george at pioneer dot net>
- Date: Mon, 28 Aug 2000 18:28:15 -0700
- Organization: Monta Vista Software
In the Linux kernel, more and more inline functions are appearing in the
header files. This is causing ordering problems as the compiler tries
to compile these before the needed declarations are available. Adding
to this problem is that the body of header files is often actually
included in the source after the body of the including file (because the
file may have been included by an earlier file in the include reference
chain).
It is hard to call this a bug, as the compiler is most likely doing what
is being requested, however, I think it would be nice to defer compiling
inline functions until they are actually used in normal code. This
would make writing header files that have inline functions MUCH easier
to manage.
Comments?
George