Does Cygwin's GCC support 64-bit constants?
Tue Mar 2 23:17:00 GMT 2004

Try adding 'L' to the end of the constant:


That tells the compiler that it's a long and not an integer.


-----Original Message-----
From: [] On
Behalf Of Nate Iverson
Sent: Tuesday, March 02, 2004 4:16 PM
Subject: Does Cygwin's GCC support 64-bit constants?

I'm getting the following warning message when I try to compile source
code that contains 0xFF00000000000000 as a constant.
warning: integer constant is too large for "long" type

Cywin's GCC appears to have 64-bit integer support since there are no
warnings/errors for uint64_t variables.

Below are the gcc details:
$ gcc -v
Reading specs from /bin/../lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld
--with-gnu-as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --libexecdir=/usr/sbin --mandir=/usr/share/man
--enable-languages=c,ada,c++,f77,pascal,java,objc --enable-libgcj
--enable-threads=posix --with-system-zlib --enable-nls
--without-included-gettext --enable-interpreter --enable-sjlj-exceptions
--disable-version-specific-runtime-libs --enable-shared
--disable-win32-registry --enable-java-gc=boehm
--disable-hash-synchronization --verbose --target=i686-pc-cygwin
--host=i686-pc-cygwin --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)

I have also tried to cast the constant (long long)0xFF00000000000000 --
it didn't change anything. Additionally, I have compiled this on Linux
and QNX with no issues.

Any insight is appreciated,

More information about the Gcc-help mailing list