GCC 3.4 configuration on RedHat 9
I downloaded GCC 3.4 and compiled it on RedHat 9 using the preinstalled 3.2.2 compiler. I gave GCC no options or configuration parameters and built it in a separate build directory. The `make bootstrap-lean` worked fine as did `make install`, and the new compiler is in /usr/local/bin. I am now seeing an issue with the 64-bit built-in type, unsigned long long. Here is a program example:
#include <iostream>
using namespace std;
int main()
{
unsigned long long test = 0xFFFFFFFFFFFFFFFF;
cout << test << " Size of unsigned long long: " << sizeof(test) << endl;
return 0;
}
The 3.4.0 compiler complains:
size.cpp: In function `int main()`:
size.cpp:7: error: integer constant is too large for "long" type
The old 3.2.2 compiler compiles this just fine and it runs perfectly.
If I change the test definition to:
unsigned long long test = 0xFFFFFFFF;
then the 3.4.0 compiler will compile it. In the output, though, it still says that test has a size of 8, which is correct, but why doesn't it accept an 8 byte value?
....OK I just found my own answer, but I'm going to post this for others...
I made this change to the definition:
unsigned long long test = 0xFFFFFFFFFFFFFFFFULL;
// *LOL* - FULL! Apparently, I need the ULL at the end
|