redeclaration of enumerator
- by robUK
Hello,
gcc 4.1.2 c99
I have the following enum's in this file ccsmd.h :
enum options_e
{
acm = 0,
anm,
smd,
OPTIONS_LAST_ENTRY,
OPTIONS_ENTRY_COUNT = OPTIONS_LAST_ENTRY
};
enum function_mode_e
{
play = 0,
record,
bridge,
MODE_LAST_ENTRY,
MODE_ENTRY_COUNT = MODE_LAST_ENTRY
};
error: redeclaration of enumerator ‘LAST_ENTRY’
error: previous definition of ‘LAST_ENTRY’ was here
error: redeclaration of enumerator ‘ENTRY_COUNT’
error: previous definition of ‘ENTRY_COUNT’ was here
I have the LAST_ENTRY so that I can use that as the index of an array. So I like to keep it the same across all enums.
Many thanks for any advice,