c - What is the compiler warning option for catching array length mismatches? -
i did not dig enough on own, thank time , responses.
in actual code (proprietary embedded) header extern
's #ifdef
'ed , default not create them when .c
included .h
. when set option did produce warnings (errors actually) had wanted.
i have header with:
extern int array[10];
and source file with:
int array[2] = {0, 0};
clearly incorrect. how can cause compiler warn me? error acceptable well.
compilers of interest me gcc (old, 3.4.5) , tasking (not new, 2.3r3). note succeed @ not making error supplier code generation application apparently this. of course, getting application fixed important , can write script compare files, general compile time solution catch error in cases preferred.
Comments
Post a Comment