LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-27-2004, 10:34 AM   #1
rozeboom
LQ Newbie
 
Registered: Oct 2003
Distribution: CentOS5
Posts: 20

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to upgrade gcc on redhat 9 kira Linux - Software 0 12-28-2004 12:16 AM
gcc configuration subsystem frelihm Linux - Software 7 09-06-2004 03:54 AM
running software built with gcc 3.0.2 on Redhat 8 - gcc 3.2 dst1989 Linux - Software 3 03-08-2004 10:23 PM
gcc in Redhat 7.3 secprovider Red Hat 2 10-10-2003 06:42 AM
Is this true about Redhat and gcc? CodeWarrior Linux - General 33 04-21-2003 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration