×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

GCC 4.0.0 Released

CowboyNeal posted about 9 years ago | from the funrolled-loops dept.

GNU is Not Unix 680

busfahrer writes "Version 4.0.0 of the GNU Compiler Collection has been released. You can read the changelog or you can download the source tarball. The new version finally features SSA for trees, allowing for a completely new optimization framework." The changelog is pretty lengthy, and there's updates for every language supported from Ada to Java in addition to the usual flavors of C.

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

680 comments

Moving fast (4, Interesting)

slapout (93640) | about 9 years ago | (#12309554)

Is it just me or did the jump from version 3 to 4 happen a lot faster than the one from 2 to 3?

Re:Moving fast (4, Funny)

ari_j (90255) | about 9 years ago | (#12309564)

There was a version 3?

Re:Moving fast (5, Funny)

Anonymous Coward | about 9 years ago | (#12309707)

Yes, it came with Slackware 5 and 6.

Re:Moving fast (1)

vandan (151516) | about 9 years ago | (#12309805)

Don't think so. Slackware 7 had 2.95.something, or maybe even egs-1.something. It was a long time ago. But Slackware 5 and 6 certainly didn't have gcc-3.

Re:Moving fast (1, Offtopic)

NinjaFodder (635704) | about 9 years ago | (#12309573)

Good point. How long until the programming community embraces this product? My workcenter typically holds our breath with any new release for the first few months and lets the gutsy businesses work through the initial bugs. http://freestuffcongas.coingo.net/free-ipod-conga- line.php

Is this spam? (0)

Anonymous Coward | about 9 years ago | (#12309641)

This looks suspiciously like spam to me...

Re:Moving fast (4, Interesting)

burns210 (572621) | about 9 years ago | (#12309692)

Apple is using it in their Tiger (OS X 10.4) release come the 29th of this month. So there is a few millions new GCC 4.0 users right there.

Re:Moving fast (3, Insightful)

Anonymous Coward | about 9 years ago | (#12309745)

There are a hell of a lot more users that depend on GCC then the paltry Apple userbase.

GCC is pretty much the standard for the industry.. there are faster, and more specialized, but GCC is the standard.

Linux/Unix/BSD/etc, IBM, servers, clients, embedded platforms, all hosts of different computers.

Hell if you just look at the embedded computers there are more of those then all the different desktop computers (Windows + *nix + Apple) put together.

Re:Moving fast (0)

Anonymous Coward | about 9 years ago | (#12309801)

So has RMS won???

Re:Moving fast (1)

william_w_bush (817571) | about 9 years ago | (#12309599)

2 to 3 was insanely slow because of the nature of the changes. 3 is almost a new compiler compared to 2, the fork happened rather far back and was more of a replacement than a rejoin, hence the buggery. 4 seems more like a new framework was added and a lot of the functionality was dropped into that framework, maybe some off-mainline work was merged also, but not on the level of 2-3.

my guess at least.

Re:Moving fast (5, Interesting)

JohnsonWax (195390) | about 9 years ago | (#12309606)

Apple wasn't working on GCC until version 3. I suspect a lot of other companies weren't either.

Re:Moving fast (2, Informative)

Dink Paisy (823325) | about 9 years ago | (#12309796)

Well, there was the whole stagnation on 2, leading to the egcs fork and eventual reconciliation with the FSF branch. So it's not really surprising that development is happening a whole lot faster now.

Lisp? (4, Funny)

ari_j (90255) | about 9 years ago | (#12309555)

Yeah, but does it have a Common Lisp compiler yet?

Re:Lisp? (1, Interesting)

refactored (260886) | about 9 years ago | (#12309572)

Always had since way back when. It was called RTL. Classic Lisp syntax (function arg arg)

Say
info gccint and look at the entry on RTL.

Ok, so I'm almost joking.

Re:Lisp? (-1, Redundant)

Anonymous Coward | about 9 years ago | (#12309577)

Redundant? How can the second comment posted on this story be redundant? Any other mod would be more appropriate.

Re:Lisp? (1)

after (669640) | about 9 years ago | (#12309637)

It seems to me that there are more comments on /. about moderated comments then the article itself.

Just a thaught... I'm a little breezy from yesterday :)

Re:Lisp? (4, Informative)

sketerpot (454020) | about 9 years ago | (#12309718)

Try SBCL, CMUCL, GCL, or CLISP. They're all good Lisp implementations. SBCL and CMUCL compile to native code directly and are probably the fastest free CL implemetations, GCL compiles via C (and therefore GCC), and CLISP has a bytecode interpreter.

Re:Lisp? (5, Funny)

jm92956n (758515) | about 9 years ago | (#12309814)

every language supported from Ada to Java

From A to J. Lisp starts with an L.

Therefore, according to the summary... no.

FP - Fuck cowardly liberals! (-1, Offtopic)

Anonymous Coward | about 9 years ago | (#12309557)

Go America!

i'm having horrible flashbacks... (4, Interesting)

ribo-bailey (724061) | about 9 years ago | (#12309558)

of the 2.95 -> 3.0 transition.

Re:i'm having horrible flashbacks... (2, Funny)

whovian (107062) | about 9 years ago | (#12309616)

Keep your hands inside the moving vehicle.

Just over a week ago Fedora Core 3 got its gcc4 package. Not that there's anything wrong with that, as long as it's a supported gcc version *cough*2.96*cough*

Re:i'm having horrible flashbacks... (1, Interesting)

Anonymous Coward | about 9 years ago | (#12309703)

AFAIK, RedHat is the only company that sells commercial support specifically for GCC.

Why? (4, Funny)

Mr. Underbridge (666784) | about 9 years ago | (#12309658)

of the 2.95 -> 3.0 transition.

Did you not get pleasure out of things being errors in 3.0 that weren't even warnings in 2.95?

I'm sure all the contractors loved it! ;)

GCC motto: "What code can we break today?

Misplaced blame (4, Insightful)

tepples (727027) | about 9 years ago | (#12309708)

Did you not get pleasure out of things being errors in 3.0 that weren't even warnings in 2.95?

At least the maintainers of the ISO C++ standard did.

GCC motto: "What code can we break today?

Blame the standards committee, not the GCC maintainers.

Re:i'm having horrible flashbacks... (0)

Anonymous Coward | about 9 years ago | (#12309785)

So Debian compiles it's Woody kernels with 2.9x, not because it's so old, but 3.x had issues?

Re:i'm having horrible flashbacks... (0)

Anonymous Coward | about 9 years ago | (#12309832)

Serves you right for not writing standard compliant code.

Is anyone else curious what SSA trees are? (4, Interesting)

Da w00t (1789) | about 9 years ago | (#12309559)

Not a C coder myself, (sticking mainly to perl).. I've just got to ask, what are SSA trees, and what benefit do they serve?

Re:Is anyone else curious what SSA trees are? (3, Interesting)

rbarreira (836272) | about 9 years ago | (#12309584)

An educated guess - are they a move in the direction of making code optimizations in gcc easier to code? I heard that a lot of optimization experts (you need to know a lot of graph theory for example) wouldn't work on gcc because of the difficulty of working with it for optimizations, so they would do their experiments in other compilers...

Re:Is anyone else curious what SSA trees are? (5, Informative)

Entrope (68843) | about 9 years ago | (#12309595)

Single static assignment is a way the compiler can rewrite the code (usually for optimization purposes) so each "variable" being analyzed is only written once. This makes a lot of optimizations easier to do, since it eliminates aliasing due to the programmer assigning different values to the same variable. You'd probably learn these things if you would RTFA.

Re:Is anyone else curious what SSA trees are? (1)

nofx_3 (40519) | about 9 years ago | (#12309828)

So to the lay C coder, does this mean executables compiled with GCC 4 and optimized properly will run faster? use less memory? be less prone to errors???

-kaplanfx

Re:Is anyone else curious what SSA trees are? (0)

Anonymous Coward | about 9 years ago | (#12309603)

Previous versions of GCC had language specific optimalizations. With the new tree SSA infrastructure, optimalization became generic, language independent. The new, cleaner infrastucture makes room for better code generation.

Re:Is anyone else curious what SSA trees are? (1, Insightful)

Anonymous Coward | about 9 years ago | (#12309623)

Yes, I was curious what SSA trees are, so I clicked the link. I realize this is slashdot, but do try and overcome your fears and RTFA or just google it [justfuckinggoogleit.com] to find this paper on SSA [uiuc.edu] . :)

Re:Is anyone else curious what SSA trees are? (5, Informative)

GillBates0 (664202) | about 9 years ago | (#12309626)

Wikipedia (as usual) has a nice article [wikipedia.org] about the Static Single Assignment (SSA) form.

To put it simply, SSA is an intermediate representation where each variable in a block is defined only *once*. If a variable is defined multiple times, the target of any subsequent definitions of the same variable is replaced by a new variable name.

SSA helps to simplify later optimizations passes of a compiler (for example: eliminating unused definitions, etc) as described in greater detail (with examples and flowcharts) in the article linked to.

That's the SSA form in short. Now I need to ask somebody the difference between the standard SSA form and "SSA for trees".

debian (5, Funny)

Anonymous Coward | about 9 years ago | (#12309562)

i wonder when debian sid will integrate GCC 4.0...

Re:debian (5, Insightful)

dhakbar (783117) | about 9 years ago | (#12309803)

I am curious why this AC's comment was modded troll. Is Debian's release cycle truly so slow that what appears to be an honest curiosity is modded as a troll?

I am so happy!!! (0, Flamebait)

rusty-nail abortion (470272) | about 9 years ago | (#12309563)

Just kidding, GCC is the slowest pile of dogshit ever made.

God that linux is gay and slow.

The FAGGOT KIKES who use linux need to curl up and fucking die!!!

whoa (4, Interesting)

william_w_bush (817571) | about 9 years ago | (#12309571)

reading tfa and changelog intrigued me. optimisations aside im curious if this will be better able to thread on the new multi-core systems coming out, as tls has been spotty till 3.3 and glibc 2. maybe native xd support coming soon too?

also, the c++ side makes me feel optimistic about ongoing support, which had been a big problem till 3.4.

yes im x86/64 centric.

What a coincidence (-1, Troll)

Anonymous Coward | about 9 years ago | (#12309574)

Microsoft Visual Studio .NET 2005 Beta 2 ships (added long-needed SSA trees).

And few days later GCC ships.

Stallman just pulled another one of his GPL tricks that Linux pulled on hardworking Darl McBride.

Re:What a coincidence (-1, Offtopic)

Anonymous Coward | about 9 years ago | (#12309593)

I actually tried VS.NET 2005 Beta 2, with .NET 2.0 and jesus christ was I surprised. They absolutly broke compatibility with ANY old programs. For example, String can not be referenced by *, but only ^. WTF.

Re:What a coincidence (0)

Anonymous Coward | about 9 years ago | (#12309638)

I don't really get what you're saying.

Referenced by ^ - are you talking about System.Text.RegularExpressions?

Also, multiple versions of .NET Framework can peacefully co-exist on the same box. If your app is meant to run on 1.1, and not 2.0, it will run on 1.1.

Re:What a coincidence (0)

Anonymous Coward | about 9 years ago | (#12309666)

No, for example:

String* strMyString;

will throw an error, requiring:

String^ strMyStrin;

Not entierly sure why, not sure if it's for all managed objects. I just know that MS's examples, and old CLR code that I know to work and compiles under 2003 with .NET 1.1 will error out with such errors. I'd love for someone to clear this up, google has been little help, searching the error number, or any other query I can think of.

Re:What a coincidence (0, Flamebait)

ergo98 (9391) | about 9 years ago | (#12309655)

Nice troll.

However note (this is for the grandparent to) - it isn't Visual Studio.NET - It's Visual Studio 2005.

Re:What a coincidence (0)

Anonymous Coward | about 9 years ago | (#12309681)

VS.NET was a fancy name to get the .NET name out there. Everything .NET about VS.NET 2003 is the same for VS 2005.

Re:What a coincidence (0, Redundant)

ergo98 (9391) | about 9 years ago | (#12309709)

Right...and it still isn't Visual Studio.NET 2005 - It's Visual Studio 2005. Microsoft dumped .NET from their naming system.

Re:What a coincidence (1)

Surye (580125) | about 9 years ago | (#12309720)

So your argument has no substance or actual effect on the conversation? Cool.

Re:What a coincidence (1)

ergo98 (9391) | about 9 years ago | (#12309733)

Click the post anonymously next time.

However, if you're trying to cover ignorance by pretending that it's inconsequential, that's a pretty weak technique. Gee, I hope Linoose releases a new version of Winux soon, so I can run it on my AMB x62.

Re:What a coincidence (1)

Surye (580125) | about 9 years ago | (#12309761)

Why would I post anonymously? I just didn't bother logging in before, but I wanted to get notifications on replies. I'm actually interesting in what changed by removing .NET from the name? You say it's not inconsequential? Anf that last sentence made no sense to me. For fogive my ignorance.

Re:What a coincidence (1)

ergo98 (9391) | about 9 years ago | (#12309767)

As an aside, I ignored the original post because it was factless - the same limits applied then as apply now.

Re:What a coincidence (1)

Surye (580125) | about 9 years ago | (#12309797)

I was simply posting my experience with it. I couldn't even compile one of Microsoft's examples from MSDN that worked fine in 2003. If you get a chance, try to compile the Socket class example. It's the one that choked and died on me. Don't take my word for it.

Great Timing (1, Redundant)

LordRPI (583454) | about 9 years ago | (#12309575)

I guess they couldn't have Apple release it first under the Developer Tools for Tiger :)

Re:Great Timing (4, Informative)

Rubel (121009) | about 9 years ago | (#12309605)

Although the version of GCC 4 that Apple ships is from last October:
gcc version 4.0.0 20041026

Re:Great Timing (2, Informative)

Anonymous Coward | about 9 years ago | (#12309672)

It's not a snapshot though, it's a fork (from that date). Apple has done some development on it.

Re:Great Timing (0)

Anonymous Coward | about 9 years ago | (#12309646)

I guess they couldn't have Apple release it first under the Developer Tools for Tiger :)

Uh...they did. Just because it hasn't hit retail doesn't mean everyone isn't already using it.

Re:Great Timing (2, Informative)

Tharkban (877186) | about 9 years ago | (#12309746)

Fedora Core 4 has literally been waiting for this.

From Feburary: http://lwn.net/Articles/124798/ [lwn.net]

That article includes the question/answer:
- Does that mean Fedora Core 4 will ship with a pre-release compiler?
We're not *that* crazy. If GCC 4.0 is delayed, we will either revert, or slip.

works great! (3, Funny)

k4_pacific (736911) | about 9 years ago | (#12309588)

I've already downloaded it and used it to recompile Firefox and I must say that gf@fd@k3nl&
NO CARRIER

Re:works great! (2, Funny)

NanoGator (522640) | about 9 years ago | (#12309670)

"I've already downloaded it and used it to recompile Firefox and I must say that gf@fd@k3nl&
NO CARRIER"


So... what.. did you have FireFox open while trying to compile it?

Re:works great! (4, Funny)

Foxxz (106642) | about 9 years ago | (#12309688)

It looks like you used it to recompile your kernel or pppd program too!

-foxxz

Re:works great! (0)

Anonymous Coward | about 9 years ago | (#12309770)

I'm amazed that the NO CARRIER joke can be mode so often, and always get modded funny.

Trees (4, Funny)

goodbadorugly (837673) | about 9 years ago | (#12309613)

The new version finally features SSA for trees,

So I guess its pretty safe to say that this release is for the birds

*ducks*

Re:Trees (0)

Anonymous Coward | about 9 years ago | (#12309679)

ducks in trees?

Re:Trees (0)

Anonymous Coward | about 9 years ago | (#12309820)

Ducks are not arboreal.

Testing the old girl out... (1)

Julian2 (878031) | about 9 years ago | (#12309635)

I'm one of those crazy people who built Linux From Scratch. I can't wait to figure out what will (won't?) build with GCC 4.0.0. (One thing's for sure... JDK and OOo won't.)

Re:Testing the old girl out... (4, Informative)

Anonymous Coward | about 9 years ago | (#12309705)

I can't wait to figure out what will (won't?) build with GCC 4.0.0. (One thing's for sure... JDK and OOo won't.)

FYI: Red Hat has a guy working full-time on building OOo on GCJ. His blog. [linux.ie] . Not that everything works straight out-of-the-box. But it's not like nothing works either.

(And from what I've heard, you can't expect it to work out of the box either. Sun's coders have done a terrible job and adding all kinds of dependencies on undocumented Sun-internal classes. So it probably doesn't work on Apple's JDK either, and that one is Sun-approved!)

Re:Testing the old girl out... (0)

Anonymous Coward | about 9 years ago | (#12309769)

JDK or OOo?

No loss there!!!

What SSA for trees is (0)

Anonymous Coward | about 9 years ago | (#12309657)

Are the GCC high level intermediate representation (RTL is the low level representation).
Thus, SSA for trees means the high level IR in SSA form.
Before 4.0, no optimizations but inlining were done on the high level IR. All of them were done on RTL.

Autovectorization (5, Interesting)

QuantumG (50515) | about 9 years ago | (#12309662)

Correct me if I'm wrong here, but most Linux distributions are still i386 right? It's only the people who use Gentoo who actually compile everything with i686 options right? So, if autovectorization and all the other improvements in GCC 4.0 make binaries massively faster on modern platforms, how long will it be before the major binary based distributions (like Ubuntu) start making i686 the default and i386 an available alternative (like AMD64 is now).

Re:Autovectorization (2)

Dan Berlin (682091) | about 9 years ago | (#12309684)

Autovectorization is rarely going to make things "massively faster" for most applications. It just makes people feel better when they see their code is vectorized because they think it's cool. (Not that there aren't real applications for autovectorization, SIMD packing, etc. It's just not going to speed up OpenOffice, for example).

Re:Autovectorization (4, Interesting)

QuantumG (50515) | about 9 years ago | (#12309753)

I used to work for Codeplay, a company that made compilers for games development, and we were pretty surprised at the kinds of speedups you would get on non-gaming applications. Obviously compiling open source software was a great way to test our compiler. Basically any loop which performs the same operation on multiple data can be unrolled 4 times and vectorized. That's a massive speedup. So yes, I would expect OpenOffice to be faster.

Gentooooooooo! (0)

Anonymous Coward | about 9 years ago | (#12309724)

Lets get compiling!

Re:Autovectorization (1)

WMD_88 (843388) | about 9 years ago | (#12309736)

Autovectorization is mostly for Apple's benefit. Few want to hand-code AltiVec...so there you go.
It probably won't help with SSE/SSE2 very much, since you need some specialized software to really take advantage of the new feature, and Linux doesn't have much of it (and where it does, like Cinelerra, it's written in asm).

Figured this had to happen (4, Interesting)

jtshaw (398319) | about 9 years ago | (#12309663)

When they announced the release of Apple 10.4 "Tiger" I noticed this page: At that point I kinda figured gcc 4.0.0 had to be out by April 29th since Apple claimed they were using it for OS X.

Re:Figured this had to happen (1)

jtshaw (398319) | about 9 years ago | (#12309677)

drrr... http://www.apple.com/macosx/developertools/

So that is what the preview button is for...

Re:Figured this had to happen (5, Informative)

k98sven (324383) | about 9 years ago | (#12309794)

When they announced the release of Apple 10.4 "Tiger" I noticed this page: At that point I kinda figured gcc 4.0.0 had to be out by April 29th since Apple claimed they were using it for OS X.

Well, you're wrong because GCC doesn't follow Apple's schedule, or anyone else's for that matter. Even a cursory glance at the GCC mailing list will tell you that.

The reason Apple can promise this is that they're not actually shipping GCC 4. They're shipping their own fork of the GCC 4 code. It's probably about 99% the same code, but don't make the mistake of thinking they're shipping exactly what the FSF is distributing.

*chuckle* (5, Funny)

fr2asbury (462941) | about 9 years ago | (#12309664)

I can see my Gentoo box sweating now all nervous for the night I get a little drunk and decide to see how this gcc 4 thing works out. heh heh heh.

src tarball link? (3, Insightful)

codergeek42 (792304) | about 9 years ago | (#12309673)

Why didn't the poster just link to a list of mirrors? I don't want my favorite compiler's source to be unavailable =(

Compatibility? Linux testing? (4, Interesting)

H0p313ss (811249) | about 9 years ago | (#12309680)

Just about every time I have to rebuild a kernel or build a kernel mod I get my butt kicked by gcc versions. So my questions are?

  • Are there compatibility issues with existing binaries?
  • What does this do to existing code?
  • How will this effect existing distros?
  • Is any distro planning on supporting 4.X soon? (And is that a good thing or a bad thing?)

Anyone know?

Re:Compatibility? Linux testing? (1)

katana (122232) | about 9 years ago | (#12309747)

No. No one knows. Stop asking questions and upgrade. It's free, and ESR uses it for a loofah.

Four Effs (-1, Flamebait)

Anonymous Coward | about 9 years ago | (#12309757)

Hey, What about the fortran90 framework filthy faggots ?

It is Official: Netcraft Has Confirmed (-1, Redundant)

sabat (23293) | about 9 years ago | (#12309760)

It is official: netcraft has confirmed that gcc is dead. Red ink flows like a river of blood. For all intents, gcc is dead.

Readme.SCO (5, Interesting)

karvind (833059) | about 9 years ago | (#12309802)

The gcc tar ball has a README.SCO file (reproduced below)

The GCC team has been urged to drop support for SCO Unix from GCC, as a protest against SCO's irresponsible aggression against free software and GNU/Linux. We have decided to take no action at this time, as we no longer believe that SCO is a serious threat.

For more on the FSF's position regarding SCO's attacks on free software, please read:

http://www.gnu.org/philosophy/sco/sco.html

Re:Readme.SCO (1, Informative)

Anonymous Coward | about 9 years ago | (#12309826)

Oh wow, you noticed that now? They've had that file since GCC 3.3.0, and with that wording for half a year.

gcc -v on Fedora 4 test 2 (3, Informative)

hey (83763) | about 9 years ago | (#12309815)

% gcc -v

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050405 (Red Hat 4.0.0-0.40)

how much java comaptibility (3, Interesting)

b17bmbr (608864) | about 9 years ago | (#12309835)

i am interested in the java compatibility. i figure it probably won't do swing, but will it support, or is will it do say gtk/java native. that'd be sweet. i know Qt/kde has had a java bridge for a while, but i really haven't played to much with it. flame java all you want, it's not a geek language. no obfuscated java, no java monks. BFD. sure that'd nix the whole write-once run anywhdere thing. but hell, what a great opportunity to build and test apps under a jre then compile them, to native.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...