This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
inline functions
- From: KÃvesdi GyÃrgy <kgy at deverto dot hu>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 13 Jul 2007 12:46:38 +0200
- Subject: inline functions
Hi,
I have the following situation:
class first_class: public something
{
protected:
void f1(...) { ... }
...
};
class other_class: public first_class
{
public:
void f2(...) { f1(...); }
...
};
I found that the function other_class::f2() cannot be inlined, however, it
does nothing other than calling the function f1(). In the machine code there
is only a call and a return.
Trying to add __attribute__((inline)) the result is a warning message about
ignoring this attribute.
Why that function cannot be inlined?
Regards
Gyorgy Kovesdi