Message-ID: <35F2E673.FE2FBBA1@inetlab.com> Date: Mon, 07 Sep 1998 01:45:55 +0600 From: Ilya Ryzhenkov Organization: iNetLab MIME-Version: 1.0 To: Nate Eldredge CC: djgpp workers list Subject: Re: Preventing compiler from expanding inline References: <35F1B0BD DOT 707A60C7 AT inetlab DOT com> <35F2BA6C DOT F2015C97 AT cartsys DOT com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Precedence: bulk Nate Eldredge wrote: > > Just a simple question - is there any method to prevent > > specific function from expanding inline ? > If you don't declare it `inline' and optimize with less than `-O3', > AFAIK, it won't be inlined. This one is subject to change by user of library - and lib must work... > No inline : > * Uses varargs. > * Has nested functions. Does it also apply to constructor - i.e. will something like Class::Class(){ void f(){} ... ... constructor code ... } do the magic ? > > I need it to prevent constructors of some classes from > > expanding inline. I need a real call instruction to them > > everywhere they are used. > You could define it outside the class, perhaps? IMHO it'll not help in some cases - i.e. simple enough constructor of base class defined in the same file before derived one will be likely inlined _in the body of derived class constructor_ Am I wrong ? ============================ Ilya P. Ryzhenkov aka Orangy iNetLab e-mail : orangy AT inetlab DOT com ICQ : 17942172