dienbk7x / msinttypes

Automatically exported from code.google.com/p/msinttypes
0 stars 0 forks source link

Annoying compilation warnings #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. #include <boost/cstdint.hpp> from boost 1.45 before #include <stdint.h>

What is the expected output? What do you see instead?
I see the following warning for INTMAX_C and for UINTMAX_C
{{{
D:\include\stdint.h(241) : warning C4005: 'INTMAX_C' : macro redefinition 
d:\include\boost1-45-0\boost/cstdint.hpp(423) : see previous definition of 
'INTMAX_C'
}}}

What version of the product are you using? On what operating system?
I am using Microsoft Visual C++ 2008 Express on Windows 7 64bits

The fix is very easy :
{{{
in stdint.h line 239:
// 7.18.4.2 Macros for greatest-width integer constants
#ifndef INTMAX_C //   [
#   define INTMAX_C   INT64_C
#endif // INTMAX_C    ]
#ifndef UINTMAX_C //  [
#   define UINTMAX_C  UINT64_C
#endif // UINTMAX_C   ]
}}}

In attachment, a patch file with this modifications.
Best regards,
Nicolas.

Original issue reported on code.google.com by npap...@gmail.com on 1 Dec 2010 at 9:48

Attachments:

GoogleCodeExporter commented 9 years ago
Committed as r29. Thank you!

Original comment by alexander.chemeris on 24 May 2013 at 10:37