>>262
VCについては知らんが、gccだとpureアトリビュートってのを
関数に宣言してやると、そういう動作をするな。

以下、Infoより引用。
---
`pure'
Many functions have no effects except the return value and their
return value depends only on the parameters and/or global
variables. Such a function can be subject to common subexpression
elimination and loop optimization just as an arithmetic operator
would be. These functions should be declared with the attribute
`pure'.