This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Inline limitation?
- To: egcs at cygnus dot com
- Subject: Inline limitation?
- From: Marco Manfai Yu <yumf at ultimatech dot com>
- Date: Mon, 17 Aug 1998 10:20:27 -0700
- cc: yumf at ultimatech dot com
- Reply-To: yumf at ultimatech dot com
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