424,996 Members | 884 Online Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

Inlined Function still a function call w.r.t. Sequence points?

 P: n/a Consider the following program: include class Bar { public: int getData9() { m_data = 9; return m_data;} int getData11() { m_data = 11; return m_data;} int m_data; }; int main() { Bar f; int a = f.getData11()  f.getData9(); std::cout<<"Answer: "<
3 Replies

 P: n/a On 22 Maj, 23:21, joe class Bar { public: * int getData9() * { *m_data = 9; *return m_data;} * int getData11() { *m_data = 11; return m_data;} * int m_data; }; int main() { * Bar f; * int a *= f.getData11()  f.getData9(); * std::cout<<"Answer: "<

 P: n/a On May 22, 4:21*pm, joe class Bar { public: * int getData9() * { *m_data = 9; *return m_data;} * int getData11() { *m_data = 11; return m_data;} * int m_data; }; int main() { * Bar f; * int a *= f.getData11()  f.getData9(); * std::cout<<"Answer: "<

 P: n/a Thanks for all the responses. That's what I believed. The assembler output produced is ... amusing bl _main li r12, 9 // Load value "9" into register 12 li r12, 11 // Load value "11" into register 12 ?? subf r12, r12, r12 // Subtract r12 by r12 and store in r12 - Joe Jun 27 '08 #4 