64-bit enums and left shift operator - invalid code or GCC bug?
Eljay Love-Jensen
eljay@adobe.com
Fri Jun 27 12:05:00 GMT 2008
Hi Jens,
> Is this a GCC bug, or does the standard really require this conversion?
I'm not sure.
Does C99 now allow enum to be something other than (signed, unsigned) int?
(That'd make C99 more like C++ regarding enum sizes.)
Or does GCC have an extension which allows enum to be something other than
int-sized for C?
Do you need to specify -std=iso9899:1999 to get C99-isms? Or is that the C
default on your GCC?
Shouldn't you be using <inttypes.h> and have your printf be:
printf("%" PRIx64 " %" PRIx64 "\n", zip, qux);
(Not that I'm C99 savvy in the least, since I haven't really used C since
1990.)
Sincerely,
--Eljay
More information about the Gcc-help
mailing list