Re: 64-bit enums and left shift operator - invalid code or GCC bug?

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

 



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


[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