Help replacing ULL to eliminate pedantic error that ULL is C99

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux