Thread: How to get gcc to produce 64 bit code? m64 option produces "sorry" message!!

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    9

    How to get gcc to produce 64 bit code? m64 option produces "sorry" message!!

    Hello programmers,

    I have a question about the options of gcc. I have a 64 bit processor with a fedora 64 bit running on it. Both int and long are 32 bit long and long long is 64. when I use the -m64 option that I found info about somewhere online, the gcc responds with: sorry, unimplemented: 64 bit mode not compiled in.

    What can I do to fix that?

    Thank you,

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    If you are running FC-64, gcc is producing 64-bit code, you don't need to use a switch.

    Int is still a 4 byte value. "64-bit" refers to the memory addressing. So the difference is in the sizeof() pointers. If you check, all your pointers are 8 bytes long, to hold a 64-bit address. 32-bit pointers are 4 bytes.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    9
    So I understand that gcc defines int to be 4 byte long on both 32 and 64 bit machines?

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 32 bit or 64 bit allignment ?! gcc options??
    By mynickmynick in forum C Programming
    Replies: 3
    Last Post: 07-29-2008, 02:43 AM
  2. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  3. compile c code using -00 option of gcc
    By George2 in forum Tech Board
    Replies: 1
    Last Post: 08-29-2006, 03:47 AM
  4. If the RGB color is (64, 64, 255), change it to (64, 255, 64).
    By Grayson_Peddie in forum C# Programming
    Replies: 2
    Last Post: 06-14-2003, 04:26 PM
  5. Replies: 1
    Last Post: 01-10-2003, 10:08 PM