Functions defined in header / cpp file behaves different
<p>File: A.h</p>

<pre><code>class A
{
public:
    struct x X;
    int show()
    {
        x.member_variable ? 0: -1;
    }
};
</code></pre>

<p>Now if A.cpp is complied which includes A.h (which is actually in a huge project space) we see that x.member_variable value is not as expected. But if remove the show() method and place it in A.cpp the code behaves fine - meaning that x.member_variable value is correct.</p>

<p>How such a thing may happen - one thing we saw from objdump is that if the function is defined in A.h the the method is treated as inline function which otherwise is not if defined in A.cpp?</p>

<p>How the code can behave differently altogether?</p>
