pragma auto_inline(off) incorrect operation?

  • Thread starter Thread starter Eero Pajarre
  • Start date Start date
E

Eero Pajarre

I just noticed that in .NET 2003 the pragma auto_inline does not
behave as I think it should. I am expecting it to disable automatic
function inlining when compiling on /Ob2 or similar optimisation.
Instead it also seems to disable all (?) function inlining.

I am pretty sure the VC++ 6.0 version did not behave like this.


Eero

(I know that the inline is unnecessary in my example, but I also tried
using it)


example:
-------------

#pragma auto_inline(off)

class test1{
int x_v;
public:
inline test1():x_v(0){}

inline int x()const{return x_v;}
};


int main(int argc, char* argv[])
{
test1 a;
return a.x();
}
--------------
 
I just noticed that in .NET 2003 the pragma auto_inline does not
behave as I think it should. I am expecting it to disable automatic
function inlining when compiling on /Ob2 or similar optimisation.
Instead it also seems to disable all (?) function inlining.

Given your example it would seem to be working contrary to the
documentation.

I'll try to point this out to MS.

Dave
 
Back
Top