|
From: Per W. <pw...@ia...> - 2004-09-16 15:11:01
|
Scope isn't a problem. The compiler knows the scope the function was declared in and can declare variables and references based on that. However, pointer indirection is a problem. Virtual functions will require that the compiler is really sure about the type of the class for them to be inlined. What is inlined varies tremendously between different compilers and compiler versions. Some compilers can't handle specific language constructs when inlining. Some compilers can handle anything, but instead uses the expansion size to decide if the function should be inlined or not. /Per W On Thu, 16 Sep 2004, [ISO-8859-2] OROSZI Bal=E1zs wrote: > Hi! > > I have questions regarding inline functions. > What can be inlined? What makes a function un-inlineable? > And what kind of pre-processing does a compiler do to the body of an inli= ne function (like > removing the return statement, scopes, etc.)? > > For example: what happens if an inline function of a class calls another = class member, > like this will it be inlined? > > I'm just curious, because there can be things, which are valid inside the= class, but > because of inlining, the body gets "outside" of the class scope, which ma= kes a lot of > things different. > > Any thoughts? > > -- > Greetings, > Bal=E1zs > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |