We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm currently attempting to modify an automatic code generation package (designed to run with MSVC/C++, WATCOM C/C++ and Borland C) to autogenerate software compilable with the Keil CA166 package. Of the standard files which have to be included into the code, one of them contains the lines...
enum { COMPLEX_INHERITED = -1, COMPLEX_NO, COMPLEX_YES };
For instance if it is used in array subscripting, the negative value would be an error. A slight side-track here, as Jon has alrady pointed out that negative indices are not wrong per se. With C51, I have found that it will report errors on all lines containing any array reference if there is any error in any preceding line. Maybe Keil's handling of the subscript operator, [], is just particularly fragile?