Slashdot Mirror


GCC 3.2 Released

bkor forwards the GCC 3.2 release announcement, without attributing it as such: "The GCC 3.2 release is now available, or making its way to, the GNU FTP sites. The purpose of this release is to provide a stable platform for OS distributors to use building their next OS releases. A primary objective was to stabilize the C++ ABI; we believe that the interface to the compiler and the C++ standard library are now stable. There are almost no other bug-fixes or improvements in this compiler, relative to GCC 3.1.1. Be aware that C++ code compiled by GCC 3.2 will not interoperate with code compiled by GCC 3.1.1. More detail about the release is available. Many people contributed to this release -- too many to name here!"

49 of 311 comments (clear)

  1. Re:Is this front page material? by paladin_tom · · Score: 4, Insightful

    This is front-page material because GCC is one of the most important building blocks of the free/open-source software world.

    GCC is the de facto compiler for GNU/Linux and *BSD systems. Furthermore, the Linux kernel currently hasn't been ported off GCC. Without GCC, free *NIX systems would have nowhere near the importance they have now.

    --
    #define sig "Every social system runs on the people's belief in it."
  2. Finally, ABI stabilization. Now about optimization by eviltypeguy · · Score: 5, Informative

    I've been waiting for this. Building glibc in the past w/ gcc3 was PAINFUL beyond measure. There are still many optimization options that I have to use with programs otherwise gcc3's optimizers optimize away too much.

    For example, if I compile the modified Quake engine project I work on without -fno-strict-aliasing bizarre graphical errors occur. (Or used, need to check 3.2 now :)

    Or if I compile with -march=athlon I get fairly mixed results, code that sometimes segfaults for no apparent reason, etc.

    Anyway, congrats to the gcc3.2 team...

  3. Re:Breaking interoperability... again??? by TheSunborn · · Score: 5, Informative

    They do and they have promised to keep the C and C++ ABI stable for the future. (They promised the same thing for 3.1 but some bugs in the 3.1 code forced them to change the ABI again).

    Martin Tilsted

  4. Thank God! by Da+Masta · · Score: 5, Funny

    aware that C++ code compiled by GCC 3.2 will not interoperate with code compiled by GCC 3.1.1

    Good thing I didn't waste an entire f*cking week compiling Gentoo 1.3 with GCC 3.1. It would have been a STUPID WASTE of time if I had done that. Yeah, good thing I saw this coming.

    GOD DAMNED PIECE OF F*CKING SH*T!

    1. Re:Thank God! by rizzo · · Score: 3, Informative

      The fact that you were using Gentoo 1.3 to me means you should have known it was dev the whole time. 1.3 is dev, 1.4 will be the stable version, and AFAIK 1.4 is going to be based on GCC 3.2. I could be wrong.

      --

      "More organs means more human." - Zim

    2. Re:Thank God! by oyenstikker · · Score: 4, Insightful

      No. Your whole system will have crapped out after 3 minutes with a compile error, just waiting for you to come back on Monday.

      --
      The masses are the crack whores of religion.
    3. Re:Thank God! by Florian+Weimer · · Score: 3, Informative

      Good thing I didn't waste an entire f*cking week compiling Gentoo 1.3 with GCC 3.1. It would have been a STUPID WASTE of time if I had done that. Yeah, good thing I saw this coming.

      Yes, it's very nice that it was mentioned in the announcement for GCC 3.1.1.

  5. Re:Any good compilers out there. by FooBarWidget · · Score: 4, Informative

    Don't blindly follow the "GCC produces slow code"-trend just because of that comparison between GCC en Intel C++ a few months ago on Slashdot.

    Since release 3.1, GCC produces *fast* code. On my Pentium 233 MMX, bzip2 is 25% faster when compiled with GCC 3.1 than the binary produced by GCC 2.95.2. The optimizers have been greatly improved, and can compete with Intel C++. On some areas, GCC is faster, while on other areas, GCC is slower than Intel C++. But all in all, GCC is quite good.

  6. UltraSparc, Linux, and RAID1 by doorbot.com · · Score: 3, Informative

    In the past few weeks I've been working on moving my main (home) server from Slackware on i386 to Debian on UltraSparc.

    The Debian 3.0r0 install went fine (although for those trying it, be sure to select "rescue" when you boot off the CD). I recompiled my kernel using egcs64 and added RAID1 support into the kernel (with RAID0 as a module). I was able to setup my RAID partitions without difficulty, and the RAID0 arrays mount just fine. Unfortunately, when I try to mount the RAID1 arrays I get an oops, and any attempts to access the RAID device after that simply hang (that's a technical term ;)).

    After a few searches on various mailing list archives, I found this post on the Linux-Sparc list. I tried this particular patch and was able to mount the RAID1, but after a few minutes copying data to the drive gave me another oops.

    So, one supposition was that the oops was due to a compiler bug, but since egcs64 is so old (from 1998 I think) it's not going to get fixed. So I was looking at GCC 3.1.1 yesterday and got it installed but I was unable to compile a kernel with it (make couldn't find the compiler).

    Is GCC 3.2 usable for Sparc? The GCC site had a report of a successful build of 2.4.18 using GCC 3.1.1 so I expect 3.2 would also work for UltraSparc. However, I tried to get GCC 3.1 working on a Gentoo install I did on my U30 and it died a horrible death. If GCC 3.2 will work, how do I install it as a replacement for GCC 2.95 and egcs64? When I installed the debs for 3.1.1 they didn't seem to replace either GCC or egcs. Can I pass some arguments to make-kpkg to provide the location of the compiler, as well as the -m64 option for UltraSparc?

  7. yes they will work by Ender+Ryan · · Score: 5, Informative
    All your existing binaries will still work, you just won't be able to link against them when compiling with GCC 3.2. Most commercial apps are statically linked against whatever GUI toolkit they use (as for games, all Loki's games are), so you have nothing to worry about.

    --
    Sticking feathers up your butt does not make you a chicken - Tyler Durden
  8. Re:Is this front page material? by dattaway · · Score: 3, Insightful

    Agreed. I have noticed far fewer postings on here announcing the latest developments in free software. I was afraid slashdot was going mainstream and donned the corporate hat or something, passing up news of community acheivements.

    Seeing news like this to be discussed and picked apart in a large forum is always a good idea in my opinion. GCC is important for the way my gentoo linux box operates, so yes, I'm VERY interested in these articles. This is news that lets me be aware of issues I may encounter in the future.

    It seems to me people complained when an article was posted about Yet Another Kernel Release. I can understand those people weren't interested and may have had better sources elsewhere, but I found slashdot a great place to discuss these issues since the beginning.

  9. Re:Any good compilers out there. by Neon+Spiral+Injector · · Score: 3, Informative

    Did you compair the size of the code produced by 2.95.2 and 3.1? Yes, I noticed a speed-up (especially on my Alpha), but the compiled code was more than twice the size.

  10. Re:Is this front page material? by mz001b · · Score: 3, Informative

    in fact, redhat already has gcc 3.2-1 in their rawhide distribution

  11. Re:Breaking interoperability... again??? by edhall · · Score: 3, Interesting

    They also promised that the ABI was finished in 3.0. In fact, that was one of the reasons given for taking so long in getting 3.0 out the door. Not a good track-record, IMHO.

    Still, it will be good to get closer to standards-compliance. C++ has been standardized for four years, now, and fully compliant compilers are just now starting to appear. GCC has actually been fairly good compared to some (cough, Microsoft, cough) in adhering to the standard.

    -Ed
  12. Just compiled a kernel with it. by Neon+Spiral+Injector · · Score: 4, Interesting

    Looks like it produces smaller code than 3.1:

    803130 Aug 15 13:18 vmlinuz
    804713 Aug 6 09:08 vmlinuz.old

    At least by a tiny bit. Those are both Linux 2.4.19 kernels with the same .config files.

    1. Re:Just compiled a kernel with it. by Neon+Spiral+Injector · · Score: 3, Funny

      No, I haven't reached 9 days yet. :) But it did boot just fine.

  13. Re:Finally, ABI stabilization. Now about optimizat by tlk+nnr · · Score: 5, Informative

    If -fno-strict-aliasing fixes the glitches, it could be an invalid assumption in the C code.

    Read the gcc docu for the details: With the alias analysis ,the compiler tries to figure out if 2 pointers point to different addresses. If it's guaranteed that they point to different addresses, then the compiler will reorder read and write operations.

    The new C standard contains very strict rules about pointers, e.g. writing into an array with a "double *" pointer, and reading back with a "long *" pointer is now undefined.

    Have you tried Intel's compiler, set to maximum optimization?

  14. Re:GCC3.2 and GDB compatibility by Anonymous Coward · · Score: 3, Informative

    Blame GDB. Maybe there will come a day when the GDB team understands that most people are not doing embedded work, and that C++ is *very* important.
    That day is not here.

    The reason you can't do things like useful debugging of optimized programs isn't because GCC can't produce the debug info necessary. It can, and would (IE patches exist that make it do so, and would be accepted without any trouble), but GDB can't handle the information.
    This is unlikely to change unless someone whacks the GDB team upside the head. Most are embedded developers, and just don't get that the majority of GDB users don't care about cross-debugging 18 versions of the same chip, over a serial line. They want to be able to debug their desktop programs.

    This is why things like namespace support, dwarf2 location expression/location list support, etc, are *not* priorities for gdb, but things like "multi-arch" (using one gdb to debug 18 OS/ISA/ABI variations of a given architecture) are *requirements* for targets not to be obsoleted.

  15. Doesn't compile glibc 2.2.5 by Neon+Spiral+Injector · · Score: 3, Informative

    This always seems to happen with a major release of GCC, it can't compile the latest release of glibc out of the box. This one dies with: ../sysdeps/unix/sysv/linux/errlist.c:41: weak declaration of `_old_sys_nerr' must precede definition

    Too bad it isn't Friday, or else I'd just blow it off for the weekend. I'll probally look into fixing it now. (Don't worry I'll Google first).

  16. Re: Breaking interoperability... again??? by Antity · · Score: 4, Insightful

    "Be aware that C++ code compiled by GCC 3.2 will not interoperate with code compiled by GCC 3.1.1."

    When will they understand that breaking interoperability is not the way to go forward?

    Please remember that the C++ standards comitee encouraged vendors to use different (incompatible) ABIs for C++. C++ compilers were not supposed to interoperate, because they thought that this would never work, because the compiler had to do far too much things outside the object files (compilation units) for exception handling and initialization code.

    And, for all compilers I know, they were right.

    You really cannot blame the GCC people for this. Whenever they have to change the internal handling of exceptions, templates and stuff internally, it really is the best choice to change the ABI.

    The C++ standard was never designed to make code compiled by different compilers link. And gcc2, gcc3.1, and gcc3.2 are different compilers because the internal handling of these very complex structures changed.

    --
    42. Easy. What is 32 + 8 + 2?
  17. Re:ABI ?? by Anonymous Coward · · Score: 5, Informative

    Application Binary Interface

    ABI's define what is necessary for two pieces of compiled code to interoperate properly. So you have OS ABI's (which define syscall interfaces, argument passing, etc), Programming language ABI's (C++'s ABI generally includes virtual table format, name mangling format, exception handling format, etc), etc.

    Think of it as the API defined for compiled code.
    Compiled code that is compliant with a given ABI will interoperate properly with other code compliant to that ABI.

  18. Re: Finally, ABI stabilization. Now about optimiza by Antity · · Score: 4, Insightful

    Compile with optimization on -- visual glitches.

    Compile with optimization off -- no visual glitches.

    You know that GCC has been tested more with optimization turned on than with -O0 (no optimization)?

    About two years ago, I was compiling linuxconf. The Makefiles forced -O0 (no optimization), and its author, asked, said that "there will be errors by the compiler when I turn on optimization, so I force it to be off for everyone."

    It turned out there was a bug in his code. It wasn't gcc's fault. It just showed up when you used optimization. But, btw, the code of Linuxconf has been ugly as hell since I first saw it.

    Code that won't compile (or break) at -O1 is crap.

    --
    42. Easy. What is 32 + 8 + 2?
  19. Precompiled headers by FooBarWidget · · Score: 4, Interesting

    Does anybody know when GCC wil finally support precompiled headers?

    1. Re:Precompiled headers by norwoodites · · Score: 3, Informative

      3.4 likely, Apple will be submitting their precompiled headers (PFE) after 3.3 comes out.

    2. Re:Precompiled headers by Inoshiro · · Score: 5, Informative

      Repeated from comment 4079246: "We're not meeting the C++ standard in two regards (at least I can't think of any more): first, we don't have export for templates. That will largely be a fallout of the precompiled header projects (two or three PCH branches have been in the repository for a long time now; both Apple and Red Hat have been contributing their implementations)."

      --
      --
      Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
  20. What does this mean for OS X? by frankie · · Score: 4, Interesting

    This is really bad timing for Apple folks.

    AFAIK, the entirety of Jaguar is compiled with GCC 3.1. Replacing all the libraries with v3.2 is gonna be some mighty huge software updates...

    1. Re: What does this mean for OS X? by Antity · · Score: 3, Informative

      AFAIK, the entirety of Jaguar is compiled with GCC 3.1 [google.com]. Replacing all the libraries with v3.2 is gonna be some mighty huge software updates...

      This only affects C++ code. And only libraries and object files.

      Also, it's perfectly possible to have both compilers on the same system. No need to rush for gcc-3.2, anyway.

      --
      42. Easy. What is 32 + 8 + 2?
    2. Re:What does this mean for OS X? by Pius+II. · · Score: 4, Informative

      OS X mostly uses Objective C (like the various Step implementations) which doesn't have the C++ ABI problems: methods are implemented as messages of sorts. This approach means that you can have completely different objects which simply have some method in common, and call them the same way. Also, the Apple branch of gcc has many improvements over the main branch, namely the ability to mix Objective C and C++ (Objective C++). Everyone keeps naggin' the gcc maintainers to include those changes... perhaps now they'll have finally time to do it, so we can use programs like Chimera under GNUstep... I believe there are also many PPC optimizations in the apple version lacking in the main branch. So, it's really not that bad for apple...

    3. Re:What does this mean for OS X? by captredballs · · Score: 4, Informative

      I can't find the link, but there was a good summary of a discussion (kernel cousin?) between users and distribution developers about the upcoming release plans for gcc. Apple had commiting to not upgrading to 3.2, but they would think about backporting bug fixes into their tree. Since they are the main distribution point for gcc for OSX, they'll be able to control it.

      --

      I suppose I'm not too threatening, presently, but wait till I start Nautilus
  21. Switching Compilers by Catskul · · Score: 3, Interesting

    From what Im reading in the comments, there can be problems when upgrading compilers across ABI versions. Can someone either summerize the possible difficulties, or point to a place on the web where I can read about them. What I mean is: If I switch from gcc 2.9x to gcc 3.2, what will I not be able to do, and what problems can I expect

    --

    Im not here now... Im out KILLING pepperoni
    1. Re: Switching Compilers by Antity · · Score: 4, Informative

      If I switch from gcc 2.9x to gcc 3.2, what will I not be able to do, and what problems can I expect

      If you compile programs or libraries with GCC 3.2, they won't be able to link against libraries that were compiled with prior GCC compiler versions. But this only affects C++ code! C code is unaffected.

      And: This isn't really a problem if you compile on your own anyway. You just don't need to "switch compilers". Just do a parallel installation. For example: ../gcc-3.2/configure --program-suffix=32 --prefix=/usr && make bootstrap and it will end up as "gcc32" in your system.

      --
      42. Easy. What is 32 + 8 + 2?
  22. Re:Finally, ABI stabilization. Now about optimizat by edhall · · Score: 5, Informative

    Bugs that come and go depending upon whether strict aliasing rules are assumed or not are generally due to broken code. The C standard is quite explicit about when aliasing is allowed and when it isn't. (Aliasing is when there are two or more pointers to the same region of memory. This is generally OK if the pointers are of the same type, or if an appropriate union is used. Two pointers of different types pointing to the same region of memory are generally veboten (char* is an exception).)

    The aliasing rules tend to be a source of trouble since violating them was fairly common in pre-standard days. (The V6 Unix kernel used to use generic pointers -- like "register *p" -- just about everywhere, something that is prohibited under ANSI.) They exist to allow the compiler to optimize based on the assumption that only pointers of the appropriate type can be used to access a stored value, and thus that value can be assumed to be unmodified (allowing redundant accesses to be eliminated) in a larger number of cases.

    A Google search on "C aliasing" will turn up a fair amount of info on the subject.

    -Ed
  23. Re: ABI ?? by Antity · · Score: 3, Informative

    call me stupid, I know about API's, but what exactly is an ABI ?????

    API: Application-Programmer-Interface.

    ABI: Application-Binary-Interface.

    ABI is the convention used when creating object files (.o). How the assembly calling convention is, how the symbols are named... this sort of stuff.

    --
    42. Easy. What is 32 + 8 + 2?
  24. Stable C++ ABI??? by Anonymous Coward · · Score: 5, Interesting

    Finally a stable C++ ABI ???

    1. This means that C++ _including objects+classes+ will, with a bit of grunt work, be able to be integrated with real-oo scripting languages just as easily as C - it's the constantly changing C++ ABI that has prevented, until now, "easy" bridging of, say, C++'s object model to Common Lisp's CLOS, without having to recompile everything in sight at the drop of a hat - it will now be possible to produce a C++-to-lisp analogue of, say, CMUCL's excellent "alien:" lisp package (nothing to do with the deb2rpm tool), or SWIG-but-for-proper+C++ for python and perl.

    2. It will mean that third-party binary distribution of C++ code is a lot more viable. Remember the way Netscape, Realplayer and flash used to break with every new RedHat release? - well, that was primarily becuase of libstdc++ not linking properly due to changing ABI.

    3. This should also mean that the prelink "hack" and it's ld.so-integrated successor can stabilise and become part of standard linux distros - no mare agonisingly slow KDE startup times!

  25. Re: kde speedups ? by Antity · · Score: 3, Interesting

    Where does the gcc 3.2 release stand in terms of fixing the linking speeds of C++ programs?

    Isn't this rather part of ld(1) (binutils)?

    --
    42. Easy. What is 32 + 8 + 2?
  26. Re:Mandrake by ryants · · Score: 3, Informative
    In Mandrake cooker (which is the devel version of Mandrake), this appears in the changelogs of nearly every app:
    * Thu Jul 25 2002 Gwenole Beauchesne
    <gbeauchesne@mandrakesoft.com> 1.0.0-9mdk

    - Automated rebuild with gcc3.2
    Mandrake 9 will be based on gcc 3.2
    --

    Ryan T. Sammartino
    "Ancora imparo"

  27. Hints for compiling gcc-3.2 by Anonymous Coward · · Score: 3, Informative

    For those who want to compile GCC-3.2 yourself:

    - you really should get/compile/install binutils--2.13.90.0.4 first!
    - make sure you specify "--enable-shared --enable-threads=posix --enable-__cxa_atexit" when you do a 'configure' of GCC-3.2. Otherwise it won't be fully ABI compatible!!!
    - then the usual "make bootstrap" etc ...

    Good luck, Max

  28. C++ stability by Compuser · · Score: 3, Interesting

    If C++ ABI is now declared stable does this
    automatically imply that GCC is now fully C++
    standards compatible? If not then what is
    left to change?

  29. Re:Finally, ABI stabilization. Now about optimizat by cburley · · Score: 3, Insightful
    Ever heard of Occam's Razor?

    If you have no insight whatsoever into the internals of a system -- such as is the case when viewing the inner workings of the universe from a pre-Einstein perspective -- then Occam's Razor can indeed prove useful.

    But when you are told by people who understand what's going on inside what are the implications of failures appearing when compiling with certain optimizations enabled, then Occam's Razor no longer applies in the way that you think.

    In fact, it applies in the exact opposite way, to wit:

    A compiler represents, compared to the vast amount of code it compiles, maybe .01% of the total code involved (compiler plus code compiled by that compiler).

    (The GCC compiler probably represents much less than that.)

    Testing the compiler includes making sure it "correctly" compiles a substantial portion of the target software.

    If the compiler offers an optimization that end users can turn on, one which is carefully documented and at least moderately well-tested, but that is known to expose bugs in the code it is compiling, yet has not been found to itself have a bug when enabled while compiling a substantial portion of the code...

    ...then Occam's Razor actually suggests the source of a bug in a specific application that fails when compiled with that optimization enabled is the application itself, not the compiler.

    Otherwise, one would presume a much larger body of software would fail in ways that are easy to track down to a compiler bug (especially in GCC's case, where the compilation phases are so transparent via RTL dumps and the like) when that optimization was enabled.

    Especially in this case, where the kind of application bug is of a type that was widely deployed due to a combination of factors, even though I know the internals of GCC argue pretty strongly for the ability of a bug in the optimization being discussed to hide most of the time and still bite a few applications, I'd tend to lean, based on what you've said, towards a 75-25% likelihood of application bug versus GCC bug in this particular case.

    In short: general rules are very useful, but they cease to apply to the extent specific information is available.

    --
    Practice random senselessness and act kind of beautiful.
  30. Re:(Sorta-kinda OT) - GCC3 and GCC 2.95.3 coexist? by Plutor · · Score: 4, Insightful

    I got into a good habit at my first SysAdminning job that prevents this kinda problem. Make a directory in /usr/local/package/. Make a subdirectory dist, and untar the source there. configure --prefix=/usr/local/package/. make and make install, and then when you have all your /usr/local/package/bin/ and lib directories, make sym links.

    "Uninstalling" and "upgrading" becomes as easy as "for F in `ls -l /usr/local/* | grep '-> /usr/local/package/'`; do rm $F; done".

    At the aforementioned job, the directory I installed to was actually /usr/local/package/version/architecture/, but I consider that overkill on my home machine.

  31. Re:(Sorta-kinda OT) - GCC3 and GCC 2.95.3 coexist? by FooBarWidget · · Score: 3, Interesting

    Use a different prefix! I have 4 different GCC versions on my system (2.96 and 3.0 both provided by RedHat, and 3.1 and 3.2).
    I configure GCC 3.2 like this: ../gcc-3.2/configure --prefix=/usr/local/gcc32 [misc unimportant options here]

    This way, *all* files will be installed in subdirectories inside /usr/local/gcc32. The binaries go to /usr/local/gcc32/bin, the libraries to /usr/local/gcc32/lib, etc. Removing GCC is as easy as rm -Rf /usr/local/gcc32

    To make sure GCC will work:
    - make a symlink /usr/bin/gcc32 to /usr/local/gcc32/bin/gcc
    - add /usr/local/gcc32/lib to /etc/ld.so.conf and run ldconfig

    I just installed GCC 3.2 an hour ago, but I installed GCC 3.1 using the same method (except that the prefix is /usr/local/gcc31) and everything work just fine; no problems whatsoever. I successfully compiled an entire GNOME 2 system using GCC 3.1.

  32. Athlon performance? by evilpaul13 · · Score: 3, Interesting

    Have all the problems that arose in 3.0 regarding performance on AMD Athlon processors been resolved? memcpy() among other things were quite slow when compared to similar processors with GCC 3, and with GCC 2.95.

  33. Re:GCC3.2 and GDB compatibility by Amazing+Quantum+Man · · Score: 3

    The reason you can't do things like useful debugging of optimized programs isn't because GCC can't produce the debug info necessary. It can, and would (IE patches exist that make it do so, and would be accepted without any trouble), but GDB can't handle the information.

    <HUMOR>
    Darn that Microsoft! You can't even debug Linux code properly without needing an IE patch!
    </HUMOR>

    --
    Fascism starts when the efficiency of the government becomes more important than the rights of the people.
  34. An answer from a maintainer by devphil · · Score: 5, Informative


    Hi. I'm one of the hundred-odd GCC maintainers.

    When will they understand that breaking interoperability is not the way to go forward?

    Because the idea of backwards compatability never occured to any of us until we read your Insightful post. My God, what a concept! I'll go tell them at once!

    Seriously, what makes you think the entire team doesn't already understand this point? Do you think such decisions are made lightly? Go read the archives; they agonized over this for months, and that was before the heavy debating started.

    Here's the simple fact: there is a C++ ABI designed for compatability and interoperability. Here's another simple fact: there were bugs in our implementation of the ABI. The choice was to be backwards-compatable with previous GCC 3.1 and incompatable with other vendors implementing the same spec -- which would pretty much defeat the purpose of a common ABI. Or we could fix the bugs and break compatability in a couple of corner cases.

    Of course, after all the details are worked out is when all of the geniuses with answers to all of life's problems decide to reveal The One True Solution on /. posts...

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  35. Apples and oranges by devphil · · Score: 5, Informative


    The C++ standard says nothing about ABIs. (Well, there are some layout rules when dealing with POD structs, but nothing about a C++ ABI.)

    We're not meeting the C++ standard in two regards (at least I can't think of any more): first, we don't have export for templates. That will largely be a fallout of the precompiled header projects (two or three PCH branches have been in the repository for a long time now; both Apple and Red Hat have been contributing their implementations).

    Second, we don't do two-stage name lookup for templates. Which most user don't need to worry about. That will come when the current 15-year-old parser has finished being rewritten (and there are branches doing that already as well).

    Also, keep in mind that although the compiler C++ ABI is stable, the C++ library ABI is not. Declaring it stable at this point would be a massively stupid thing to do; there are far too many optimizations to be made still, and those involve changing the ABI. For example, there's a reworking of the memory allocator that currently exists on my whiteboard, and as soon as it gets finished off and checked in, the library ABI will be broken. Vendors already have methods in place for dealing with multiple versions of a library installed; this will be nothing new to them.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  36. A mess for those running old/current distros... by kcbrown · · Score: 3, Interesting
    Suppose I have a system that uses an older compiler and I want to put gcc 3.2 on it. No problem as far as naming the compiler and such goes, that's the easy part.

    But now I have to recompile every single C++ library on the system in order to make the new compiler truly useful.

    Yet, at the same time, I want to be able to run my old C++ binaries and also want to be able to drop back to my older compiler if necessary.

    The best way to accomplish this, I suppose, is to put the new libraries in their own directory and modify gcc 3.2's spec file to include a -L directive to the linker to reference those libraries at link time and a -rpath directive at link time so that the resulting binary references that directory at runtime.

    The other options I thought of involve either renaming the libraries (thus requiring manual intervention when compiling any package that would refer to the libraries by their "old" names) or changing their major version number (surely a serious abuse of the purpose of the major number! And it would cause problems when linking using the old compiler anyway). Neither of those are very palatable.

    Anyone have better ideas on how to do this?

    --
    Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
  37. Re:A mess for those running old/current distros... by Hitokage_Nishino · · Score: 3

    When I tried out GCC 3.1 I just installed the new libstdc++ rpm alongside the old one, removing the old libstdc++-devel of course.

    Worked fine for me, although I'm not sure if that was the wisest thing to do.

  38. you could call it a bug in 2.95 by Trepidity · · Score: 3, Informative

    But 2.95 is the one that didn't give the Linux kernel any problems. 2.95 allowed some long-obsolete constructs that are illegal under the ANSI standard. Allowing them impedes optimization, because it does not allow GCC to assume that what the guarantees is actually true. GCC3 decided to do away with this, and follow the standard as closely as possible. As a result, old buggy code (like the Linux kernel) no longer compiles. Some code will still compile under -O0 because even though GCC assumes things that the code doesn't, it doesn't actually take advantage of those assumptions to optimize things away. Only when it does do the bugs in the user code show up.

    As an example, some code used to do things like write to a float* and then read it back as a long* (since on 32-bit systems, both are 32-bit values). This used to work, but under the current C and C++ standards is undefined. If the compiler does no optimization (-O0), you might get lucky and the code might still work, because you'll be physically reading and writing to the same memory address with same-sized pointers. But if you allow the compiler to optimize, it'll take advantage of the fact that when you write a float*, you can only legally read it back as a float*, and then your code breaks.

  39. Re:A mess for those running old/current distros... by elflord · · Score: 3, Informative
    Anyone have better ideas on how to do this?

    Newer versions of gcc have different sonames for the libstdc++ library. For example, gcc 3.1 used libstdc++.so.4. Backward binary compatibility is a non-issue. The only tricky issue is recompiling C++ libraries that you wish to use for your development with the new compiler.