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]

Re: long long constant


Hi Vincent,

Both long long, and long long numeric literals, are extensions.

A long long numeric literal requires the LL suffix. The compiler doesn't automagically promote "too big" numeric literals into long longs.

My recommendation is to rely upon the 5 year old C99 header file <stdint.h> (even in C++), and use their facilities.

#include <stdint.h>
static int64_t const rounder = INT64_C(0x0000400000004000);

HTH,
--Eljay


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