Slashdot Mirror


GCC 3.1 Released

gergnz writes "Just popped into my inbox, GCC 3.1 released. There are many bug fixes over 3.0. "we focused more on quality than new features" Mark Michell. Here are the changes, and you can see a list of ftp servers here. This is the release I have been waiting for. I will now upgrade :-) Well Done to all involved!"

56 comments

  1. 3.1? by ObviousGuy · · Score: 4, Funny

    Windows was at that level 8 years ago! Even VC++ is up to 7.0 now. Sheesh! Faster development with fewer bugs, my ass.

    Seriously, though. Hopefully this takes care of all those niggling bugs that made 3.0 unusable. Maybe this will encourage everyone to jump from the 2.x tree finally.

    --
    I have been pwned because my /. password was too easy to guess.
    1. Re:3.1? by BigDaddy · · Score: 1

      They could just do what Patrick at Slackware did and jump three or so version numbers in a single release.

      --
      You can't get a blue screen on a black and white monitor.
    2. Re:3.1? by elflord · · Score: 2
      Seriously, though. Hopefully this takes care of all those niggling bugs that made 3.0 unusable. Maybe this will encourage everyone to jump from the 2.x tree finally.

      I think it has, and I think it will. There are a lot of very important bugfixes in this release, especially with respect to the C++ ABI. My bet is that this is going to be a distribution compiler.

    3. Re:3.1? by jmv · · Score: 2

      I have a complex (it uses lots of features) C++ program which compiled fine (after a couple tweeks) under 2.95.x and 2.96 but would crash when compiled with 3.0.x. I used to think it was my fault but it now works again with 3.1 so I guess 3.0.x was badly broken...

    4. Re:3.1? by Anonymous Coward · · Score: 0

      I'LL BYTE :) Imagine Linus Torvalds coding the Linux Kernel if he had you reasoning we would have no Linux! If you have some better ways to code then offer you time and code for GCC Project. Microsft C++ sucks its full of extensions that break code when porting. I hope you do not advocate that MFC ATL is better then GCC. Either code and submit your code to the maintainer like Linux Kernel Hackers do or do not complain when xyz is not included in version GCC.

    5. Re:3.1? by jdennett · · Score: 1

      It might be your fault, and it's just that neither 2.9x nor 3.1 shows up the bug. Or it might, as you say, have been a bug in 3.0.x. Without seeing the code, I can't say.

    6. Re:3.1? by mickwd · · Score: 2

      Mandrake's development release (Cooker) is already being built with GCC 3.1.

  2. GCC (any version) in a nutshell by Anonymous Coward · · Score: 0, Troll

    Pros:
    -Runs on everything

    Cons:
    -Slow
    -Generates slow code

    1. Re:GCC (any version) in a nutshell by morbid · · Score: 1, Interesting

      How did you get to be +1 Informative with a troll of this kind? GCC's code generator has improved in leaps and bounds recently. It may not generate the fastest code on all platforms, but it generates reliable code that is good enough. If you really are interested in performance, a little bit of profiling and clever coding goes a long way.

      --
      I'm out of my tree just now but please feel free to leave a banana.
    2. Re:GCC (any version) in a nutshell by Anonymous Coward · · Score: 0

      If anything, i think your message should be modded -1 just for its sheer noise.

      If you can't critize something, then its considered biased propaganda. Not all negative comments are trolls.

    3. Re:GCC (any version) in a nutshell by Anonymous Coward · · Score: 0

      Then surely he can criticize the original comment!

      Principles that only work when you want them to aren't very good principles.

    4. Re:GCC (any version) in a nutshell by L.+J.+Beauregard · · Score: 2, Interesting
      It seems that GCC generates rather simple-minded code and relies on the optimizer to make it fast. I've never had a GCC-compiled program that was not significantly faster when compiled with -O2.

      And if -O2 is not enough, well, that's what gprof and inline assembly is for. GCC's inline assembly feature is unmatched by any compiler I've ever seen (though Borland's register pseudovariable feature comes in handy if used carefully).

      --
      Ooh, moderator points! Five more idjits go to Minus One Hell!
      Delendae sunt RIAA, MPAA et Windoze
    5. Re:GCC (any version) in a nutshell by Bert64 · · Score: 1

      "good enough" - just like windows, just good enough to prevent a mass exodus from the platform, but not good enough that you wont want the next version. Since when has inefficient code been "good enough" ? shouldn`t we be trying to get the best possible performance from existing hardware... not everyone can afford a faster machine every month.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    6. Re:GCC (any version) in a nutshell by morbid · · Score: 0

      Yes, that's one of the reasons I am writing a cross-platform performance library in assembler:
      libsimd.sourceforge.net

      I agree. We should always be trying to improve. Don't forget that gcc is not a commercial product. It is Free Software. It's quite remarkable that it's as good as it is. It is unsurpassed for portability and generates reasonably good code on the most common platforms. Remember that it's not an x86-only compilier. If it were I'm sure its optimisations on that platform would be much better, and they could concentrate on specific optimisations for all the x86 variants, which differ markedly in thier capabilities.

      --
      I'm out of my tree just now but please feel free to leave a banana.
  3. Most Notable Improvements by Sentry21 · · Score: 4, Informative

    Here's a short run-down of the improvements that really caught my eye this time around.

    • Better PPC support (64-bit PowerPC GNU/Linux support in the backend, and altivec support with -maltivec)
    • UltraSPARC 64 fully supported
    • AMD x86-64 support
    • SSE/SSE2/3DNow!/MMX instructions and command-line flags to enable. No C++ compatible intrics for SSE2
    • New ports for MMIX, CRIS, and SuperH
    • Code profiling

    Everyone knows I'm no fan of the GNU project, but GCC3.1 shows that they have a lot going for them. Very exciting guys, I can't wait to see what 3.2 has in store.

    --Dan

    1. Re:Most Notable Improvements by argel · · Score: 2, Funny
      UltraSPARC 64 fully supported
      I can't wait to see what 3.2 has in store.

      Probably stable UltraSPARC 64 support! ;-)

      --

      -- Argel
  4. When.. by hackwrench · · Score: 2, Interesting

    will it be available in Cygwin...

    1. Re:When.. by takusi · · Score: 0

      Not yet. The latest gcc in cygwin is 2.95.3-5.

      --
      rm /bin/laden
    2. Re:When.. by Anonymous Coward · · Score: 1, Informative

      Try bulding it from sources.

  5. Anybody tried it yet? by qeL3-i · · Score: 1

    Has anybody tried using it yet? I don't want to be the first kid on the block to give it a go...

    1. Re:Anybody tried it yet? by morbid · · Score: 0

      I'm building it make -j 3 bootstrap on my Ultra 60 using Solaris 9. It's been going for ages and hasn't broken yet. I've currently got gcc-2.95.3 installed. I also set it building on my humble K6-2 500 under Linux at home this morning.

      --
      I'm out of my tree just now but please feel free to leave a banana.
  6. Trouble by 4of12 · · Score: 3, Interesting

    [Well, I won't dwell on my rejected submission for this.]

    But my attempt to build gcc 3.1 on sparc-sun-solaris2.8 gave me this problem:

    echo timestamp > s-check
    stage1/xgcc -Bstage1/
    -B/usr/local/sparc-sun-solaris2.8/bin/ -c
    -DIN_GCC -g -O2 -W -Wall -Wwrite-strings
    -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
    -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc-3.1/gcc
    -I../../gcc-3.1/gcc/. -I../../gcc-3.1/gcc/config
    -I../../gcc-3.1/gcc/../include ../../gcc-3.1/gcc/p rint-rtl.c -o print-rtl.o
    In file included from
    ../../gcc-3.1/gcc/print-rtl.c:30:
    ../../gcc-3.1/gcc/tree.h:3183: stray '\273' in program
    ../../gcc-3.1/gcc/tree.h:3183: stray '\224' in program
    ../../gcc-3.1/gcc/tree.h:3183: stray '\315' in program
    ../../gcc-3.1/gcc/tree.h:3183: stray '\352' in program
    ../../gcc-3.1/gcc/tree.h:3183: stray '\274' in program
    ../../gcc-3.1/gcc/tree.h:3183: parse error before '&' token
    ../../gcc-3.1/gcc/tree.h:3183: stray '\246' in program
    ../../gcc-3.1/gcc/tree.h:3183: stray '\21' in program
    .
    .
    .
    [This went on for some while.]

    Any ideas?

    --
    "Provided by the management for your protection."
    1. Re:Trouble by Anonymous Coward · · Score: 0

      Hmm, that didn't happen to me on my x86 Red Hat 7.1 box. tree.h is the same for all platforms, so it shouldn't have caused a problem for you either. Also, that source line (3183) is actually one greater than the number of lines in tree.h. It looks like extra junk was somehow appended to the end of your tree.h file, maybe due to a corrupted archive, an incorrect archive extraction, or a corrupted filesystem.

    2. Re:Trouble by morbid · · Score: 1, Informative

      Are you running on x86 or SPARC?
      I've built various versions of gcc-3.0.x and 3.1-xxxxx on SPARC and intel multiprocessor boxen on Solaris 8 and 9.
      What C compiler are you using to start the bootstrap build?

      I have the Freeware Companion CD installed, so am using gcc-2.95.3.

      Here is my configure line:

      ../gcc-3.1/configure --prefix=/area51/trial/install/gcc-3.1 --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --without-gnu-ld --without-gnu-as --enable-shared

      --
      I'm out of my tree just now but please feel free to leave a banana.
    3. Re:Trouble by morbid · · Score: 0

      Just kicked off a build on my S8 E450 now...
      ...I'll let you know how it turns out.

      --
      I'm out of my tree just now but please feel free to leave a banana.
    4. Re:Trouble by 4of12 · · Score: 2

      This is SPARC (v9).

      Solaris 8.

      My first attempt failed, using gcc 3.0.4 to do the bootstrap build.

      My second attempt failed, using Suns WS 6u2.

      Thanks for the configure line. I'll also try extracting on a different filesystem as another poster suggested, since the symptoms look suspicious.

      --
      "Provided by the management for your protection."
    5. Re:Trouble by morbid · · Score: 0

      Did you try another tarball? Did it work?
      My E450 Solaris 8 build and 4-way PIII Xeon Solaris 8 build both worked fine with the same ./configure options and gmake -j 5 bootstrap.

      --
      I'm out of my tree just now but please feel free to leave a banana.
  7. Does it compile KDE? by JahToasted · · Score: 2, Interesting
    How is the C++ support now? I've been sticking with 2.95.x since 3.0 wasn't able to compile kde (i think it was the sound system it couldn't compile although I could be wrong). There was nothing wrong with the KDE code it was a problem with gcc3. So any word on whether c++ has been fixed? does the linker work properly or do we still have to use objprelink?

    I remember being optimistic about 3.0 only to be disapointed that it wouldn't compile kde.

    1. Re:Does it compile KDE? by Anonymous Coward · · Score: 2, Informative

      Yes, some of the KDE developers are already using GCC 3.1. It compiles and runs KDE without problems.

    2. Re:Does it compile KDE? by tzanger · · Score: 2

      How is the C++ support now? I've been sticking with 2.95.x since 3.0 wasn't able to compile kde (i think it was the sound system it couldn't compile although I could be wrong).

      I think you're very wrong -- I have compiled KDE3 from CVS with GCC3.0 many times without a problem.

  8. Re:Most Notable Improvements - export? by jungd · · Score: 2, Interesting

    Does it implement export yet?
    I doubt it.

    --
    /..sig file not found - permission denied.
  9. Re:Anybody tried it yet? - Yes successfully by morbid · · Score: 0

    FYI I've just had my make bootstrap complete successfully on my Ultra 60 running Solaris 9, with the companion CD installed using gcc-2.95.3

    --
    I'm out of my tree just now but please feel free to leave a banana.
  10. Re:Most Notable Improvements - export? by jdennett · · Score: 3, Informative

    Nope, the only compilers which are close to having export are the EDG-based ones. Comeau might be on sale in release (rather than beta) form this month. No released compiler has export just yet, but some are real close now. (http://www.edg.com/ or http://www.comeaucomputing.com/ for some more details if you care.)

  11. Re:Most Notable Improvements- Ada 95 by Ada95 · · Score: 1

    Those are all important improvements but surely the most important change is the inclusion of the GNU Ada 95 compiler (GNAT) in the GNU Compiler Collection. Try it! Be cool. Be leading edge. Be smart. Be productive.

  12. Sigh by devphil · · Score: 2


    Yes, GCC 3.1 compiles KDE 3.0 just fine, according to initial prerelease reports. However...

    So any word on whether c++ has been fixed?

    "C++" as you call it, was doing pretty well. Most of the problem was that the KDE library folks expected to be able to break the ODR and have GNU ld magically fix it for them. (Even open source projects have to follow the rules of the programming language in use, sorry...)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
    1. Re:Sigh by Anonymous Coward · · Score: 0

      Stupid question, sorry - what's the ODR ?

      rather, tell me where to look for it myself? I remember a bit about the C++ issue, resolving symbols, slow startup times, etc. I'm just unfamiliar with the "ODR" acronym.

      Yes, I'm a long-time C and not-so-C++ kinda guy.

    2. Re:Sigh by devphil · · Score: 3, Informative


      ODR is One Definition Rule. It's the clause of the ISO C++ Standard (that's where you'd go to look for it) that says that an entity used in a program must be defined exactly once.

      Some of the KDE libs apparently were trying to define things more than once, and have the linker merge them. Which falls outside the realm of C++, and is actually done for some behind-the-scenes things, but not normally, and not by default.

      Anyhow, there was a long thread on the gcc list, where the remaining multiple inheritence issues were dealt with, and the ODR problems explained to the good KDE folks. So all should be well there.

      Slow startup times remain; that's a different problem.

      --
      You cannot apply a technological solution to a sociological problem. (Edwards' Law)
    3. Re:Sigh by Anonymous Coward · · Score: 0
      Some of the KDE libs apparently were trying to define things more than once, and have the linker merge them.
      Damn. That's one of the coolest tricks in the book! I have a wide collection of libc overrides I use whenever I want to diagnose a problem or figure out how something works. (System call traces only go so far... That's when $LD_PRELOAD comes to the rescue.)
    4. Re:Sigh by devphil · · Score: 2

      Well, yeah, but it only works when you tell the compiler and linker what you're doing. The '#pragma telepathy' extension still hasn't been checked in to the main GCC source tree. :-)

      Under Solaris, I do similar things with the uber-kickass watchmalloc library.

      --
      You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  13. I Hope.... by pretoris · · Score: 1

    I hope Apple has the insight to ship this version of GCC with Jaguar rather than the much maligned GCC 3.0.x

    1. Re:I Hope.... by jdennett · · Score: 1

      If you really want a solid gcc, 3.0.4 is probably your best bet right now. The 3.0.x line has had by far the most testing of any recent version. 3.1 seems pretty good, but many regressions have been fixed "at the last minute" and there are still some known and some unknown regressions. If you want the improved conformance and better optimizers etc. then 3.1 is a good bet. If it's just stable you're looking for, then 3.0.4 is sane, or maybe 3.1.x fairly soon.

    2. Re:I Hope.... by Anonymous Coward · · Score: 0

      Yes, Apple will use 3.1. Before they used 2.95.x. They recommend against compiling anything for deployment with the version of GCC 3.1 that shipped with the DP of Jaguar, but now when the official tree went final they may change that recommendation. The OS itself is (or will be) compiled in GCC3.1.

  14. Re:Most Notable Improvements - export? by iguana · · Score: 1

    Forgive my ignorance, but what is export?

  15. Re:Most Notable Improvements - export? by Anonymous Coward · · Score: 1, Informative

    In short: thing that reduces bloat/speed/compile time when you use templates. Every bigger c++ (KDE and the like) project would kill for it. But AFAIK it is difficult to implement... pitty.

  16. Re:Most Notable Improvements - export? by Anonymous Coward · · Score: 0

    Reduces speed? Finally something really usefull. I always wanted [StarOffice|OpenOffice|KDE] to start with dignity. If they could slow down that blindingly fast linker a bit, it would be... yes, perfect.

  17. Re:Most Notable Improvements - export? by jdennett · · Score: 1

    export is unlikely to help to reduce bloat. Coding well or using a smart compiler will do that. Compile time doesn't appear to much be affected by initial implementations of export.

    Export helps to reduce header file dependencies, which is a good thing. It also makes it possible to ship template libraries without exposing implementation details as plain text.

  18. Prelinking? by Anonymous Coward · · Score: 1

    Is now prelinking possible (with current/next binutils/glibc)? Real prelinking, not objprelink or combreloc.

  19. GCC and Linux Kernel by g_dancer · · Score: 1

    Does GCC 3.1 build the Linux kernel correctly now? I had problem with the GCC 3.0.x versions and some 2.4 kernel modules.

    1. Re:GCC and Linux Kernel by Anonymous Coward · · Score: 0

      Running 2.4.18 (w/ preempt, O(1) and some other stuff) compiled w/ 3.1 and everything's honky dory. The kernel image and modules are a few K bigger than the same compiled with 3.0.4, but otherwise no noticable differences.

    2. Re:GCC and Linux Kernel by tzanger · · Score: 2

      Does GCC 3.1 build the Linux kernel correctly now? I had problem with the GCC 3.0.x versions and some 2.4 kernel modules.

      Which modules? I've been compiling 2.4.18 with ipsec and the bleeding edge ACPI stuff for quite a while now. Nothing weird yet...

  20. 8-bit register use on x86 ? by Anonymous Coward · · Score: 1, Interesting

    Can code generated by this version of GCC use, say, registers AH and AL at the same time? I don't think GCC 2.x can do this.

    1. Re:8-bit register use on x86 ? by morbid · · Score: 0

      Don't know, but in what way do you mean? Holding two separate 8-bit variables in the AX register?
      GCC doesn't "do" 16-bit registers, rather, there is an EAX.
      I doubt it since this is a form of vectorisation, and GCC does not do vectorisation.
      What code are you trying to compile?
      Perhaps I can optimise it for you?

      --
      I'm out of my tree just now but please feel free to leave a banana.
    2. Re:8-bit register use on x86 ? by Anonymous Coward · · Score: 0
      Don't know, but in what way do you mean? Holding two separate 8-bit variables in the AX register?

      Yes.

      I doubt it since this is a form of vectorisation, and GCC does not do vectorisation.

      This seems more like a matter of register allocation.

      What code are you trying to compile?

      Some graphics software I wrote a few years ago that used a lot of 8-bit variables.

      Perhaps I can optimise it for you?

      I don't work there any more :)