This is the mail archive of the gcc@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]

Inline limitation?


Hi,

    It seems that egcs 1.0.3a does not inline a function unless
it is defined before use. Can the creators of egcs confirm this?
For example, inline does not happen to the following code

inline void A (void);

int main(int, char**)
{
    A();
}

inline void A(void) {}

because A() is defined after its use in main(), even it is declared
inline. gcc 2.7.2.3 does the same thing. Sun's CC 4.2 inlines this
without a problem. I tried this on both Solaris and Linux/x86. Any
comments on why this is not done in egcs?

Marco Yu
yumf@ultimatech.com


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