tag:blogger.com,1999:blog-8628867397165078694.post1094656175323253325..comments2022-11-14T21:29:22.609-08:00Comments on Musings on the life and times of the STLSoft libraries: LP64 and -Wshorten-64-to-32Matt Wilsonhttp://www.blogger.com/profile/08032564940029177259noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8628867397165078694.post-90169944331035410932009-08-28T04:01:59.803-07:002009-08-28T04:01:59.803-07:00You're behind the times. C specified enums as...You're behind the times. C specified enums as effectively synonyms of int, but C++ specifies enums as more or less having indeterminate size, except that they're sized large enough to fit all values of their possible constants. See also:<br /><br />http://david.tribble.com/text/cdiffs.htm#C99-enum-const<br /><br />If the problem you describe is occurring in code compiled as C++, that's a problem in the compiler, at least so long as size_t is the same type as unsigned int or unsigned long int (the smaller versions would also be fine, but their use seems unlikely for such these days; also, unsigned long long is technically non-standard and so doesn't actually fit). See 3.9.1 paragraphs 3 and 7 and 7.2 paragraph 5 of ISO C++ if you can get access to a copy anywhere.Jeff Waldenhttps://www.blogger.com/profile/11969143527962555101noreply@blogger.com