Home > General Development > GCC 3.2.2 Released GCC 3.2.2 Released Eugenia Loli 2003-02-05 General Development 44 Comments GCC 3.2.2 is now available from sites listed at here and here. This release is a bug-fix release in the GCC 3.2 series. There are no new major features; however there are many bugs fixed. More detail about this release is available here. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli 44 Comments 2003-02-05 8:18 pm I use it for my compiler on windows and love it!!! add to that msys and you get a real unixy feal to windows when you are programing in an editor as you can use msys for the consol and save the files in the home dir and just type g++. 2003-02-05 8:46 pm I still could not understand what ‘msys’ is used for..? 2003-02-05 10:03 pm Why in gods name are you using gcc/g++ based stuff under Windows? The VC tool chain is SOOOOO superior. This is not a troll – perfect example is compilation speed. VC is orders of magnitude faster then g++. 2003-02-05 10:08 pm >VC is orders of magnitude faster then g++. I agree. VC++ is THE tool if you are developing on Windows. And you can buy the “learning” edition of VC++ for less than $100 I think. However, gcc is free. However, I think a Borland product is also free (as in beer), right? 2003-02-05 10:31 pm Isn’t the VC++ compiler based on the intel compiler, I thought the benchmarks put gcc pretty close to the intel compiler for speed 2003-02-05 10:36 pm The C and C++ compilers are free for Windows, if you download the Windows SDK it includes the two compilers IIRC. 2003-02-05 10:37 pm >VC is orders of magnitude faster then g++. Hopefully gcc will gain a lot of speed thanks to precompiled headers (Easier to use, but with stronger restrictions than VC) and a faster parser in version 3.4: http://gcc.gnu.org/gcc-3.4/changes.html 2003-02-05 10:37 pm I believe not quite. Borland Tools have allways been ahead of Microsoft ones. Borland compilers are faster and in several ways better. If you plan to develop gui programs for windows, Borland C++ Builder is THE tool. For any other purposes… Borland C++ compiler are the tools. And builder is not really necessary to easily create gui programs. Besides, the “learning” edition of VC++ is in fact a “Student Edition”. Can only be bought by students, the school or college has to issue a document proving that you are really studying, and the only thing you buy imeddiatly is a package which entitles you to receive the complete pack, ie, you buy the license and order form, mail it to Microsoft, which will then send you the MSVStudio package. Bye 2003-02-05 10:57 pm Last I heard Borland was making faster binaries at the cost of breaking the PE standard ie. the executatble file in some way was different from the microsoft (?) defined standard. And what are the several better ways btw? Also, It’s quite easy to spot software created using borlad tools. They differentiate in the look and feel from apps made with other tools. Those stupid looking “Green Chec” and “Red X” buttons on dialogs for example. 2003-02-05 11:42 pm The Visual Studio compiler is not nearly as standards compliant) as gcc is. I’ve gotten ICEs (Internal Compiler Error) with VS7.0 on code that compiled perfectly well with gcc. As well, gcc is an excellent choice for writing portable code. What is good in VS7 is the dinkum standard libraries. 2003-02-06 12:31 am Has microsoft finaly fixed the incredibly anooying variable scoping bug that’s in VC 6? As for VC 7.0. With the advent of C# I must question the need for C/C++ on Windows for anything other then: a) Backwards compatibility/legacy support b) Shim between the OS and .NET runtime. 2003-02-06 2:06 am Why would you use GCC on Windows? Maybe because Visual C++ is trash? Pure unadultered trash? It’s compilation speed is it’s only saving grace (it is an incremental compiler and connected to an incremental linker). It’s code generation is good, but not as good as Intel C++ or GCC 3.x. It’s error messages are extremely short and unhelpful, especially compared to the awesome EDG-powered error messages in Intel C++ or the fairly-good error messages in GCC 3.2.x. The main problem with Visual C++ is standards complience. No C++ compiler, even now, 5 years after ISO-C++ ’98, is perfectly standards complient. But VC++ 6.x takes non-standards complience to an art. It just plain doesn’t support many modern C++ features. On any remotely cool C++ code it just plain chokes. Go to the Loki and Boost compiler compatibility lists. GCC fails a few of couple of dozen tests. Visual C 6.x fails a ton of them, and even Visual C++ 7.1-beta (MS’s best compiler to date) fails a lot more than GCC. On top of all that, you’ve got all the extensions that MS has the gall to put into Visual C++. Just count the number of newbies that accidentally learned MS++ instead of ISO C++. Look, standards complience is the most important feature in a compiler. I don’t care if my code runs 30% slower, I can always hand-optimize the bits I need to. I do care if it runs at 0% the speed — it doesn’t compile at all. And 2003 is far too late a date to change code (or even whole designs) for bad compilers. Until MS gets their act together (VS C++ 7.1-beta is a major step forward, but they’re not their yet) I suggest you pocket your $100 and use GCC instead. Or, spend the $100 to get the Comeau C++ compiler (the most standards complient around). Heck, buy Borland stuff if you need to. Using Visual C++ is just plain morally wrong… 2003-02-06 2:24 am Actually Microsoft Visual C++ comes for free in many programming books, you do not have to fill out anything to obtain it. I’m on my third college class, and all three textbooks came with it. 2003-02-06 3:24 am You had me going for a while there… hand optimize? HAHAHA Are you still running a 286/386/486? With the massive cache, branching prediction, Intel HT etc etc – if you can HAND OPTIZE the “bits you need to” you’re a god. Since I doubt you are, you can pretty much shove that statement up your ass. Define “remotely cool”. Define “standard”. dictionary.com: Something, such as a practice or a product, that is widely recognized or employed, especially because of its excellence. I dont have proof, but I’m betting that VC is the most widely used C/C++ compiler. Atleast on the X86 platform. gcc/g++ ONLY saving grace is it’s price. And you get exacly what you payed for it. 2003-02-06 3:26 am IMO the only significant reason to not use G++ is its compilation speed, but at least that is an acknowledged problem and being worked on. Can’t say the same for Borland. Their C++ tools have beeing sucking ass one after another with close to zero support for about 5 years now. Infact their whole company policy is like some kind of stealth-CIA paranoia — they don’t release anything tangible regarding the future of their sofware products. Infact they don’t even have an easy way for people to report bugs for their compiler nor do they even ackknowledge which bugs were fixed when they make a new release! The only thing they’ve got going for their C++ tool is the spiffy proprietary-locking RAD libraries/GUIs. Its a shame that a company whose tools were practically a de facto standard 10 years ago have now become dead last. As for VC++ 7.1, it at least has full support for all the “major” features of C++. I doubt a newbie or even most professionals would run into a problem (and they have “fixed” the for-loop scoping problem by providing a command line switch to change the behavior.) 2003-02-06 3:44 am First, not that I did not say that GCC was 30% slower. It’s not. In fact, in its latest iterations, it’s probably faster. Even still, 30% makes no difference anymore. Not with the kind of processors we have today. And yes, it is still possible to hand optimize an inner loop, even on today’s processors. Intel still publishes instruction latencies even for it’s P4 chips. You don’t need to be a god to do it. Try comp.lang.asm! Define “remotely cool”. >>>>> Loki. Boost. Template meta-programming. Integrated code generation. C++ has changed a whole lot since 1990. Read “Modern C++ Design” by Alexandrescu, then try the stuff in his book in VC++ 6.x. So let’s recap: gcc is just as fast, more standards complient, easier to use (ever see a giant template error in VC++?) and free to boot. I’m sorry you ponied up hundred of dollars for a sub-par compiler, but don’t take that out on GCC. Second, as for the definition of standard, with respect to computer languages, there is only one standard. The one published by the ISO. Yeah, the one with Bjarne Stroustrup and the other gurus of C++ on the board. We’re out of the dark-age, hack-fest era of computers. We do thinks maturely now. You play the game the right way, or you get lost. Even Microsoft isn’t arrogant enough to take your “what ever we do is standard” attitude anymore. That’s why they’ve hired Herb Sutter (a “C++ luminary” according to DevX) and pointed the VC++ project towards 100% ISO complience. That’s why Visual C++ 7.0 is so much better. Even Visual C++ 7.1 still isn’t quite on a par 2003-02-06 4:43 am i think they both have their good points and bad myself, one of the first things i do when re-installing a windows setup is install BOTH visual c++ (old version 4.something) i got from a “programming starter kit” or some such and cygwin (not mingw.. although its nice too it doesnt have all the ‘nix type goodies) as well as various sdk’s and ddk’s… service packs etc makes for a long session but sure is a lot of fun once i get done :o) the borland free command line tools arent bad, but they need an update for their headers and libs.. although you can make em from the sdk’s it would be nice to not need to another nice free one is digitalmars (can still produce ms-dos programs and 16 bit windows ones as well as 32 bit ones) openwatcom seems to be starting to get off the ground too now last i looked they had 1.0 rc 2 or some such available dont have enuf experience with it to comment on its capabilities choice is good :o) 2003-02-06 4:47 am msys is basicly a unix type environment that works ontop of windows and operates out of folders in the application directory….I use it becasue it is easier to just compile on the cmd line in a unix env (for me atleast) than it is in windows and I put my programs in msys/1.0/home and then put a shortcut to the programs folder in my documents so I can quicly access them from any other application like FTP. 2003-02-06 5:26 am Cool! Maybe Debian will have it in stable by the time Hillary runs for Prez in ’08 2003-02-06 6:04 am What gcc needs is a source-level debugger to go with it. I spend more time trying to find run-time errors & logic bugs than I do waiting around for my Compiler to finish it’s task. Let’s focus on the important issues. Jim Steichen, author of AmigaTalk 2003-02-06 10:05 am Gcc is good. It is good on the windows platform too (mingw is great! MSys is like walking a tightrope but I just use a normal windows command prompt anyway). Compilation speed and running speed are not quite the same thing. I personally favour running speed. I write code that is very cpu-intensive. I have found that an old copy of codewarrior for windows 2 (think metrowerks now have version 8 out, so maybe it is even better optimised?) gives the very fastest code. But I use mingw as a reference to ensure that I write nice portable code and to test my makefiles that I distribute to non-windows users of my code. What gcc needs is a source-level debugger to go with it Hmm, gdb comes with mingw. I have never used it, but doesn’t Dev-C integrate gdb into the ide ala vc++ / codewarrior? 2003-02-06 10:18 am The problem with the stand alone version and also the learning version ist that optimization is disabled. To get the fully optimizing compiler, you will need at least Visual Studio.NET Professional, which is a lot more than 100 bucks. btw, does anyone know whether the 7.1 version is available from MS as an SP or a download or do i have to shell out fresh bucks ? It is generally advisable to be able to compile your code with more than one compiler. I am looking forward to the point where i can completely abandon VC and switch to gcc entirely for all platforms. 2003-02-06 10:19 am hi, does anyone know where I can get window version of gcc 3.2.2? 2003-02-06 11:39 am >Cool! Maybe Debian will have it in stable by the time Hillary >runs for Prez in ’08 Who cares itis already in unstable 2003-02-06 1:35 pm “Actually Microsoft Visual C++ comes for free in many programming books, you do not have to fill out anything to obtain it. I’m on my third college class, and all three textbooks came with it.” Actually, those free versions are limited versions. I.e. You can’t distribute binaries compiled with it, and you got a “this binary has been compiled with a limited… blabla” message everytime you launch the executable. 2003-02-06 1:55 pm Rayiner, you are so way-way-way off. I typically see GCC about 100-200% slower with no optimization enabled than compared to icc which has -O2 enabled by default. (And there’s a compiler I can trust to not botch my code when it optimizes – they trust it enough to have it on!) GCC isn’t even in the same ballpark. Codewarrior is even faster than any of those, and if you want to see some break-neck speed, tcc rips through code so fast you can measure it in megabytes-per-second (and if you blink you’ll miss it.) And the whole “it makes no difference” argument is hogwash. When GCC developers themselves have to wait 3-8 hours to do a full bootstrap and regression test of the compiler after a change just to check it in, development time goes down the drain. And if you’re a KDE developer, can you say “suicide”? Many of them can’t do a full build of the tree in 24hours. With downtimes like that, people just aren’t going to be very adventerous and want to do (or be able to do many) big changes that touch large subsystems for deep architectural improvements to take place. I personally have a couple of large source files that take about 6 hours for gcc 3.2.1 to compile, and 15 minutes for icc to compile. I would sure call that being a “difference.” A very large “difference.” If you don’t find what I say persuasive, perhaps you might want to drop by the GCC lists sometime and ask why compilation speed is Apple’s compiler team’s #1 priority. As for template error messages, GCC has horrible error messages right now, and one of them that spilled out far enough to fill most of a page due to a simple error was chosen to be put in Josuttis recent “C++ Templates” book. And if I had a nickel for every time I’ve seen nothing but “parse error” I think I’d be on a carribean island somewhere sipping tea in retirement. C++ ISO compliance also isn’t worth much when almost nobody can get it right. Who cares if you can be portable “in theory” but realistically you can only safely be portable to, like, a couple compilers total? It’s a real shame and is the reason why big toolkits like QT and wxWindows don’t use templates. There are lots of vendors that have put out enourmous effort and are still not there yet. Microsoft wasn’t “arrogant,” they just plain didn’t think it was worth the effort. I’m told that it’s taken them more effort to overhaul their C++ compiler than it was to design and build C# from scratch. I find that believable too. The only compliant front-end right now is from EDG, which is about 400k of source, and has probably comprised more work than many compilers have in them in total. If C++ wasn’t so popular and have such an impetus nobody would have ever put up with trying to implement it correctly. 2003-02-06 2:51 pm I’ve logged into several of the GNU FTP sites (including ftp://ftp.gnu.org/gnu ) and can only find GCC 3.2.1 in the GCC directories. Use Google to find Cygwin, Dev-C++, MinGW or DJGPP for a GCC-based compiler for Windows. 2003-02-06 4:03 pm “I agree. VC++ is THE tool if you are developing on Windows. ” Nah, Borland C++ Builder is better than VC++ in my books. “However, I think a Borland product is also free (as in beer), right?” Borland C++ 5.5 command-line compiler is free They also have open editions of Kylix (Delphi & C++ versions) that you can develop GPL code with. 2003-02-06 4:17 pm As the other Jim has said, gcc 3.2.2 is not available on any of the GNU mirrors. What happened to it? 2003-02-06 5:32 pm Obviously the gcc folks read this thread and have pulled gcc until they aproach the level of sophistication of Miscrosoft’s tools Bow your heads to capitalism, hippie scum! (and take a shower/shave while you’re at it) 2003-02-06 6:01 pm I just checked out gcc_3_2_2_release from CVS, and the only documentation in the tarball is in .texi format (usually its in html or plain text). Perhaps they forgot to generate the documentation before releasing 3.2.2. Just a guess. 2003-02-06 6:38 pm nevermind, I found a couple of mirrors which have 3.2.2, and the tarball does include the documentation. Here: ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.2.2/ and here: ftp://ftp.funet.fi/pub/mirrors/sourceware.cygnus.com/pub/gcc/relea… 2003-02-06 7:04 pm Hello, I learnT C/C++ in college on 2 platforms: Borland C++ & Visual C++ 6.0 (i’m a recent college grad.-class of 2000 and no, I’m not a software programmer–these were electives) I have tried vxWindows, Visual C++’s component builder, FLTK, GTK+. WTF is the acronym I’d use to describe their menu building, window making capabilites. I’ve never used Borland Builder, is it any better? The only program that’s even usable (for me) for making GUI applications is VB. The thing that sucks is I think in C++ terms. Translating between the two is something I’m having quite a bit of difficulty doing. Where are the usable C++ GUI programming tools?! Wowie, I can make a button, or a radio button, or a checkbox, a list of about 6 components. !?!?!? 6?!?!?!?! Are all the C++ GUI app. widgets proprietary or just hidden!? This isn’t a troll against any of those pieces of software, I’m just clueless about how to use them for making GUI apps, out of the box. Please inform me!!! 2003-02-06 8:19 pm “I’ve never used Borland Builder, is it any better? The only program that’s even usable (for me) for making GUI applications is VB.” Borland C++ Builder is similar to VB in the way you build screens, menus, etc, with the exception that it has C++ as it’s language. 2003-02-06 8:31 pm Are you SURE you graduated college? Maybe your parents were telling you that you were going to college when they sent you off the special kids camp. If you did infact graduate, I must weep. I can’t believe that some one like you would be released into the wild!!!?!?!?!??!?!?!?! Retard. 2003-02-06 9:07 pm dictionary.com: Something, such as a practice or a product, that is widely recognized or employed, especially because of its excellence. Show me other compilers adhering to the MS “standard” (“widely … emplyed”). As far as I know only one tool supports MS’s version of C++, and that is VC++. On the other hand I know icc has added support for some gcc extensions, and is adding more. gcc’s extensions are more of a standard than MS’s. 2003-02-06 9:32 pm Where in the definition does it say that the standard must be implemented by more then one entity? Microsofts VC is the standard uner Win32 regardles of how many other people implement it by the virtue of number of people (percentage wise) using it (under Win32). 2003-02-06 9:38 pm First, when I said GCC was fast, I meant it generated fast code (which is backed up by the Coyote Gulch tests of GCC vs ICC). It’s true that GCC is a great deal slower in terms of compilation speed than most any compiler. However, you’ve got to remember that so far, GCC is more conformant than any other compiler (this includes VS 7.1). The C++ standard has gotten extremely complex, with the template mechanism requireing tremendous amounts of heuristics to do various matchings. Compilers that aren’t as conformant (VS 6.x) can be much faster because they don’t have to pay attention to those details. That’s why the older compilers you mentioned (TCC and Codewarrior) which don’t support the standard as well, can parse code so fast. Further, one of the weaknesses of the C++ standard is that it requires template code to be included in each file that uses it. In C, if you have a library of common code, you compile it once, and then everyone that uses it can link to it. On the other hand, if you have a C++ template library, you can’t just compile it once. The code generated from the template is entirely dependent on how the client uses the template. Thus, every C++ compiler recompiles every template header for every source file that uses it. The linker then discards all the redundant code. Thus, if you create an STL vector of integers in 4 source files, the STL vector template will be compiled 4 times, even though the same code is being generated each time. This problem is kind of hard to get rid of. The ‘export’ keyword helps it a bit, allowing for external definitions of templates. However, most compilers don’t support it because it drastically changes the standard C compiler/link model. Even then, there are still redundencies. Precompiled headers, which GCC recently got support for courtesy of Apple, eliminates still more of these redundencies. Hopefully, the C++ 0x standard will take care of the rest. Still, GCC is slower than other very conformant compilers like Intel C++ 7.x Typically, this difference is less than 50%. This might be quite noticible for a large one-time build, but when a developer works on code, he does those quite rarely. The build system should only compile the parts of the code that have changed since the last build. Usually, changes are localized to a few files, so if a developer fixes a bug and wants to do a rebuild to run tests, the compile takes only a few minutes to rebuild the affected files. 2003-02-06 9:56 pm From results pointed to by you: <QUOTE> The real shocker, though, is the superiority of Intel at generating C++ code: With the exception of Iterator (where the two compilers are equal), Intel’s code is 10-1500% (no, that’s not a typo) faster. </QUOTE> I do believe we were talking about C++… And by the way – what’s with all these gcc “extensions”? I thought your darling compiler was NOTHING BUT THE BEST OF THE BEST WHEN IT COMES TO IMPLEMENTING STANDARDS! 2003-02-06 11:52 pm I’m not a retard, I’m uninformed. You’re a retard for making that statement and not being able to differentiate between the 2. Read the whole post you idiot, it’s only a few lines. I GRADUATED COLLEGE & TOOK 2 CLASSES IN C++. Intro to C, and more advanced C++. I’m an electrical engineer not a god damn software engineer. I use Assembly everyday, not C or C++. I wanted to get into GUI app writing and was looking for a starting poing. Thanks for insulting me after reading the first 2 sentences of my post. Ra ra ra ra ra retard. 2003-02-07 12:29 am Sigh. That 1500% number is taken severely out of context. On the Pentium 4 CPU, there was something about the C++ version of the “Complex” and “Max” OOPack benchmarks that triggered an optimization problem in GCC. The Pentium 4 has a very unusual FPU (compared to the P6 and K7 architectures, anyway) and I’m not at all surprised GCC isn’t handling it was well. In this sort of case it would make sense for the CPU designer to have the fastest compiler. Note that on all the P3 tests, and all the integer tests (even on the P4) GCC is just about equal with Intel C++. A 30% consistant performance differential is good evidence of a slow compiler. A 1500% performance difference in only two benchmarks is nothing more than evidence of a corner case or compiler bug. 2003-02-07 1:57 am 16 reasons why you’re a retard, listed bellow: !?!?!? 6?!?!?!?! I’m suprised you’re not using AOL 2003-02-07 2:00 am ok fine. Sheeesh! You OSS apologists are worse then jahova witneses. 2003-02-07 5:57 am “First, when I said GCC was fast, I meant it generated fast code.” Yeah, sure you did. “GCC is more conformant than any other compiler.” GCC isn’t the most compliant. The only one that is, is Comeau’s compiler — by virture of the front-end from EDG (which intel uses, but disables things like export.) TCC and Codewarrior aren’t “older compilers.” “Hopefully, the C++ 0x standard will take care of the rest. ” Suuure. C++ 0x: the magic wand, available now for only $19.95! “Typically, this difference is less than 50%” Give me a break. Hot damn, 50%! How nice and precise a magic number. I wonder where you got that? Wait, I know.. You made it up! “The Pentium 4 has a very unusual FPU” Another one. You’re on a roll.