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 };
Of course C has no 'commands' but your example works fine in C51. If you place this enum in a simple foo.c within main(), does C166 still have problems? You are correct, enum's have type int so -1 is valid. I suspect code that preceded the enum is giving you problems. - Mark