This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]