Open GoogleCodeExporter opened 9 years ago
Original comment by w...@google.com
on 14 Dec 2010 at 11:40
int64_t is not in the standard, too. It appears to be GCC-ism, thus requiring a
special case for GCC, lest other compilers choke on int64_t.
Also, I am not sure the type fix would be enough (please see this thread:
https://groups.google.com/d/topic/googletestframework/p2YSDK99wbQ/discussion).
Original comment by vladlosev
on 17 Dec 2010 at 7:43
You're right. int64_t are not in defined in ISO C++ 1998.
But int64_t is part of ISO C99 but it's optional (see section 7.18 of
http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf (it's only a draft; I
hope that it is correct)). I do not have access to the final release. I have no
clue why gcc is compiling the code even though int64_t is not part of ISO C++
1998.
With the new C++ standard there will be some relief but I understand that it's
not worth it for now.
Original comment by jens.k.mueller@gmail.com
on 4 Jan 2011 at 12:57
both int_least64_t and uint_least64_t are part of C99
imho, they would be good replacements for long long, considered that they
enable G++ to compile the code with -pedantic.
they are typedefs defined in cstdint/stdint.h; which likely only MSVC++ doesn't
support but there's preprocessing for this compiler.
See 7.18.1.1 Exact-width integer types, §3:
---
The following types are required:
int_least8_t uint_least8_t
int_least16_t uint_least_16_t
int_least32_t uint_least32_t
int_least64_t uint_least64_t
All other types of this form are optional.
---
see also Boost's cstdint:
http://www.boost.org/doc/libs/1_45_0/libs/integer/doc/html/boost_integer/cstdint
.html
Original comment by gregory....@gmail.com
on 8 Jan 2011 at 3:45
Original issue reported on code.google.com by
jens.k.mueller@gmail.com
on 22 Nov 2010 at 1:22Attachments: