This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]