See the simple example below. When a function returning one enum is assigned to a variable of a different enum I don\'t get any warning even with <
enum
An enum in C is basically handled like an integer. It's just a nicer way to use constants.
// this would work as well ftype = 1;
You can also specify the values:
enum color { RED=0,GREEN,BLUE } mycolor; mycolor = 1; // GREEN