マルチスレッドプログラミング相談室 その3
■ このスレッドは過去ログ倉庫に格納されています
0264デフォルトの名無しさん
05/02/05 23:29:58VCについては知らんが、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'.
■ このスレッドは過去ログ倉庫に格納されています