These code snippets come from a Dhrystone test we are using to evaluate ARM MDK and some ARM devices. The program works well but I have run across a construct that I do not understand. I hope some of you experts can point out what I'm missing.
In a header file an enum- typedef enum {Ident_1,Ident_2,Ident_3,Ident_4} Enumeration;
In main() there is a declaration- Enumeration Func_1(); /* forward declaration since Enumeration may not be int */
I have looked in my 'C' books and googled enum and Enumeration but failed to find any construct examples such as this. Of course I found the normal 'day of the week' and 'color' examples in many locations.
I have no problems with the code. I just don't understand the constructs.
Any guidance would be appreciated. Bradford
I think I more clearly understand your question and the intent of the code. From The Standard:
"An implementation may delay the choice of which integer type until all enumeration constants have been seen."
So, my take on it is that "your" coders were trying to "forward declare" a range-limited enumeration that would allow an implementation to choose (and possibly narrow) the size of the enumerated type.