I know this is not an avr-gcc specific question - I will now try to abuse the presence of C-knowledgeable experts here.
In a bigger project, I need to assign various *numbers* to different commands. The project involves several different devices and platforms, including AVR and PC, so these *numbers* get naturally defined in different source files. I want these *numbers* to be fixed, assigned manually, rather then generated, to prevent inadvertent shift of a whole range of *numbers*.
I would like to perform some sort of automatic cross-check for uniqueness of these *numbers*. For some reason (poor command of the language :oops: ) I assumed that enum will help me out of the problem... Of course I was wrong, as C99 in 18.104.22.168 says:
(The use of enumerators with = may produce enumeration constants with values that duplicate other values in the same enumeration.)
Any ideas of how to solve this problem?