This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17499] New: long long constant broken
- From: "L dot Gregory at Surrey dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2004 10:55:05 -0000
- Subject: [Bug c++/17499] New: long long constant broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It seems that long long constants may be broken in gcc-3.3.4.
The following code fragment demonstrates the problem.
#include <stdint.h>
#include <iostream>
#include <stdio.h>
#include <stdint.h>
using namespace std ;
int main (void)
{
unsigned long long int tmp = 0x0008000000000000ULL;
cout << "\n value is " << hex << tmp << endl ;
}
This code is compiled simply with g++ tester.cc
gcc-3.3.4 gives the following warning:-
"integer constant is too large for its type".
and gives "value is 0" as its output.
gcc-3.3.3 gives no such warning and gives :
" value is 8000000000000" as its answer.
Forgive me If this is not a bug and an oversight on my part.
--
Summary: long long constant broken
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: L dot Gregory at Surrey dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17499