bounds

Date:

01-09-2012

NAME

bounds, nobounds - Specifies that pointer and array references are to be checked or not checked

SYNOPSIS

#pragma _CRI bounds
#pragma _CRI nobounds
!DIR$ BOUNDS [ array [, array ] ... ]
!DIR$ NOBOUNDS [ array [, array ] ... ]
array

The name of an array. The name cannot be a subobject of a derived type. When no array name is specified, the directive applies to all arrays.

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

The bounds directive specifies that pointer and array references are to be checked. The nobounds directive specifies that this checking is to be disabled.

When bounds checking is in effect, pointer references are checked to ensure that they are neither 0 nor greater than the machine memory limit. Array references are checked to ensure that the array subscript is not less than 0 or greater than or equal to the declared size of the array.

Both directives may be used only within function bodies. They apply until the end of the function body or until another bounds/nobounds directive appears. They ignore block boundaries.

These directives have the following format:

#pragma _CRI bounds
#pragma _CRI nobounds

The following example illustrates the use of the bounds directive:

int a[30];
#pragma _CRI bounds
void f(void)
{
   int x;
   x = a[30];
   .
   .
   .
}

SEE ALSO

intro_directives(7)