Determines whether the compiler checks bounds for memory access through arrays that are declared without dimensions.
Linux: | -check-pointers-undimensioned -no-check-pointers-undimensioned |
macOS: | None |
Windows: | /Qcheck-pointers-undimensioned /Qcheck-pointers-undimensioned- |
None
-check-pointers-undimensioned or /Qcheck-pointers-undimensioned |
Bounds checking occurs for memory access through arrays that are declared without dimensions. This checking occurs for both dimensioned and undimensioned arrays. |
This option determines whether the compiler checks bounds for memory access through arrays that are declared without dimensions.
To use this option, you must also specify the [Q]check-pointers option.
The default setting, [Q]check-pointers-undimensioned, can cause link time errors for multiple definitions for non-standard code and it can cause linker warnings for undefined symbols when linking library code that has not been compiled with pointer checking enabled. In both of these cases, the symbols will contain the string cp_array_end.
If you do not want undimensioned arrays checked, you should specify -check pointers -no-check-pointers-undimensioned (Linux), or /Qcheck pointers /Qcheck-pointers-undimensioned- (Windows).
Note that even if you specify the negative form of the option, dimensioned arrays are always checked.
Visual Studio: Code Generation > Turn off Checking for Undimensioned Arrays
Eclipse: Code Generation > Turn off Checking for Undimensioned Arrays
Xcode: None
None