Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__as_make_bounds

このセクションの内容:
構文
__as_make_bounds(ptr, number)
__as_make_bounds(ptr, base, bound)
パラメータ

ptr

境界を持たないポインタ。

number

要素の数。

base

ポイントされるオブジェクトの開始部分。

bound

ポイントされるオブジェクトの終了部分。

説明

この演算子を使用して、境界情報を持つポインタを作成します。最初の構文は、ptr から最大 ptr と size を合わせた分までの境界領ptrを作成します 2 番目の構文には明示的な境界があり、base 領域の最初の要素に対するポインタです。bound は、その領域より先に対するポインタです。それぞれの式が 1 度だけ評価される点を除いて、2 つのーパラメータの呼び出しは __as_make_bounds(ptr, ptr, ptr + size) と同等です。

/* Starting here, p points to a single element */
p = __as_make_bounds(p, 1);
/* Call fun with a pointer with the specified bounds */
fun(__as_make_bounds(q, start, end));