- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have Red Hat EL4 with gcc 3.4.4 and icc 9.0 installed on an x86_64 system.
The type definition for uint64_t is "unsigned long" for icc and "unsigned long long" for gcc. Is there a way of getting these to match via some options on either compiler? Is one more correct than the other?
Thanks.
Steve.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is an excerpt from a typical glibc stdint.h (glibc-2.3.3-118)
#if __WORDSIZE == 64
typedef unsigned long int uint64_t;
#else
__extension__
typedef unsigned long long int uint64_t;
#endif
My installations of icc 9.0 don't appear to be over-riding the definitions inherited from gcc. The claimed compatibility between icc and gcc requires they be the same. For icc on Windows, the "long long" has to be used for both 32- and 64-bit modes. In order for usage of stdint.h to be portable, you would have to be prepared for these variations.
#if __WORDSIZE == 64
typedef unsigned long int uint64_t;
#else
__extension__
typedef unsigned long long int uint64_t;
#endif
My installations of icc 9.0 don't appear to be over-riding the definitions inherited from gcc. The claimed compatibility between icc and gcc requires they be the same. For icc on Windows, the "long long" has to be used for both 32- and 64-bit modes. In order for usage of stdint.h to be portable, you would have to be prepared for these variations.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page