#Array dim bugs
A general debugging question if I may: Suppose the sources of an NT C program
are split between 2 files. Suppose the 1st file declares a 1 dimensional
array:
int ary [10];
Suppose the 2nd file incorrectly references the array as 2 dimensional:
extern int ary [] [8];
This is clearly a bug, but neither the compiler nor the linker catch it. If
the array were declared in a .h file included by both .c files, the compiler
would catch it, but the extra include file isn't necessary for syntactically
correct C code, and without it the bug goes unreported, even at run time. Is
there a mechanism provided in the NT debugger for automatically identifying
such bugs?
— Mark
There is 1 Reply.