This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Help replacing ULL to eliminate pedantic error that ULL is C99
- From: Stephen Torri <storri at torri dot org>
- To: GCC List <gcc-help at gcc dot gnu dot org>
- Date: Thu, 05 Apr 2007 09:06:48 -0500
- Subject: Help replacing ULL to eliminate pedantic error that ULL is C99
I have a c++ program that has some 64-bit constants. How can I replace
ULL in my code so that I can tell g++ that the constants are 64-bits
long when I use the -ansi -pedantic flags?
inline void
Byte_Converter::convert (boost::uint64_t& input) {
boost::uint64_t output = (input << 56) |
((input << 40) & 0x00ff000000000000ULL) |
((input << 24) & 0x0000ff0000000000ULL) |
((input << 8) & 0x000000ff00000000ULL) |
((input >> 8) & 0x00000000ff000000ULL) |
((input >> 24) & 0x0000000000ff0000ULL) |
((input >> 40) & 0x000000000000ff00ULL) |
((input >> 56) & 0x00000000000000ffULL);
input = output;
}
Stephen