This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problems with using identifier long long int in gcc++
- From: Maxim Areshkau <mareshkau at exadel dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 29 Nov 2007 18:01:23 +0200
- Subject: Problems with using identifier long long int in gcc++
- Authentication-results: mail.exadel.com from=mareshkau@exadel.com; sender-id=neutral; spf=neutral
l1: unsigned long long a;
l2: cout << sizeof(a) << endl;
l3: a = 1281474976710655;
l4: cout << a << endl;
When we trying to compile such code with gcc++, it's throw error that
the constant '1281474976710655' is too large for long long, it is only
2**48-1, when max number for unsigned long long is 2**64. This code
compiles normal when we use Microsoft compiler.
gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)