シナリオ:
struct
次のように、すべて宣言された一連のポインターと、restrict
これらのいくつかを引数として取る関数を保持する型があるとstruct
します。
struct bunch_of_ptr
{
double *restrict ptr00;
double *restrict ptr01;
...
double *restrict ptr19;
}
void evaluate(struct bunch_of_ptr input, struct bunch_of_ptr output)
{
// do some calculation on input and return results into output
}
http://www.oracle.com/technetwork/server-storage/solaris10/cc-restrict-139391.htmlによるとinput.ptrXX
、input.ptrYY
非エイリアスとして扱われます。
質問:
コンパイラはinput.ptrXX
andoutput.ptrYY
も非エイリアシングとして扱いますか?