This is the mail archive of the gcc-bugs@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]

[Bug c++/17499] New: long long constant broken


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


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