Does GCC assign any type to enums that can be specified in an assignment operator?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Microsoft compiler treats enums as int types (or some type) for purpose
of assignment, but GCC does not. Best I can figure, GCC treats an enum value
assignment as ambiguous when presented with more than one integral
assignment operator. Is there a type I can define an assignment operator for
which will take precedence for enum values? 

If not it woud appear the only alternative is to manually typecast every
instance of an enum value, or create a special assignment operator
explicitly for enums (not with the = operator)

Either way that would be a ton of work for me. Any ideas? 
-- 
View this message in context: http://www.nabble.com/Does-GCC-assign-any-type-to-enums-that-can-be-specified-in-an-assignment-operator--tf3967638.html#a11262160
Sent from the gcc - Help mailing list archive at Nabble.com.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux