Slashdot Mirror


GCC 4.0.0 Released

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.

60 of 680 comments (clear)

  1. Moving fast by slapout · · Score: 4, Interesting

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

    --
    Coder's Stone: The programming language quick ref for iPad
    1. Re:Moving fast by ari_j · · Score: 4, Funny

      There was a version 3?

    2. Re:Moving fast by JohnsonWax · · Score: 5, Interesting

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

    3. Re:Moving fast by burns210 · · Score: 4, Interesting

      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.

    4. Re:Moving fast by Anonymous Coward · · Score: 5, Funny

      Yes, it came with Slackware 5 and 6.

    5. Re:Moving fast by paulymer5 · · Score: 4, Insightful

      Absolutely.

      However, I was referring to the underutilization of Altivec in G4/G5 environments. Whereas SSA will be excellent across platforms, autovectorization will be especially significant on chipsets with powerful vector processors.

      Being able to optimize for this hardware, which is not as common or powerful in the x86 world, without much effort is indeed significant.

      I do not disagree with your assessment in the relative worth of SSA and vectorization, but I would simply like to clarify my post.

  2. Lisp? by ari_j · · Score: 4, Funny

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

    1. Re:Lisp? by sketerpot · · Score: 4, Informative

      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.

    2. Re:Lisp? by jm92956n · · Score: 5, Funny
      every language supported from Ada to Java

      From A to J. Lisp starts with an L.

      Therefore, according to the summary... no.

      --
      An effective signature identifies a particular user amongst a base of thousands.
    3. Re:Lisp? by Theatetus · · Score: 4, Informative

      Yes, gcl (formerly known as kyoto common lisp). But it doesn't need the assembler/linker part of the toolchain so it's packaged separately. But I think it is "Part of the GNU Compiler Collection", for what that's worth, and it does depend on GCC.

      --
      All's true that is mistrusted
  3. i'm having horrible flashbacks... by ribo-bailey · · Score: 4, Interesting

    of the 2.95 -> 3.0 transition.

  4. Is anyone else curious what SSA trees are? by Da+w00t · · Score: 4, Interesting

    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?

    --

    da w00t. mtfnpy?
    1. Re:Is anyone else curious what SSA trees are? by Entrope · · Score: 5, Informative

      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.

    2. Re:Is anyone else curious what SSA trees are? by hey+hey+hey · · Score: 4, Informative

      Static Single Assignment, optimization techniques. Try here for more details.

    3. Re:Is anyone else curious what SSA trees are? by GillBates0 · · Score: 5, Informative
      Wikipedia (as usual) has a nice article 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".

      --
      An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
    4. Re:Is anyone else curious what SSA trees are? by Dink+Paisy · · Score: 4, Informative
      As other people have said, SSA is static single assignment. It means that each variable in the program is assigned in only one place. SSA is for optimization, and is usually done in intermediate forms generated by the compiler, rather than in programs written by a human in common computer languages such as C, C++, Perl or assembly languages.

      Trying to recall my knowledge of optimizing compilers:

      SSA makes optimization easier, since it is obvious where a variable was assigned (since it was assigned in only one location) and what value it contains (since there is only one value being assigned to it). The complexity moves to register allocation, where there can be many more variables to allocate because of SSA. Register allocation is Hard, but doing an ok job is quite possible. Most optimizations are impossible unless you can prove various properties about the variables involved, which is often much easier with variables in SSA form.

      --

      Whoever corrects a mocker invites insult;
      whoever rebukes a wicked man incurs abuse.
      --Proverbs 9:7
    5. Re:Is anyone else curious what SSA trees are? by mindriot · · Score: 4, Informative

      Hmm. Funny. Seems like perfect timing, in retrospect. I just held a presentation on SSA (and efficiently transforming code into SSA) today.

      Get the slides here.

      HTH

    6. Re:Is anyone else curious what SSA trees are? by IvyMike · · Score: 5, Informative

      There have been several good answers to your question, but if you're really new to compilers, you might want a little more context. Want a quick lesson in how compilers work? If you're willing to accept some gross oversimplifications, here's how most modern compilers work:

      1) Tokenize the input. For example, if you were compiling perl, you might choose to turn "print $foo" into three tokens; KEYWORD_PRINT, TYPE_SCALAR, and IDENTIFIER('foo'). The output is typically a stream of tokens. This step might be done by lex or flex.

      2) Parse the sequence of tokens using a set of rules called a grammar. For example, "TYPE_SCALAR" followed by "IDENTIFIER()" is might match a rule to generate a variable called "$foo", and "KEYWORD_PRINT" followed by a variable means call the function print on the contents of the variable. The output is typically an abstract syntax tree (AST); a high-level data structure representing the program. This step might be done by yacc or bison.

      3) Match the AST against a series of rules to output the final code. This might actually be two steps; you might generate something into a low-level register transfer language (RTL) that looks very much like assembly, and then turn THAT into actual machine instructions.

      At each stage, you might choose to optimize the output. You might also insert optimizations passes between steps. (For example, you might insert a pass between 2 and 3 to optimize the AST into a simpler AST.)

      Before SSA, GCC sort of skipped making any high-level AST; it used to go from parsing almost immediately into a RTL. You can still optimize RTL, but since it's pretty low-level, it misses out on higher-level context and made some optimizations really difficult.

      SSA is simply a form used for the high-level AST. Why SSA? It is a very nice form to optimize. Read the wikipedia article for more details on why SSA is particularly useful for some optimizations.

      Page 181 of this PDF file from the 2003 GCC Summit explains the flow of the GCC compiler.

  5. Sweetness by kronak · · Score: 5, Informative

    Glad to see they are targeting the AMD64 architecture for improvements.

  6. debian by Anonymous Coward · · Score: 5, Funny

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

    1. Re:debian by dhakbar · · Score: 5, Insightful

      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?

    2. Re:debian by alehmann · · Score: 5, Funny

      Pretty much, yeah.

    3. Re:debian by Mongoose · · Score: 4, Informative

      Debian has had pre-releases for 4.0 for a while now. I guess you'd know that if you were a developer and actually used Debian. Hell I have mono 1.1.6 on Debian -- not many distros even have that yet. =)

  7. whoa by william_w_bush · · Score: 4, Interesting

    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.

    --
    The first rule of USENET is you do not talk about USENET.
  8. Re:Great Timing by Rubel · · Score: 4, Informative
    Although the version of GCC 4 that Apple ships is from last October:
    gcc version 4.0.0 20041026
  9. Trees by goodbadorugly · · Score: 4, Funny
    The new version finally features SSA for trees,

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

    *ducks*

  10. Why? by Mr.+Underbridge · · Score: 4, Funny
    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?

    1. Re:Why? by Sivar · · Score: 5, Insightful

      I know you were just poking fun but--

      Standards are the reason that computers are tolerable to use for any purpose.
      If a programmer can't be bothered to follow an international standard of his own language, there is no guarantee that the code is future-proof. One can hardly blame the compiler vendor, as we can't expect a compiler to mindlessly maintain backwards compatibility with every weird use of a bug and every bizarre code construct that has ever been supported in the past.

      The ability to compile code written for GCC in another compiler is a *good* thing. If it requires informing the programmer that their code has always been broken, then so be it. A little inconvenience is a small price to pay for standards compliance, or should we expect that the GCC authors "embrace and extend" C and other languages until so much code relies on weird GCC nuggets that programmers (and users) are "locked in" to using just that compiler? (But Douglas Adams forbid if Microsoft does the same thing!)

      Maybe I am missing something. If so, please enlighten me (This is not a sarcastic remark--I haven't done much research on what 4.0 has broken so I may be way out of line).

      Sheesh, for as hard as the GCC authors work, and for as much GCC has improved in the last 10 years, the contributers sure get a lot of flak. Anyone who doesn't contribute code themselves should be greatful (or at least appreciative) of their efforts, even when they do make mistakes.

      --
      Computer Science is no more about computers than astronomy is about telescopes. --E. W. Dijkstra
  11. Autovectorization by QuantumG · · Score: 5, Interesting

    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).

    --
    How we know is more important than what we know.
    1. Re:Autovectorization by QuantumG · · Score: 4, Interesting

      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.

      --
      How we know is more important than what we know.
    2. Re:Autovectorization by Anonymous Coward · · Score: 4, Informative

      Most linux distributions being built for i386 is mostly incorrect and when not, a half-truth.

      Fedora Core, for example, relies on the improved instructions for atomic operations found in 486 and newer processors, necessary for certain threading libraries. The rpm program itself requires a 586, if I don't remember wrong.

      Fedora Core also compiles all binaries optimized for P4. It was decided to use P4 optimizations, since these generally work just as well on Athlon processors, while Ahtlon optimizations is rather slow on a P4.

      Furthermore, for CPU intensive applications such as many audio and video applications, CPU optimizations such as MMX and SSE are automatically activated at runtime if the CPU supports it.

      The 'i386' in the name should really be called 'x86'. Of course, then there's also 'i686' packages, which basically mean 'x86 processors that support the CMOV instruction'. That is also wrong, as there are i686 processors which do not support CMOV, such as certain VIA and Cyrix variants.

      CMOV is basically the only useful addition to the x86 instruction set since the i486 for general purpose programs. And programs not fitting into that category, already have hand written asm for time critical sections, which can take advantage of MMX, SSE, 3DNow, Altivec or VIS.

    3. Re:Autovectorization by thalakan · · Score: 4, Informative

      Wrong. The SSE instruction set includes several instructions for doing vector integer ops, such as average and multiplication. These things are a huge speed win even in "average" applications, as the game compiler developer noted above. If you don't believe me, fire up a profiler and look at how much time an office app or web browser spends doing rectangle intersection calculations and TrueType font math.

      Also, there aren't nearly enough people using MOVNTDQ to avoid polluting the instruction pipeline and dumping useless garbage into the system cache. If you're copying stuff into main memory and you aren't going to use it for a while, use MOVNTDQ to get a big speed win. If you do need it cached, use MOVDQA to get both caching and 128 bit transfers in one instruction! We all paid for these fancy schmancy new instructions in our processors, and it's extremely annoying to see programmers not use them.

      --
      -- thalakan
  12. Figured this had to happen by jtshaw · · Score: 4, Interesting

    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.

    1. Re:Figured this had to happen by k98sven · · Score: 5, Informative

      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.

    2. Re:Figured this had to happen by dvdeug · · Score: 5, Informative
      We're not shipping "a fork" of GCC 4. We're shipping GCC 4.0.0, which we compiled from source for Darwin 8.

      According to http://gcc.gnu.org/install/specific.html#powerpc-x -darwin,
      The version of GCC shipped by Apple typically includes a number of extensions not available in a standard GCC release. These extensions are generally for backwards compatibility and best avoided.

      i.e. you're using a forked version of GCC, and definitely not 4.0.0 out of the box.

      the whole notion of "a fork" runs 100% counter to all that open-source stuff

      No, actually, the importance of the ability to fork and wisdom to know when to fork is very important to "that open-source stuff".
  13. *chuckle* by fr2asbury · · Score: 5, Funny

    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.

  14. Compatibility? Linux testing? by H0p313ss · · Score: 4, Interesting

    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?

    --
    XML is a known as a key material required to create SMD: Software of Mass Destruction
    1. Re:Compatibility? Linux testing? by SuperQ · · Score: 4, Informative

      Fedora Core 4 is GCC 4.0

  15. Re:works great! by Foxxz · · Score: 4, Funny

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

    -foxxz

  16. Re:Testing the old girl out... by Anonymous Coward · · Score: 4, Informative

    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.. 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!)

  17. Misplaced blame by tepples · · Score: 4, Insightful

    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.

    1. Re:Misplaced blame by Screaming+Lunatic · · Score: 4, Funny
      Blame the standards committee, not the GCC maintainers.

      Insightful? Jesus eff-ing Christ. Now the slashbots don't like standards. I bet you wouldn't be presenting the same argument if this discussion was about the transition from MSVC 6.0 to 7.0/7.1.

    2. Re:Misplaced blame by Mancat · · Score: 5, Funny

      Mechanic: Sir, your car is ready.

      Customer: Thanks for fixing it so quickly!

      Mechanic: We didn't fix it. We just brought it up to standards. Oh, by the way, your air conditioning no longer works, and your rear brakes are now disabled.

      Customer: Uhh.. What?

      Mechanic: That's right. The standard refrigerant is now R-134A, so we removed your old R-14 air conditioning system. Also, disc brakes are now standard in the autmotive world, so we removed your drum brakes. Don't drive too fast.

      Customer: What the fuck?

      Mechanic: Oh, I almost forgot. Your car doesn't have airbags. We're going to have to remove your car's body and replace it with a giant tube frame lined with air mattresses.

      --
      hello dear sirs my name is jamesh i are india (bihar) can u guide me install red had linux 9?
    3. Re:Misplaced blame by IntergalacticWalrus · · Score: 4, Insightful

      Your analogy is thoughtful but flawed. Unlike compilers, automobiles aren't built PRIOR to the solidification of their standards of manufacturing (yeah, thank God for that).

  18. Readme.SCO by karvind · · Score: 5, Interesting
    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

  19. Something fun with compiling... by phoenix.bam! · · Score: 5, Funny

    and no gentoo users commenting on how they've already recompiled their entire system with the new optimizations. Or maybe they're just waiting for some free resources to open a browser.

  20. Re:What a coincidence by Anonymous Coward · · Score: 5, Informative

    The parent poster is refering to the deprecation of Managed Extensions for C++ syntax in favor of C++/CLI (which is undergoing ISO standardization).

    While it is true the syntax has changed (much for the better: templates are now supported in managed C++ code and so are generics, keywords replace ugly __gc, and more), support for the old syntax is still in the compiler (/clr:oldSyntax), and IntelliSense.

    However, you will be unable to mix new syntax and old syntax code in the same project without taking some penalties (IntelliSense will break, at the least). The designer will even spit out old syntax code when designing an old form or control.

    While the old syntax is definitely on its last legs, the VC++ team was very concerned about not screwing over those (early) adopters of C++ code for the CLR thus far.

    A good resource to read up more on the subject would be Herb Sutter's Blog, Stan Lippman's Blog, or any of the other VC++ team member's blogs.

    Take this from a former VC++ teammate who left during the Whidbey product cycle (posting AC since I've never bothered to get a slashdot account).

  21. Screenshots? by mrcrowbar · · Score: 5, Funny

    Screenshots anyone? ;)

    1. Re:Screenshots? by Herr_Nightingale · · Score: 4, Funny

      check OSnews.com for the screens. apparently it's not user-friendly enough yet, and the fonts aren't spaced correctly. Expect eugenia's appraisal and some "how it should be done" mockups shortly.

  22. vectorization very rarely works by vlad_petric · · Score: 4, Insightful
    The main problem is the C language. While vectorizing a loop is generally not that difficult, figuring out if it's the right thing to do is extremely tough. To do that, you have to "prove" that iterations of a loop are independent of each other. This, in turn, requires good pointer alias analysis, and gcc isn't doing it well enough yet. BTW ... a language like Fortran, that doesn't have pointers at all, is much easier to vectorize; that's one of the reasons a lot of scientific codes are still in Fortran.

    Without automatic vectorization, the performance benefit of compiling for 686 as opposed to 386 is simply minimal. A lot of people have done benchmarks on this, and found out that tuning for 686 with gcc only provides 1-2% improvements in the best case. Keep in mind that current X86 processors execute instructions out-of-order, so instruction scheduling for a specific pipeline is not going to do much (it's very important for in-order machines, though)

    --

    The Raven

  23. GCC 4.0's biggest winner is probably KDE by Anonymous Coward · · Score: 5, Informative

    due to the fact that all its c++ shared libraries will now be 40% smaller due to the symbol visibility improvements (i.e., no runtime adjustment needed by the linker for internal-only functions). This translates into a significant speed improvement for all KDE code.

    1. Re:GCC 4.0's biggest winner is probably KDE by Anonymous Coward · · Score: 5, Informative

      In case you hadn't noticed, the "slow" part of running KDE are the start up times. Once you actually get KDE loaded, the runtime speed is fine.

      -a GNOME/KDE agnostic fluxbox user

  24. Patent issues by plgs · · Score: 5, Informative
    "Unfortunately we cannot implement Steensgaard [pointer] analysis due to patent issues."

    They mean this patent owned by this company. What a surprise.

  25. Re:gcc -v on Fedora 4 test 2 by no-karma-no-worries · · Score: 5, Funny


    > gcc version 4.0.0 20050405 (Red Hat 4.0.0-0.40)

    aren't they supposed to release a broken 3.96 first???

  26. Shouldn't they have done this 10 years ago? by Old+Wolf · · Score: 4, Interesting

    One of the changes in 4.0.0 is autovectorization optimizing.
    One _ancient_ compiler (10+ years) I have to use, already has this feature -- and on a large scale: it'll do it over several screensful of code. What took GCC so long?

    Unfortunately, this compiler I mention also has a bug: once it's factored out 'i' in a piece of code like that below, it then complains that 'i' is an unused variable. So you have to do something with 'i' to suppress that warning, which kinda defeats the purpose of the autovectorization.

    Sample code:

    int a[256], b[256], c[256];
    foo () {
    int i;

    for (i=0; i256; i++){
    a[i] = b[i] + c[i];
    }
    }

  27. Re:"Paltry" is probably a poor choice of words by 1lus10n · · Score: 4, Insightful

    You have no concept of numbers. Both Linux and mac are minor on the desktop but close to 50% of the backend of the internet is handled by unix or unix like systems (not including apple). The vast majority of which use gcc or some derivative.

    Unix and its children and cousins on the back and front end probably double the total number of apple boxes out there. If not more so. Hell some numbers suggest that there actually are more linux desktops than mac desktops. Even if its close between apple and linux on the desktop (which is likely) the number of nix systems in use in general at least matches the number on either side (though they are not desktops).

    --
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." --Albert Einstein
  28. TR1 included! by Anthony+Liguori · · Score: 5, Informative
    I'm surprised noone's mention the inclusion of the C++ TR1. There's a ton of very cool new library features. Here are my two favorite:
    #include <tr1/functional>

    int foo(int x, int y) { return x * y; }

    using namespace std::tr1::placeholders;

    int main() {
    std::tr1::function<int (int, int)> f;
    std::tr1::function<int (int)> g;

    // f can be stored in a container
    f = foo;

    f(2, 3);

    g = std::tr1::bind(f, _1, 3);

    // this is equivalent to f(2, 3)
    f(2)
    }
    Not to mention the inclusion of shared_ptr which provides a reference counted pointer wrapper. This will eliminate 99% of the need to do manual memory management in C++. It's all very exciting, kudus to the G++ team on this!
  29. Re:"Paltry" is probably a poor choice of words by As+Seen+On+TV · · Score: 4, Informative

    Let's say that Apple has 99.9999999% of all desktop installs. Even then, almost none of them actually use GCC.

    Mac OS X itself is compiled with GCC 4. That was the point. Hence, all Mac users depend on GCC 4. That's 40 million and counting according to the latest figures.

  30. Re:works great! by Anonymous Coward · · Score: 5, Funny

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

    It doesn't always get modded fun&@^4-- NO CARRIER

  31. Re:Objective-C++...? by framerate · · Score: 4, Interesting

    "All the ISVs who are still using C++ are building their apps with Core Foundation."

    No they're not! And I myself am not about to port hundreds of thousands of lines of C++ code to Objective-C since that'd eliminate the Windows version, which I can't do!

    In the code base I'm currently porting to Cocoa, all of the application's core logic and data structures are written in C++, and the user-interface layer is written natively for each platform. So the Mac version gets a high-quality Cocoa front-end and Windows/Linux/BSD gets a wxWidgets front-end (since wxWidgets does a good job on those platforms).

    Take away Objective-C++ (and therefore Cocoa C++) support and I'll just compile the wxWidgets version for the Mac since CoreFoundation is, as you say, a pain in the ass to use. The result: another low-quality "Windows-app-in-Aqua-clothing" Mac app.

    Cross-platform toolkits, such as wxWidgets, SWT and Swing produce usable but low-quality Mac applications (missing sheets, drawers, collapsable toolbars, AppleScript support, and so on and so forth). Objective-C++ allows me to easily write high quality Aqua-compliant applications easily. So if Apple values Mac users it will keep supporting Objective-C++!

    Not to mention that, for me at least, Cocoa/C++ is one of the reasons I use a Mac in the first place. I can produce professional user interfaces in no time and still know that I can port the core logic to Windows/Linux/BSD.

    Oh, and I'm working in the games industry, where the majority of code is C++. I know for a fact that Apple wants more games code ported to OS X.