- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My application must compile with GCC C++, MSVC C++, Intel C++ on both Linux and Windows.
I would prefer to settle on one means of specifying the types of various byte-sized integers, both signed and Unsigned (1, 2, 4, 8 bytes). The problem is that there appears to be no formal agreement as to how attain portability. While I do not mind having a header that includes the appropriate platform and compiler headers, I keep getting bitten by making the "new and improved" version where the header files change (location or name), and/or the compiler defined types change.
As to if they are __int8, int8_t, BYTE, ...
I really do not care, as long as there is a consistent way of doing this.
In particular, one cannot rely on int being 32-bits or 64-bits as well as long long being 64-bits.
Using Windows, VS 2010 with Parallel Studio 2011 __int64 highlights blue in both MS VC++ and Intel C++ but is not known in MS VC++. Which is odd, since MS "invented" the __int64 type. This intermittently works depending on the headers included.
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since VS 2010 Microsoft Visual C++ supplies the "stdint.h" header file, on linux platforms it comes with glibc for more than 10 years.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling with -std=c++0x
So I do not know if there are other issues.
On a related issue, Intel Parallel Studio XE 2011, on Linux, integrated with Eclipse highlights the
__int??
keywords in blue. Even when these are not typedef'd (due, presumably to missing header).
Is there a way to either impliment the __int?? keywords properly, or disable keyword highlighting for keywords not defined as keywords.
Jim

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page