Hello. I have a project that links to a library I created using the C51 toolset. If I build it using BL51, everything's cool. If I build it with Lx51, I get warnings like this:
*** WARNING L25: DATA TYPES DIFFERENT SYMBOL: _FnName MODULE: .\main.obj (MAIN)
OK, I have solved the original problem. Certain compilers (which shall remain nameless, but are not Keil competitors because they serve a different target market) require that external array references include the size of the array in them (!), e.g.:
extern OStypeEcb OSecbArea[5];
extern OStypeEcb OSecbArea[];
extern type ArrayName[];
Does this compiler do array bounds checking? I s'pose that might be a reason for it to want the size
If my compiler did array bounds checking, I would shoot it! I use negative array indexing all the time for useful kinds of stuff. Jon
Andrew asked "Does this compiler do array bounds checking?" Probably. Our arrays in question are arrays of struct, and all access is through pointers. Does the ANSI C standard say anything about this issue (how to declare extern arrays)?