Re: Help replacing ULL to eliminate pedantic error that ULL is C99

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

 



On Thu, 2007-04-05 at 09:21 -0500, John Love-Jensen wrote:
> Hi Stephen,
> 
> > 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?
> 
> Use the -Wno-long-long flag as well.
> 
> Also, perhaps, consider using/adapting C99's <stdint.h> facilities:
> 
> uint64_t i = UINT64_C(0x00ff000000000000);
> 
> HTH,
> --Eljay
> 

The idea of using/adapting C99 facilities still does not remove the
warning for the first three constant values. I am not sure using that
macro is the right idea. What removed the warning message was the flag
you suggested. Is my use of a 64-bit constant valid?

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