Slashdot Mirror


GCC Turns 25

eldavojohn writes "With the release of GCC 4.7.0, the venerable and stalwart constant that is the GNU Compiler Collection turns twenty five. More ISO standards and architectures supported with this release and surely more memories to come from the compiler that seems to have always been."

192 comments

  1. lolcompilers by Anonymous Coward · · Score: 0, Troll

    pre-javaScript relics

    1. Re:lolcompilers by multiben · · Score: 5, Insightful

      You must be a high quality programmer.

    2. Re:lolcompilers by Anonymous Coward · · Score: 0

      I prefer to call them ancient artifacts of great power. If nothing else, it's a great way to detract the conversation when non-techies insist on having a technical discussion.

    3. Re:lolcompilers by Anonymous Coward · · Score: 0

      I hear those javascript engines written in javascript are really good performers.

  2. Happy birthday GCC! by hamster_nz · · Score: 5, Funny

    Hey GCC, only one slice of cake for you - you are big and slow enough at the moment (but I love you anyway).

    OH NO! It's like I'm married to GCC!

    1. Re:Happy birthday GCC! by iluvcapra · · Score: 2

      Codependency destroys families.

      --
      Don't blame me, I voted for Baltar.
    2. Re:Happy birthday GCC! by beelsebob · · Score: 3, Funny

      Run off with a young, pretty, thin floosy instead!

    3. Re:Happy birthday GCC! by mug+funky · · Score: 4, Funny

      yes, you need to resolve ALL dependencies to make it work.

    4. Re:Happy birthday GCC! by hamster_nz · · Score: 4, Funny

      It's best captured in words of that old "Bread" song from the 70s...

      "I want to make it with you"

    5. Re:Happy birthday GCC! by hamster_nz · · Score: 3, Interesting

      I've actually been tempted to have a fling with TCC.

      Small, tight, flexible, low maintenance and can do the business just about anywhere.

    6. Re:Happy birthday GCC! by 93+Escort+Wagon · · Score: 1

      Given the license used by gcc, "Freedom" would also have been acceptable.

      --
      #DeleteChrome
    7. Re:Happy birthday GCC! by serviscope_minor · · Score: 1

      tight,

      But the code it generates isn't. With -O3, the majority of time is soent in the optimizer in GCC, and the optimizer is really pretty impressive.

      --
      SJW n. One who posts facts.
    8. Re:Happy birthday GCC! by Anonymous Coward · · Score: 1, Funny

      gcc's optimizer, much like Kim Kardashian's pussy, is smelly, loose, full of bugs, and to be avoided at all costs.

    9. Re:Happy birthday GCC! by Anonymous Coward · · Score: 1

      Codependency destroys families.

      What's code-pendency?

    10. Re:Happy birthday GCC! by Aardpig · · Score: 1

      Maybe when it can compile F2003/F2008....

      --
      Tubal-Cain smokes the white owl.
    11. Re:Happy birthday GCC! by phantomfive · · Score: 2

      If you really want to speed up your GCC compiling, the fastest speed boost you can get is to compile more than one file at a time. Seriously, try it; it's a massive speed boost.

      --
      "First they came for the slanderers and i said nothing."
    12. Re:Happy birthday GCC! by Anonymous Coward · · Score: 0

      Do better then, or just send an email to the mailing list, if your ideas have any merits I'm sure someone will listen to them. And although there certainly are bugs in GCC the "bugs" -O3 can create are due to the code's fault, not GCC's (i.e. the code is bad/wrong/broken).

    13. Re:Happy birthday GCC! by mallyn · · Score: 1

      Huh? That statement makes no sense. There's nothing wrong with Kim Kardashian. Just because she got flowered at the Red Carpet at the Oscars does not mean anything's wrong with her or the GCC compiler. Furthermore, the Linux kernel is compiled with the GCC compiler. So I declare both Kim and GCC to be fine citizens of this kingdom.

      --
      Most Respectfully Yours Mark Allyn Bellingham, Washington
    14. Re:Happy birthday GCC! by ClickOnThis · · Score: 2

      Just because she got flowered at the Red Carpet at the Oscars does not mean anything's wrong with her or the GCC compiler.

      You mean floured, not flowered. Suddenly having her virginity restored while she's walking on a red carpet is a surreal notion, even for Kim Kardashian.

      --
      If it weren't for deadlines, nothing would be late.
    15. Re:Happy birthday GCC! by justforgetme · · Score: 1

      what? Like this?

      --
      -- no sig today
    16. Re:Happy birthday GCC! by trewornan · · Score: 1

      Perhaps he meant de-flowered, which is still fairly surreal.

    17. Re:Happy birthday GCC! by Mr+Z · · Score: 4, Informative

      What's all this about GCC being slow? It's one of the fastest (in terms of compile time) compilers I work with regularly. You need to try out some highly optimizing compilers for embedded processors sometime to reset your expectations.

      Some real numbers: I just recompiled (with all the optimization bucky bits turned out) my Intellivision emulator and SDK. That's just over 100K lines of code. Took 3.75 seconds with make -j6. "But that's a parallel make!" Fine, I'll do it again tying three of my computer's CPUs behind its back: 13.54 seconds. (Only 8.6 CPU seconds.) At work, it can take 5 seconds just for RVCT (ARM's compiler) just to contact the friggin' license server. Or maybe it's our NFS servers. Hard to say.

      Ok, now to be fair, that's nearly all C code. C++ is a whole 'nuther animal. But much of that is C++'s fault, or more correctly the modern C++ libraries. The template processor is a Turing complete functional programming language, if you sneak up on it sideways and catch it off guard. The STL and Boost folks have perfected that snipe hunt and made an industry out of it. That means that C++ code can compile a bit more slowly. (Fine: "a bit" is an understatement. More like a quadword.) BTW, my comment on STL and Boost is not meant to be a flame of their work. It's incredibly useful stuff. But, I consider a bunch of what they're doing something of an abuse of C++'s limited mechanisms. If C++'s metaprogramming facilities were more deliberately designed for this level of use, I think compile times would come down and we'd avoid the "thirty pages of spaghetti because you forgot a comma" error message experience.

      The book "C++ Template Metaprogramming" has a rather enlightening chapter (Appendix C) on compiler-time performance for various C++ features. (Get a glimpse here. Just search for Appendix C.) Unfortunately, it's not terribly up to date--my copy says (C)2005--so it measures GCC 2.95.3 and GCC 3.3. GCC definitely was not a performance leader in that era, but most of the compilers were pretty bad. I'd love to see an updated version of it for the latest crop of compilers. I seem to recall finding a website a couple years ago with updated data that showed GCC fixed some of the quadratic algorithms in this space, but I could be dreaming it. If anyone actually has pointers to some data on this, that'd be great.

    18. Re:Happy birthday GCC! by phantomfive · · Score: 1

      Most people who criticize GCC these days are comparing it to CLang.

      --
      "First they came for the slanderers and i said nothing."
    19. Re:Happy birthday GCC! by K.+S.+Kyosuke · · Score: 1

      I've actually been tempted to have a fling with TCC.

      Small, tight, flexible, low maintenance and can do the business just about anywhere.

      What about Ken Thompson's C compilers from Plan 9? You can get them quite easily if you download the Go distribution. Additionally, you get cross-compilers for free (you get all target platforms simultaneously in every install).

      --
      Ezekiel 23:20
    20. Re:Happy birthday GCC! by benhattman · · Score: 1

      My hunch is that many of the complaints about GCC being slow come from people who are also compiling with Visual Studio and using precompiled headers. If you always include every header file, your compilation will be slow. That's not really GCC's fault.

  3. I respect the gcc... by Anonymous Coward · · Score: 0

    ...but I wish its development wasn't so inner-circle. If you thought that Free software = bazaar model, you haven't met gcc.

    1. Re:I respect the gcc... by Tubal-Cain · · Score: 3, Interesting

      ...wasn't GNU Emacs used as the example of the "cathedral" model?

    2. Re:I respect the gcc... by Anonymous Coward · · Score: 2, Informative

      Those were the days before the EGCS fork.

    3. Re:I respect the gcc... by Anonymous Coward · · Score: 0

      Yes, and a script that ESR ripped off without attribution then hacked oodles of bugs into became his canonical "bazaar" model.

      Here's the funny thing about cathedrals: they last.

  4. Pastel compiler? by jabberw0k · · Score: 4, Funny

    "I then realized that the Pastel compiler functioned by parsing the entire input file into a syntax tree..."

    Is that some faded-out version of Pascal, perhaps?

    1. Re:Pastel compiler? by Anonymous+Psychopath · · Score: 1

      "I then realized that the Pastel compiler functioned by parsing the entire input file into a syntax tree..."

      Is that some faded-out version of Pascal, perhaps?

      I imagine it was, since he's talking about what happened in 1984.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

    2. Re:Pastel compiler? by Anonymous Coward · · Score: 1

      Hey, the Pastel compiler was a critical component of CDE.

    3. Re:Pastel compiler? by Anonymous Coward · · Score: 0, Interesting

      Hoping to avoid the need to write the whole compiler myself, I obtained the
      source code for the Pastel compiler, which was a multi-platform compiler
      developed at Lawrence Livermore Lab. It supported, and was written in,
      an extended version of Pascal, designed to be a system-programming
      language. I added a C front end, and began porting it to the Motorola
      68000 computer. But I had to give that up when I discovered that the
      compiler needed many megabytes of stack space, and the available 68000
      Unix system would only allow 64k.

    4. Re:Pastel compiler? by Anonymous Coward · · Score: 0

      Web search suggests it was a real compiler, compiling something very similar to Pascal looking code.

    5. Re:Pastel compiler? by Anonymous Coward · · Score: 0

      Sounds like what you really needed was 640k.

    6. Re:Pastel compiler? by Anonymous Coward · · Score: 0

      WE only need 64k. Suck it.

  5. Measured from where? by Anonymous Coward · · Score: 4, Interesting

    Are we measuring GCC from the first version called GCC, or are we measuring from the last release of EGCS, which is actually what we're now using and calling GCC? 'cos where the original GCC went, no one followed...

    1. Re:Measured from where? by Anonymous Coward · · Score: 5, Interesting

      EGCS stands for Experimental/Enhanced GNU Compiler System. It was a decendant of GCC which used a more open development process. This meant that it included more optimizations and language features than the standard GCC.

      This experiment was very successful, and version 2.95 of GCC adopted the EGCS code. Since then GCC has been developed using the same methods as were used for EGCS.

      For more information and the official announcement (now historical) see this page and the GCC homepage.

      When you have a project fork, like egcs, that gets folded back into the main branch (or even when it becomes the main branch), then the main branch gets to hog all the credit and claim that it was its idea the whole time.

      So gcc is and always has been gcc, even when it was egcs. :P

    2. Re:Measured from where? by Anonymous Coward · · Score: 0

      When you have a project fork, like egcs, that gets folded back into the main branch (or even when it becomes the main branch), then the main branch gets to hog all the credit and claim that it was its idea the whole time.

      So gcc is and always has been gcc, even when it was egcs. :P

      So how does that explain "Gnu/Linux", even though none of the code originally came from Gnu? Oh, I see, the rule is that Gnu always gets to hog all the credit... :P

      GNU/Linux refers to a Linux distribution, as opposed to the Kernel. Linux on its own is kind of useless. Traditionally, the set of tools and things used by a Linux distribution to turn Linux useful primarily came from GNU. Nowadays there's alternate tool sets like Busybox and Android's custom stuff (Bionic?) which are used in embedded application, so it might be more useful as a way of differentiating. There's probably also more non-GNU stuff in server/desktop distributions though, so I don't know.

    3. Re:Measured from where? by TheRaven64 · · Score: 2

      By the time you've finished the boot process, you're likely to be using more GNU code than Linux code.

      --
      I am TheRaven on Soylent News
    4. Re:Measured from where? by TheRaven64 · · Score: 1

      EGCS wasn't a new compiler, it was a fork and refactoring of GCC.

      --
      I am TheRaven on Soylent News
    5. Re:Measured from where? by MikeBabcock · · Score: 1

      Gnu code would be code made by the Gnu project, not just code licensed under the Gnu license. Sorry.

      My code isn't Gnu code, even when under the GPL. Its Gnu code if and only if I sign over the Copyrights to to the FSF, and even that's sketchy; its still not written by them.

      --
      - Michael T. Babcock (Yes, I blog)
    6. Re:Measured from where? by TheRaven64 · · Score: 1

      Gnu code would be code made by the Gnu project, not just code licensed under the Gnu license. Sorry.

      Did you read the link? GNU project code include GRUB (the GNU bootloader), glibc (the GNU C standard library), bash (the GNU shell). If you used any C++ stuff during boot, it includes libstdc++ (the GNU C++ implementation).

      As I said, by the time you finish the boot process in a typical Linux distribution and get the system in a state where it can launch programs, you're using more GNU code than Linux.

      --
      I am TheRaven on Soylent News
    7. Re:Measured from where? by MikeBabcock · · Score: 1

      I'm not sure you're aware how many lines of code are in the Linux kernel these days. Incidentally, if I could, I wouldn't have glibc on my system at all, its a horrible representative of GNU.

      --
      - Michael T. Babcock (Yes, I blog)
    8. Re:Measured from where? by TheRaven64 · · Score: 1

      Again, read the link. It looks at the object code size for all of the running components.

      If you don't want glibc, why don't you run FreeBSD? Then you get a decent libc and a decent kernel. Or Android, which uses FreeBSD libc with a second-rate kernel...

      --
      I am TheRaven on Soylent News
  6. 404 by Anonymous Coward · · Score: 0

    File not found :(

  7. Thanks gcc! by stox · · Score: 5, Insightful

    You youngin' have no idea of what kind of crap for compilers we had to put up with until gcc.

    25 years of compilation with gcc!

    --
    "To those who are overly cautious, everything is impossible. "
    1. Re:Thanks gcc! by Anonymous Coward · · Score: 1

      clang is nice but it is far from producing efficient code...

    2. Re:Thanks gcc! by Anonymous Coward · · Score: 4, Informative

      No, it doesn't. Distributions are evaluating it right now and it is failing big time. Even Xcode developers are pissed off that Apple dropped gcc. That shit ain't fully baked, and imbeciles like you who recite Apple propaganda without thought need to pull your heads out of your asses.

    3. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      Clang isn't complete. It doesn't compile all my software even if you refactor compiler specific code. I've been saying this for three years now but maybe it'll be ready next year.

    4. Re:Thanks gcc! by msclrhd · · Score: 5, Insightful

      Having competing products (browsers, compilers, operating systems, ...) help keep those products from stagnating and help push all involved products to improving. It also helps prevent people being reliant on specific compiler/browser/office suite behaviour. GCC is not a "crap compiler", just like Firefox is not a "crap browser". That is not saying that GCC is issue free, nor that it has improved in part as a result from LLVM/Clang. Likewise, LLVM/Clang is not the panacea of compilers.

      Competition on a level playing field is a good thing.

    5. Re:Thanks gcc! by samkass · · Score: 2, Insightful

      The guy in that second link doesn't sound very pissed off. And clang definitely has WAY better error messages and analysis/refactoring available to it. As for the codegen, it beat GCC by a wide margin when it first came around, but GCC seems to have surpassed it again in more recent versions.

      But the key for any commercial entity is that clang beats the pants off any GPLv2-licensed compiler, and GPLv3-licensed code is pretty much irrelevant to most applications. So GCC is doing a great job for the insulated linux world, and hopefully clang can catch back up to offer the rest of us a better choice.

      --
      E pluribus unum
    6. Re:Thanks gcc! by Anonymous Coward · · Score: 5, Interesting

      Err... no?

      Clang can be faster than GCC, when compiling with no optimizations. When you compile with optimizations enabled, that advantage disappears. Despite being nearly as slow as GCC with optimizations enabled, the binaries it produces are often slower. Some code (usually code that benefits from optimizations that Clang's developers could implement more easily than GCC's developers) may be slightly faster when compiled with Clang, but GCC's optimizer is far more mature than Clang's, and generally works better.

      Error messages... Can't argue there. Modularity is pretty cool too, especially when you can built other tools on top of Clang that use Clang's parsers. Nothing stopping you from using those tools with another compiler though.

      Clang's also not nearly as full-featured as GCC. Cross-compiling is a good example. Clang supports only a very limited number of architectures, and even with a supported architecture, cross-compilers are still kind of clumsy. Sure, GCC isn't perfect at this either, but you can use GCC to build code for virtually any platform that's still in use, and almost every platform that's been in use in the last 20 years, on nearly every operating system.

      On most of the platforms GCC supports, it's by far the best compiler available. In some cases, it's the only compiler available. Even if the Clang developers wanted to support such a wide variety of platforms (they don't), it would take years to even approach GCC.

      Even for things like C++11 support, GCC is still ahead. Despite Clang being apparently easier to develop (better architecture, or whatever), GCC has such a huge head start on Clang that it's managed to support far more of the new standard than Clang. It supports more of it than Microsoft's compiler too (which I gather has an architecture similar to Clang, but grew from an architecture that more closely resembles GCC).

      Basically, Clang's a great compiler, but it's still very new. It's developed amazingly quickly, and I think it's going to be a fantastic compiler in a few years, but it's not quite there yet.

    7. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      clang is nice but it is far from producing efficient code...

      [citation needed]

    8. Re:Thanks gcc! by serviscope_minor · · Score: 4, Interesting

      But the key for any commercial entity is that clang beats the pants off any GPLv2-licensed compiler, and GPLv3-licensed code is pretty much irrelevant to most applications. So GCC is doing a great job for the insulated linux world, and hopefully clang can catch back up to offer the rest of us a better choice.

      God, I hope not, I really do. I remember the bad old days, especially with embedded vendors. They would livense a perfectly good compiler front end and then fuck it up beyond repair. The resulting steaming heap of shit would crash half the time, and mysteriously not support random language features.

      Ever since GCC took over the compiler world, my life has been much better.

      Experience says that if you give vendors the chance to screw up a compiler in the name of "business" or "propretary" or whatever then they will.

      --
      SJW n. One who posts facts.
    9. Re:Thanks gcc! by KiloByte · · Score: 5, Insightful

      How exactly GPLv3 on the _compiler_ stops you from doing anything? It has only one effect: ensures the toolchain stays usable for everyone.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    10. Re:Thanks gcc! by PaladinAlpha · · Score: 5, Informative

      Deliberate misinformation. You are free, of course, to do whatever you want to with binaries produced by GCC. GCC's license is completely irrelevant unless you're modifying or extending GCC itself.

      Nice try, though.

    11. Re:Thanks gcc! by Anonymous Coward · · Score: 2, Informative

      clang never beat GCC. The benchmarks clang/LLVM originally published were run against an already old GCC version (by several releases). Thing is, GCC isn't a static target. It keeps getting better, and so far clang/LLVM hasn't been able to keep up.

      Same thing with error messages. GCC has vastly improved error messages, now. clang's just look flashier because they use ANSI coloring.

      The one place where clang/LLVM has actually managed to keep apace with GCC is in the complexity of the code. While GCC is a macro-filled horror show, clang/LLVM is an impenetrable mass of C++ casts, code generators (for clang, not for the LLVM engine), and other horrors. It's definitely not a showcase for how C++ can simplify development. It's somewhat easier to read, but is aging at an incredible pace.

      And this comes from someone who uses clang all the time. I like both compilers, and I target both. Just like I make sure my code compiles cleanly on all the free BSDs as well as Linux.

    12. Re:Thanks gcc! by PaladinAlpha · · Score: 5, Interesting

      This is just fearmongering. It's not complicated at all. If you don't hook GCC's (internal) intermediate code generation to run some custom process on, then you are covered by the compilation exemption.

      Configuring your build to output GCC intermediate, retain that output, modify it with an external tool, and resume the build with the modified intermediate code is not something that will happen by accident. The implications of GCC being GPLv3 are, exactly, none.

      FreeBSD's philosophical objections to GPLv3 are well known and they have the right to maintain those objections, but that has little bearing on GCC's use for a proprietary end product.

      I would be interested to hear about your build process that you feel is likely to accidentally create a non-exempt compilation. Do you have an example?

    13. Re:Thanks gcc! by Anonymous Coward · · Score: 5, Funny

      No because that would invalidate my unsubstantiated claim.

    14. Re:Thanks gcc! by Just+Some+Guy · · Score: 4, Informative

      GCC's license is completely irrelevant unless you're modifying or extending GCC itself.

      In fairness, Clang and LLVM are designed to be used as libraries and integrated with other projects. Imagine that your favorite text editor uses Clang's own parser to generate its syntax highlighting and check for errors as you type. With the GPL, your editor would likely have to be released under the GPL. Now, I like Emacs so that's not a deal-breaker for me. I can see why Apple and other non-GPL editor authors might not like it, though.

      --
      Dewey, what part of this looks like authorities should be involved?
    15. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      You're a good troll I'll give you that. Acting like GCC makes your code GPL. Are you fucking serious? ... Wow...

    16. Re:Thanks gcc! by mallyn · · Score: 2

      Hmm, that reminds me; what would happen if you put Richard Stallman (father of GNU and GPL) and Theo De Radt (one of the fathers of BSD) onto the same stage at, well lets say, OSCON or Usenix or Debconf?

      --
      Most Respectfully Yours Mark Allyn Bellingham, Washington
    17. Re:Thanks gcc! by Anonymous Coward · · Score: 3, Insightful

      Richard Stallman would point out how he has been talking about the dangers of secure boot and software patents for years, and how Theo just now figured out that those things might be a problem. Then we would watch two grown men stare and gleer at each other.

    18. Re:Thanks gcc! by drinkypoo · · Score: 3, Insightful

      Imagine that your favorite text editor uses Clang's own parser to generate its syntax highlighting and check for errors as you type. With the GPL, your editor would likely have to be released under the GPL.

      If your editor is modular and you include a plug-in for this function, then only the plug-in needs to be GPL'd. Your program doesn't, because it doesn't depend on it to function, it only adds additional functionality.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    19. Re:Thanks gcc! by TheRaven64 · · Score: 1, Troll

      They still do this with GCC. Because of the poor layering, getting a new target often requires hacking up various parts of the middle. Their goal is a working compiler, so they just do the minimum required to get their target working, at the expense of breaking others. These changes won't get incorporated into mainline GCC, so you're stuck with a GCC fork that's going to be unmaintained pretty soon.

      In contrast, LLVM back ends are modular and quite easy to write and, more importantly, don't need to touch any of the rest of the system. This is why ARM is now investing quite a lot in LLVM and companies like Qualcomm have seemingly permanent job adverts for anyone with LLVM experience.

      --
      I am TheRaven on Soylent News
    20. Re:Thanks gcc! by TheRaven64 · · Score: 2

      My favourite text editor (vim) actually does have a plugin that uses clang for code completion, which works very nicely (semantics-aware code completions in vim!). Of course, since vim is GPLv2 and this license is not GPLv3-compatible, then that would be impossible with gcc...

      --
      I am TheRaven on Soylent News
    21. Re:Thanks gcc! by TheRaven64 · · Score: 1

      clang never beat GCC.

      Really? Let's look at some fairly recent benchmarks (from a few months ago). Looks like clang wins some, gcc wins some. The only time the difference is more than a few percent either way is in a test that uses OpenMP, which clang doesn't support at all.

      --
      I am TheRaven on Soylent News
    22. Re:Thanks gcc! by TheRaven64 · · Score: 2

      Care to provide some specifics? Clang can compile the whole GCC base system, as well as itself. A few ports that use gcc-specific features or rely on GCC's buggy C++ template expansion don't work, but pretty much anything C99 or C++98 that we've thrown at it works, along with a lot of C11 and C++11 stuff. In terms of Objective-C support, it's not even worth comparing: Objective-C in gcc is a joke.

      --
      I am TheRaven on Soylent News
    23. Re:Thanks gcc! by TheRaven64 · · Score: 2

      Clang's also not nearly as full-featured as GCC. Cross-compiling is a good example

      I'd have to disagree there. With clang 3.0, if you want to cross compile, you do -ccc-target-triple {whatever the target triple is} and maybe --sysroot= {wherever you've put the libraries, headers, and maybe ld and as if your host toolchain doesn't support cross compilation}. With gcc, you need to recompile the compiler for each target architecture you want to support.

      On most of the platforms GCC supports, it's by far the best compiler available. In some cases, it's the only compiler available. Even if the Clang developers wanted to support such a wide variety of platforms (they don't), it would take years to even approach GCC.

      That's certainly true. Adding a new back end to LLVM is easier than adding one to GCC, but GCC has the advantage of starting earlier. For example, I doubt that there will ever be a m68k back end for LLVM. Someone started one, but got bored and never committed it, and no one cares enough to implement one properly. With ARM and MIPS International both contributing to LLVM, however, it does look as if the common platforms are going to be pretty solid.

      Even for things like C++11 support, GCC is still ahead

      Having worked on a C++11 library implementation, I'd also disagree. Clang and GCC both support different subsets of the language, but they're pretty close.

      --
      I am TheRaven on Soylent News
    24. Re:Thanks gcc! by TheRaven64 · · Score: 1

      Two links, one of which is paywalled and the other doesn't support your claim - he's just saying that if you've got code that, for example, depends on GCC's buggy interpretation of C++ template expansion then it may not work with clang and so you need gcc installed too.

      And I'm not sure what you mean by Apple propaganda. Apple is one of the companies that uses and contributes to LLVM, but others include Adobe, nVidia, Qualcomm, ARM, MIPS International, AMD, Cray, and a load of universities.

      --
      I am TheRaven on Soylent News
    25. Re:Thanks gcc! by TheRaven64 · · Score: 4, Interesting

      The FreeBSD project has already declined to upgrade its GCC implementation to the GPL version 3 release.

      With my FreeBSD developer hat on:

      The reason that we have not upgraded to GCC 4.3 or later is not that we fear GPL contamination of resulting binaries. In fact, we're working on external toolchain support that will allow you to build FreeBSD with the gcc 4.7 from ports if you want. The problem is that FreeBSD ships a complete UNIX system, and the Single UNIX Specification requires a C and C++ compiler. Lots of downstream users want to take FreeBSD and distribute derivatives of it. Many of these have a no-GPLv3-anywhere-in-the-company policy. This is because distributing GPLv3 code may inadvertently license some of your patents. Even if you think abolishing software patents would be a good thing, just licensing yours to everyone while your competitors don't is not a very good strategy...

      --
      I am TheRaven on Soylent News
    26. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      You right that clang hasn't come a long way but it has always been second place, over all, compared to gcc. That's not to say it will remain that way. In fact, I fully expect by this time next year or two, clang will be very competative with gcc, if not outright trouncing it. That said, if performance matters to you, on average, gcc is still (and always has been - vs clang) is the horse to ride. clang just doesn't have all the same optimizations and code generation capabilitiews gcc does at the moment.

      So yes, clang does generally generate acceactable code but over all, in a wide mix of applications and algorithms, gcc is still on top. The only question is, for how long.

    27. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      Apple is just a figure head for all the anti-GPL and pro-patent ideology that has taken over the open source movement. They epitomize the movement away from open source as a common goal towards open source as a way to make more money at the expense of everyone else.

    28. Re:Thanks gcc! by serviscope_minor · · Score: 3, Informative

      They still do this with GCC. Because of the poor layering, getting a new target often requires hacking up various parts of the middle. Their goal is a working compiler, so they just do the minimum required to get their target working, at the expense of breaking others. These changes won't get incorporated into mainline GCC, so you're stuck with a GCC fork that's going to be unmaintained pretty soon.

      Well, back in the past, in the bad old days, they licensed some proprietary compiler and hacked it. You have no idea how good/bad/ugly that was compared to GCC, yet the end results were terrible.

      Also, most embedded vendors don't make new CPU architectures. They license existing cores (ARM, PPC, 68k, MIPS) for which GCC already works, making the amount of hackery they need (but not want) to do minimal.

      In contrast, LLVM back ends are modular and quite easy to write and, more importantly, don't need to touch any of the rest of the system. This is why ARM is now investing quite a lot in LLVM and companies like Qualcomm have seemingly permanent job adverts for anyone with LLVM experience.

      Or, it's because companies love to propritarize stuff because they think that every fart is a "market advantage" nad love to keep totally unnecessary things secret. Like companies that won't even send you a basic datasheet without signing an NDA and other crazy foolishness like that.

      Once they get hold of LLVM they won't be able to resist the temptation to stamp on their own proprietary "advatage" at great personal cost to the developers unlucky enough to end up working with thir products. GCC kept them sane by forcing them to admit that their insane and poor quality hackery was worth basically nothing to anyone. This seemed to stop them doing it mindlessly.

      I hope, I really hope I am wrong. But, if you've ever suffered under embedded vendors and their desire to stamp their mark for good or bad (usually bad) on their offerings you will understand where I'm coming from: that any method to stop them being idiots and just selling quality hardware is a step in the right direction.

      --
      SJW n. One who posts facts.
    29. Re:Thanks gcc! by Just+Some+Guy · · Score: 2

      If your editor is modular and you include a plug-in for this function, then only the plug-in needs to be GPL'd. Your program doesn't, because it doesn't depend on it to function, it only adds additional functionality.

      I'm not sure. I mean, I get your point and you're likely right. On the other hand, I think you could make a pretty strong case that syntax highlighting in a programming editor isn't additional functionality, but a core part of the editor's basic feature set. I can imagine Apple's lawyers deciding that's a potential vulnerability without a high enough risk-reward payoff to justify using GCC over Clang.

      Again, you're probably right. And in the worst case scenario, what real harm could actually come of it? If Apple had to decide whether to stop distributing Xcode (a nearly-free-as-in-beer app) or to release under under the GPL as an example of how to write large, complex apps under their ecosystem, it seems like the latter might be a pretty reasonable and attractive option. Still, it's not like Apple to voluntarily potentially give up control over their own systems, and for that alone I could see the license making a big difference to them.

      --
      Dewey, what part of this looks like authorities should be involved?
    30. Re:Thanks gcc! by QuantumBeep · · Score: 2

      This could not possibly be more patently false. The use of the GCC compilers has no effect of any kind on the licensing of the resulting output.

    31. Re:Thanks gcc! by drinkypoo · · Score: 1

      On the other hand, I think you could make a pretty strong case that syntax highlighting in a programming editor isn't additional functionality, but a core part of the editor's basic feature set.

      So provide an OSS highlighting plugin as well. It can suck so long as it works a little bit and is extensible. I don't think that's necessary but if you're worried about whether it's a requirement, prove it isn't.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    32. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      Phoronix a trusted name. They're never swept away in the self-sensationalized moment of anything.

    33. Re:Thanks gcc! by NotBorg · · Score: 1

      Hi Steve!!!! Could you do the monkey dance for us while you're here?

      --
      I want this account deleted.
    34. Re:Thanks gcc! by Anonymous Coward · · Score: 0

      A web site that is biased toward linux and GCC is showing benchmarks that say Clang is faster in plenty of tests.

    35. Re:Thanks gcc! by PaladinAlpha · · Score: 2

      This is more handwaving. Let me say it again.

      GCC's license has no effect on your source code or your finished binary. It doesn't matter if GCC is GPLv2, GPLv3, or GPLv9. It has no effect. It doesn't matter. It is exactly the same as if it were a proprietary product that you purchased. Better, in a lot of ways, but in no way worse. It doesn't change or affect your license on your final product in any way, and it doesn't require a "legal team" to ascertain that.

      LLVM's development has nothing to do with licensing. It started as a research project and continued as a result of GCC's relatively tangled and highly-domained code base. GCC can get away with that because it's good, but there's plenty of room for competitors, of course.

      Companies following procedures you describe are shooting themselves in the foot. Are you implying that when purchasing a product for integration in your toolchain there aren't licensing issues? Does your company just buy the first thing on a Google search without considering how it affects your product?

      And regarding mixing GPL 2/3 -- again, that's completely irrelevant to the discussion. Your product is not GCC, nor is your code being "incorporated" with it.

      Typically this attitude is the result of smear campaigns against vague licensing boogeymen by Microsoft sales people for upper management. Is that the case here?

    36. Re:Thanks gcc! by aristedes · · Score: 0

      A large number of companies I know about have policies of not allowing GPLv3 within their organisations, mainly because of the extremely aggressive patent invalidation clauses which are part of GPLv3. Whether you believe it is correct or not, the FreeBSD developers have rejected GPLv3 because many important downstream users of FreeBSD would have difficulty with using it had GPLv3 been allowed in, even in the compiler toolchain.

      It actually is complicated. You may wish to believe that many corporations are just wrong in their concern about the GPLv3. A developer far removed from a legal department need only write a small compiler plugin to solve a problem they are having, and suddenly the company is mired in legal problems and have potentially given away a large swathe of their patent portfolio.

      So, I've been modded down to troll because I disagree with the prevailing Slashdot opinion that the GPLv3 solves all the world's software licensing problems. Even the FSF explicitly states that "Developing nonfree software is not good for society, and we have no obligation to make it easier." Since GCC is their flagship product, and they have made it slightly harder for people to use it for commercial software, I still believe it is wise to be rather cautious of the post 4.2 license changes.

  8. Always been? Hmmpf. by bzzfzz · · Score: 5, Funny

    Before GCC there were some excellent (for their day) compilers available from what was then an obscure technology company called Microsoft. There were cross-compilers for unusual platforms from Manx Software.

    Kids these days. Next thing you know they'll think they invented sex.

    1. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 0

      Yeah that Lattice C compiler was pretty good.

    2. Re:Always been? Hmmpf. by fnj · · Score: 5, Informative

      Actually, while PC duffers were futzing with 16 bit Computer Innovations C, Lattice C, Microsoft C 1.0 in 1983, which was pretty much just a ripoff of Lattice C, then through the 80s with Microsoft C 2.0 through 6.0, with the first hesitant entry to 32 bits in 5.0 near the end of that period (even though there was no proper Microsoft 32 bit OS available yet at that time), REAL embedded programmers were working with 32 bit 68000, 68010, and 68020 using Green Hills C and compact deterministic real-time multi-tasking kernels such as VRTX.

      Green Hills C was a significant improvement on the Portable C Compiler that came with SunOS and other BSD based unixes in those days.

      When gcc finally matured, it was an ENORMOUS boon. The action nowadays is moving to Clang/LLVM though. With Clang, you don't have to compile a separate version for every cross-compile target. Every Clang executable is capable of producing code for any of the supported targets just by using the right run-time options. Of course, this doesn't address the point that you still need appropriate assemblers, linkers,libraries, startup code etc for each target. But they are trying to get a handle even on that with the Clang Universal Driver Project.

    3. Re:Always been? Hmmpf. by samkass · · Score: 4, Interesting

      Indeed, for most of gcc's existence I always saw it as a reasonable lowest-common-denominator compiler, not an especially good one. Up until about a decade ago, "cc" almost always beat "gcc" in performance on any given UNIX, but every "cc" was so different (especially if you dared throw C++ into the mix) you had to virtually port your code to each one. gcc was available for everything and had a reasonable percentage of the standard implemented so was where everyone gravitated towards. Since egcs merged back in and linux has gone more mainstream with Android variants it's gotten a lot more attention and is finally a pretty decent compiler.

      --
      E pluribus unum
    4. Re:Always been? Hmmpf. by sensei+moreh · · Score: 1

      I remember Lattice C. I must be getting old.

      --
      Geology - it's not rocket science; it's rock science
    5. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 0

      The microsoft editor kicked ass in it's day. I think it was called m.exe . It originally shipped with the microsoft macro assembler which also kicks ass.

    6. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 1

      WTF are you smoking? I *USED* mickeysoft QuickC2.5. It was utter crap! I built my own subroutines instead of using their 'built-ins' because mine were much faster! There was more functionality in mine than theirs too! It was millions of miles from excellent. Their compilers were cheap (but not Free or free), and they were really awful. We aren't kids. Apparently we are older than you, have written more software in more languages, on more architectures, know what good is and what bad is, and aren't going to be swayed by sock puppets working for obscure software companies. Oh, and don't tell daddy how to make kids. Thanks for your input. Now its past your bedtime!

    7. Re:Always been? Hmmpf. by phantomfive · · Score: 1

      With Clang, you don't have to compile a separate version for every cross-compile target. Every Clang executable is capable of producing code for any of the supported targets just by using the right run-time options.

      How is this an advantage? It sounds like it gives you all the disadvantage of a VM (slight slowdown, etc), with none of the benefits (garbage collection, array bounds checking). Why would you not want to compile the binary down to the metal?

      --
      "First they came for the slanderers and i said nothing."
    8. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 0

      I think he means you get just bin/clang instead of bin/clang-i386-linux-elf, bin/clang-i386-windows-pe, bin/clang-arm7-linux-elf, ..., because compiler produces LL bitcode, which can be then translated to target binaries by tools decoupled from compiler itself.

    9. Re:Always been? Hmmpf. by drinkypoo · · Score: 0

      Since egcs merged back in and linux has gone more mainstream with Android variants it's gotten a lot more attention and is finally a pretty decent compiler.

      ...so long as you're on x86 or x86_64...

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    10. Re:Always been? Hmmpf. by TheRaven64 · · Score: 1

      He's talking about the compiler. With GCC, target selection is a compile-time option, so if you want to target (for example) Linux on x86, ARM, and MIPS, you need to compile three different versions of GCC. With clang, you just provide a command-line option to your build and it will generate the code. This is even more important when coupled with something like distcc, which will run the preprocessor on the local machine so you don't need the include files everywhere else, and you can cross compile for any target architecture with a single clang binary connected to distcc on each of your build cluster machines.

      --
      I am TheRaven on Soylent News
    11. Re:Always been? Hmmpf. by bgat · · Score: 2

      Actually, gcc is every bit as good for ARM and MIPS as it is for x86.

      --
      b.g.
    12. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 0

      Real DOS programmers used edlin.

    13. Re:Always been? Hmmpf. by rs79 · · Score: 2

      You forgot Mark William's C - or was that just Z-80, I don't remember.

      At any rate, GCC owes a lot to DECUS C which was donated to DECUS (the Digital Users Group, digital as in PDP-11 digital) by David G. Conroy who wrote the compiler for Dec's RSX11M operating system. He did this when he was at the University of Waterloo and finished it at Teklogix in Mississauga where he and I both worked.

      I was the second or third person to use it. Here's a picture of me an Dave at the Teklogix picnic in Terra Cotta. This must have been about 78. http://rs79.vrx.net/works/photoblog/2011/Feb/9/

      Sometime in the very early 90s I ftp'd into John Gilmore's toad.com for a reason I can't remember now, but it was something to do with this. GCC was suppose to be a clean rewrite but I'd looked at the early source and has seen "DGC" signed comments. So in my mind GCC is, or is at least part derived from Dave's compiler that I used so many years ago.

      --
      Need Mercedes parts ?
    14. Re:Always been? Hmmpf. by Anonymous Coward · · Score: 0

      Traditional compilers would translate directly from source code to assembler, then try and do optimizations (simple ones are loop unrolling, elimination of stack frames for calls with no parameters or results, replacement of stack frame storage space with registers). Clang translates into a virtual machine language with registers. This makes code optimization far easier to make generic to apply for all systems. Only at the last stage are the virtual registers translated into real machine registers and instructions.

  9. And showing every bit of its age too, apparently by InterruptDescriptorT · · Score: 0, Troll

    I love GCC, don't get me wrong, but it seems to me from the research I've done that it's been left in the dust by Intel's and even Microsoft's compilers, which do a far better job at generating optimized code, especially for x86/x64. I have an application where I'd love to use GCC rather than a horrible vendor-specific C/C++ compiler to generate some ARM firmware, but I'm getting a lot of resistance due to its perceived poor/bloated code generation.

    Can anyone confirm or deny this and make me at least able to justify GCC as a possible option again?

    --
    Karma: Excellent Birds (mostly as a result of listening to Laurie Anderson)
  10. Happy Birthday! by go_epsilon_go · · Score: 2

    Happy Birthday gcc!

  11. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    Time to take it out back and shoot it.

  12. Re:And now it's time to bow out gracefully by Anonymous Coward · · Score: 0

    If you want to use LLVM then use it. If it's really better then GCC will eventually fall out of development naturally. No need to try and force things to go your way by demanding that GCC just give up.

  13. Re:And showing every bit of its age too, apparentl by ichthus · · Score: 4, Insightful

    Are you serious? You're a firmware engineer and you can't figure out what compiler to use. Further, you're developing for ARM and you think that Microsoft or Intel may be the best option?
    <br><br>
    NXP recommends GCC (Code Red IDE which is Eclipse-based), and ST recommends Keil, for their ARM micros. Just FYI.
    <br><br>
    Good luck on your school project.

    --
    sig: sauer
  14. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 5, Insightful

    Intel and Microsoft compilers are generally considered better than GCC for IA32 and x86_64, but that's mostly because those are the only platforms those compilers need to target (Microsoft care about ARM now, but I don't know how well MSVCC compares to GCC for any given ARM target). Architecture specific compilers will always be able to take crazy shortcuts in the optimiser and generator. GCC has to jump through all sorts of hoops between the front end and the back end, because the front end can't make any assumptions about the back end.

  15. Happy birthday by Sav1or · · Score: 2

    Yay for gcc, always giving me errors and making me actually try to get it right the first time.

  16. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 5, Funny

    <br><br>

    Good luck on your website.

  17. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    Microsoft's compilers are specific to the Windows platform, while Intel's compilers are only free for non-commercial use. I don't think either company releases compiler source code. So depending on your situation they might not be an option.

  18. DeSmet C by willoughby · · Score: 1

    I still miss putzing around with the compiler from Rick DeSmet to communicate with my dot-matrix printer trying to get it to change fonts. The GCC is a remarkable achievement, and important, but my fondest memories are elsewhere.

    1. Re:DeSmet C by shish · · Score: 1

      the compiler [...] dot-matrix printer

      New project idea: compiler written in postscript that renders the binary :-O

      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
  19. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    Well, one thing that's happened to me an awful lot is that GCC seems to generate smaller *and* faster code when using -Os rather than -O3. That it'd be smaller was no surprise to me, but the speed-up was. (For reference, I'm using an IA32 2 GHz CPU with 1.5 GB of RAM.)

  20. OH GOD HELP ME by Anonymous Coward · · Score: 0, Funny

    Maybe this is a good place to turn to for help. I have a C assignment that's due this week, and I can't figure it out!

    How do I output a string without outputting in the end of line at the end?!

    Like if I have an char firstname[5] that has "Bob\0\0", both printf() and puts() will put a newline at the end. How do I get it so it doesn't insert a newline, so I can output "Bob was here" in one line?

    Help me Slashdot, you're my only hope!

    1. Re:OH GOD HELP ME by Anonymous Coward · · Score: 0

      Like if I have an char firstname[5] that has "Bob\0\0", both printf() and puts() will put a newline at the end.

      No they won't

    2. Re:OH GOD HELP ME by Anonymous Coward · · Score: 0

      for (i = 0; i < 5; i++) putc(firstname[i]);

    3. Re:OH GOD HELP ME by Anonymous Coward · · Score: 1

      exit(EXIT_FAILURE);

    4. Re:OH GOD HELP ME by Anonymous Coward · · Score: 0

      Printf will not output a newline unless you tell it to.

      You want:

      char *firstname="Bob";
      printf("%s", firstname);
      printf("Bob");

      To print with newline:

      pintf("%s\n", firstname);
      priintf("Bob\n");

    5. Re:OH GOD HELP ME by Anonymous Coward · · Score: 0

      for (int i=0; firstname[i] != '\0'; ++i)
      {
      printf("%c",firstname[i]);
      }
      printf(" was here\n");

    6. Re:OH GOD HELP ME by Anonymous Coward · · Score: 5, Funny

      Remove the "\n" from your printf statement. After you graduate, make sure to tell the interviewer you want the management ladder.

    7. Re:OH GOD HELP ME by shutdown+-p+now · · Score: 2

      puts() will, actually.

    8. Re:OH GOD HELP ME by Mr+Z · · Score: 2

      No, no, no. This is a HARD PROBLEM. You MUST use RECURSION!

      void print_string(char *string)
      {

      • if (string || !*string) return;
        putchar(*string);
        print_string(string + 1);

      }

    9. Re:OH GOD HELP ME by Mr+Z · · Score: 1

      err, dropped a ! somewhere: if (!string || !*string) return;

  21. Re:And showing every bit of its age too, apparentl by Tetsujin · · Score: 1, Insightful

    Well, one thing that's happened to me an awful lot is that GCC seems to generate smaller *and* faster code when using -Os rather than -O3. That it'd be smaller was no surprise to me, but the speed-up was. (For reference, I'm using an IA32 2 GHz CPU with 1.5 GB of RAM.)

    Fewer cache misses, maybe?

    --
    Bow-ties are cool.
  22. Re:And showing every bit of its age too, apparentl by beelsebob · · Score: 0, Troll

    It's not just been left in the dust by Intel and MS's – it's also been left in the dust by Apple's (now BSDed) clang. It runs faster, produces faster code, produces better error messages, is more amenable for using parts in other tools, has a brilliant static analysis tool that comes with it, ...

  23. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    If your program is largely compute-bound (small data) rather than memory-bound, smaller code can be faster because more of it fits in the L1 instruction cache.

  24. Re:And showing every bit of its age too, apparentl by gl4ss · · Score: 1

    fuck perceived. show that it works, people will then agree to use it.

    I'd reckon a bigger problem is codebases made to compile on specific hard to get versions of say.. arm rvtc.

    if the problem for using gcc is just perceived bloat in binaries you're in heaven, stfu and eat cookies.

    --
    world was created 5 seconds before this post as it is.
  25. Reminiscing by MichaelJ · · Score: 1

    The best part of the entire linked-to page was the email addressing at the bottom of the announcement. UUCP paths. Those truly were the days.

    --

    Michael J.
    Root, God, what is difference?
    1. Re:Reminiscing by Anonymous Coward · · Score: 0

      Google Groups losing information--

      Click on the link in the original summary to see the announcement from 1987:
          http://groups.google.com/group/mod.compilers/msg/1b3f30d88eab88f8?pli=1

      Then click on the link at the top from Google:
          The old Google Groups will be going away soon. Switch to the new Google Groups.

      When I switch, the poster's handle "johnl" is removed in the "new" version and is replaced with (unknown)

      Hey Googlers, remember, "Don't be evil!"

  26. Re:And showing every bit of its age too, apparentl by rhysweatherley · · Score: 1

    If you need a compiler with special optimization options to make your code run fast, then either your algorithm or your data structure is wrong. Implicitly-parallel SIMD problems are a notable exception - same operation on massive amount of data. Everything else is PEBKAC.

    Happy birthday gcc - making me think more carefully and write better code for 25 years!

  27. Re:And now it's time to bow out gracefully by Anonymous Coward · · Score: 0

    Let's see how well Clang and LLVM do once they support the number of architectures that GCC does, shall we?

  28. It's hard work being a JavaScript Rockstar. by Anonymous Coward · · Score: 5, Funny

    Your attitude makes me think that you're not a JavaScript Rockstar. Well I am, and let me tell you, it's not easy being one!

    You probably only know Pearl or See Plus Plus or See Sharp or one of those other old hat langs that nobody uses any more. You also probably only write software that's Desktop Scale or maybe even Server Scale. Well that's Old Hat and it's Small Hat!

    Us pros, we use JavaScript because it's the best language there is. In fast, it's so good that it's the only one I need to know. It's so fast to work with that I can create five social media applications before you even turn your compiler on! And since I use node.js my web app will scale to the Web And Beyond.

    JavaScript has the best dev tools around. I hear that you guys have Visual Studios or something but we have alert(). It's like your Visual Studios but it's a lot more powerful. But we only use it for the Hard Problems because JavaScript makes it so easy to write perfect software. In fact, I haven't created a bug in almost 3 years because JavaScript is perfection and I'm thus perfection because I use JavaScript.

    JavaScript is the only option today. If you're not using JavaScript, and only JavaScript, then your code is Old Hat. If your code is Old Hat then you're not a JavaScript Rockstar like me and my colleagues. And if you're not a Rockstar, then you probably shouldn't be talking about programming.

    1. Re:It's hard work being a JavaScript Rockstar. by multiben · · Score: 1

      Ha hahaha ha ha! So true.

    2. Re:It's hard work being a JavaScript Rockstar. by Anonymous Coward · · Score: 2, Interesting

      I know your joking and I think I can smell sarcasm even but you are not helping our cause one bit.

      JavaScript as a language is not the problem it can be used wisely. It is has been intentional been feature ridden and with the state of the browser wars going on anything complex is a security risk. The browser wars have also probably left it with the worst development tools known to man.

      Don't even get me started complaining about how every site doesn't work because it uses JavaScript, and that is sent as raw code on every request unless you pull magic tricks to combine, minify, compress and CDN serve.

      It's a retarded misuse of an okay idea and just begs for every thing to break with it's modern day usage.

    3. Re:It's hard work being a JavaScript Rockstar. by Aardpig · · Score: 1

      It is has been intentional been feature ridden....

      WTF?

      --
      Tubal-Cain smokes the white owl.
    4. Re:It's hard work being a JavaScript Rockstar. by Anonymous Coward · · Score: 2, Insightful

      It is has been intentional been feature ridden....

      WTF?

      I think it's a non-proofread approximation of saying "Javascript has lots of language features, many of which are redundant". The implication being that the language is bigger than it needs to be and so is more complex and difficult to read than it should be.

      All ugly languages have this problem, the lack of orthogonality results in massive numbers of anti-patterns (see Perl as the classic default example, C++ is another).

    5. Re:It's hard work being a JavaScript Rockstar. by ByeLaw · · Score: 1

      "I think I can smell sarcasm"

      You only think you can smell sarcasm?

    6. Re:It's hard work being a JavaScript Rockstar. by Mr+Z · · Score: 4, Funny

      I think the appropriate response (at least for posters of a certain age) is:

      <madge>"You're soaking in it."</madge>

    7. Re:It's hard work being a JavaScript Rockstar. by cameloid · · Score: 1

      They don't think it be like it is, but it do.

      --
      -- Cisk for the Cisk God
    8. Re:It's hard work being a JavaScript Rockstar. by Anonymous Coward · · Score: 0

      Whats this "See Sharp" you speak of ?
      I'm purely a "See Pound" developer....

    9. Re:It's hard work being a JavaScript Rockstar. by Anonymous Coward · · Score: 0

      It is has been intentional been feature ridden....

      WTF?

      I think it's a non-proofread approximation of saying "Javascript has lots of language features, many of which are redundant". The implication being that the language is bigger than it needs to be and so is more complex and difficult to read than it should be.

      All ugly languages have this problem, the lack of orthogonality results in massive numbers of anti-patterns (see Perl as the classic default example, C++ is another).

      All those features and no damn sleep function! Only busy wait loops or timer events that make certain coding a nightmare.

  29. Re:And showing every bit of its age too, apparentl by DCFusor · · Score: 0

    Intel's and microsoft's compilers only handle x86, though. GCC can compile for a rather larger variety of targets...

    --
    Why guess when you can know? Measure!
  30. Cool story bro! by Anonymous Coward · · Score: 0

    I turn 25 this week too!

    1. Re:Cool story bro! by Anonymous Coward · · Score: 0

      Off to the carousel with you, then.

  31. Re:And showing every bit of its age too, apparentl by Bert64 · · Score: 1

    Depends largely on the size of your cpu cache, although i was pretty sure gcc (or maybe it was some other compiler) had some options to take cache sizes and relative performance of different level caches vs ram into account when generating optimized code.

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  32. Pastel and LLNL by Al+Kossow · · Score: 5, Informative

    Pastel was an extended Pascal compiler developed by LLNL for the S-1 supercomputer project
    http://www.cs.clemson.edu/~mark/s1.html

    It, and several other significant pieces of software, including the SCALD hardware design language
    were made freely available by LLNL. I have one version of the compiler, which was donated to the
    Computer History Museum by one of its authors. I have been looking for the other pieces since the
    late 80's.

    If you look at the GNU Manifesto, RMS was also looking at using the MIT Trix kernel in the early days
    of the project.

  33. beg to differ by Chirs · · Score: 3, Informative

    You can have the best algorithm in the world, and a good compiler will *still* be able to make it run faster than a bad one.

    Alignment, branch probabilities, inline functions, hoisting stuff out of loops, loop unrolling, removing unused code, etc.--these sorts of things really can make a difference in code that gets called frequently.

    That said, it's not exactly clear that the Intel compiler (icc) is unconditionally better than gcc. There are some benchmarks at http://www.linuxforge.net/docs/bm/bench-gcc-icc.php of a linux-2.6.34 kernel compiled with gcc and icc. The results are close enough that it doesn't make sense for most people to use icc.

  34. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    Laugh now, just wait until he's got a million Brazilian dollars.

  35. Re:And showing every bit of its age too, apparentl by fast+turtle · · Score: 2, Interesting

    RTFM idiot - Os means to optimize for size. The generally accepted standard flag for GCC is -O2 as it's the best compromise between Size and speed up. The only thing is, Sped Up is dependent upon various elements within the source code such as loops and CPU specific options as we Gentoo users tested. Some apps actually do well with O3 flag, most work fine with O2 and from my experience, Os offered the best performance with smallest size possible from the binaries. Most of the speed increases come from fewer cache misses as the binaries are sometimes small enough to actually fit within the L2-L3 cache when the cpu has sufficient space.

    --
    Mod me up/Mod me down: I wont frown as I've no crown
  36. Thank you gnu by Ada_Rules · · Score: 5, Insightful
    I remember the first time I built gcc in college on an decstation (probably around 1990) I was thrilled to have a free compiler with source code. It almost seemed like magic. Several years later when the GNAT project started and promised to bring Ada programming to GCC I was even happier but I never really expected it would turn into the high quality Ada compiler that we have today. While HURD never really worked out, the GCC project alone (never mind the vast quantity of other software covered by the GPL) has been transformational and I think many of the younger generation take the existence of this stuff for granted.

    Now, get off my lawn.

    --
    --- Liberty in our Lifetime
    1. Re:Thank you gnu by bgat · · Score: 1

      Several years later when the GNAT project started and promised to bring Ada programming to GCC I was even happier but I never really expected it would turn into the high quality Ada compiler that we have today.

      Not just a "high quality compiler", but in many cases GNAT is the PREFERRED compiler for Ada. It's the dominant implementation of the language, to say the least.

      --
      b.g.
  37. My admiration... by Anonymous Coward · · Score: 0

    My admiration belongs with Gimple?

    No, my admiration for GCC today is for it's political and open source community contribution.

    But technically, I've come to find GCC to be a very obtuse and difficult tool to nurse through my current projects.

    I'll always admire and defend GCC as an industry changing tool, but if I'm honest, it's not my day-to-day compiler of choice any longer.

    But regardless, Long live GCC.

  38. Re:And showing every bit of its age too, apparentl by phantomfive · · Score: 3, Interesting

    If you're programming in C, which is very likely if you're doing embedded, you're going to hate your life if you have to use Microsoft's compiler. It doesn't support C99 very well (at all?), it doesn't allow inline functions, forces you to declare all your variables at the top of a function, and a number of other annoying things that I only remember when I have to use it.

    Basically stay away from Microsoft compiler for C if you can help it.

    --
    "First they came for the slanderers and i said nothing."
  39. Dogma by Anonymous Coward · · Score: 1

    Plus, we were always at war with Eurasia.

    1. Re:Dogma by Anonymous Coward · · Score: 0

      They're terrorist, I say. Terrorists.

  40. Re:And showing every bit of its age too, apparentl by micheas · · Score: 2

    Unless of course clang generates code that is twice as slow as gcc

    SmallPT is one graphics program that seems to be much slower with clang than gcc.

  41. Re:And showing every bit of its age too, apparentl by jonwil · · Score: 1

    Is GCC on Windows still treated like a third-class citizen? I remember a resistance to supporting certain features of Windows that the MS computer supported like SEH but I dont know if that has changed.

  42. Theodore Ts'o yay by brainiac · · Score: 5, Interesting

    Linux started on usenet, and what really made it blow up was the ability to use gcc to write software. The first version of linux everyone was running didn't have a login, you just got root. Soon the login program came, (i think getty). But anyway it was Theodore Ts'o who did the heavy lifting. Every new program needed something new in the C library and Theodore somehow got it done.

    Thanks Theodore !!

  43. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    That program uses OpenMP Clang doesn't support OpenMP. Now I have a code that uses Clang blocks with libdispatch. GCC doesn't support blocks so it won't compile with GCC. Ergo Clang is Infinity times faster than GCC using your logic.

  44. Re:And showing every bit of its age too, apparentl by MobyDisk · · Score: 3, Informative
    Microsoft Visual Studio supports compiling to:
    • ARM licensed technologies for architectures v4, v4T, Thumb, v5TE, and Intel XScale.
    • Hitachi SuperH processors SH-3, SH3-DSP, and SH-4.
    • MIPS licensed technologies developed by NEC, Toshiba, Philips Semiconductor, Integrated Device Technologies, LSI Logic, and Quantum Effect Design.
  45. It's not just a compiler... by mccrew · · Score: 1

    It's not just a compiler, it's also a worldwide political movement.

    --
    Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash.
  46. Re:And showing every bit of its age too, apparentl by Chryana · · Score: 5, Informative

    Are you an Apple shill in your spare time?

    I'm trying to read this thread, and I have to put up with your repetitive posts about how great clang is. Why don't you read some of the replies to your crap? They do a good job of debunking your claims. I have mod points, but I just hate moderating people down, even if they waste my time repeating unfounded assertions (also known as bullshit).

  47. Microsoft bought and rebranded Lattice C. by Anonymous Coward · · Score: 1

    the reason Microsoft C was a ripoff of Lattice C is that it was equal to and equivalent to Lattice C. They purchased Lattice C to sell with their brand-name.

    It's just like how they bought an operating system from someone else and rebranded QDOS as Microsoft DOS.

    Seattle Computer Products sold the rights for $75K while MS resold the software for $4M in the first year alone. SCP is pretty much the first of many victims of Microsoft.

    1. Re:Microsoft bought and rebranded Lattice C. by Anonymous Coward · · Score: 3, Insightful

      Oh, come on. I despise Microsoft as much, or more, than anyone here. But how does freely selling something for an agreed-on price of $75K make SCP a victim, no matter what Microsoft may have done with their purchase subsequently?

      If I sell my house for $200K, and the buyer subsequently resells it some time later for $300K, can I be a victim too? Is no one an adult any more, capable of making decisions and accepting the consequences, for better or worse? Let's grow up, shall we?

    2. Re:Microsoft bought and rebranded Lattice C. by msobkow · · Score: 1

      And that 1.0 release didn't do pointer arithmetic any better than Lattice did.

      Which is to say, it didn't work.

      But when we filed bug reports, MicroSoft said it would be fixed in the next release -- which we'd have to buy at full price.

      So chalk one up to MicroSoft for conning me out of my rare student dollars to fund their early growth. They never did deliver a working compiler, and I never have forgiven them for ripping me off. And I never will -- I've always looked for the "hook" where MicroSoft is going to rip me off with each and every product they've released since then.

      --
      I do not fail; I succeed at finding out what does not work.
  48. Re:And showing every bit of its age too, apparentl by shutdown+-p+now · · Score: 1

    It doesn't support C99 very well (at all?), it doesn't allow inline functions, forces you to declare all your variables at the top of a function, and a number of other annoying things that I only remember when I have to use it.

    This can be concisely summed up as "doesn't support C99", really, because all other things that you list are the consequence of that. When VC is compiling in C mode, it can be very pedantic about being a C89 compiler - heck, it doesn't even support // comments then. About the only thing you have from C99 is stdint.h.

    For all intents and purposes, it really is a C++ compiler, with C support being more or less a legacy feature.

  49. Re:And showing every bit of its age too, apparentl by phantomfive · · Score: 1

    And it's really frustrating when I'm trying to write code which is portable (which is most of the time when I write C) because then I'm basically forced to stick to the lowest common denominator. I wish they would support some of these 12 year old features, some of which would take a day or two to add.

    --
    "First they came for the slanderers and i said nothing."
  50. Re:And showing every bit of its age too, apparentl by shutdown+-p+now · · Score: 1

    The way things are, basically, 90+% of native code written for Windows is C++ and not C - and hence C++ gets priority. And there's plenty undone in that department as well, particularly now that C++11 is out - VC++ has a few cherry picked features from there since v10, but it's starting to lag behind GCC now, and needs to catch up fast. Those precious few dev resources the core compiler & library team gets, they throw at C++ again to move ahead of schedule - e.g. they didn't originally intend to implement C++11 range-for statement, but it happened because a few people from different teams got together and basically pooled their free time to make it happen.

    Simply put, it's something which would not matter to most users of the product, and it's also not something that many people internally feel passionately about to push for it despite objections. So it's not going to happen, unless there is some sudden surge in demand for C99 from the user base.

  51. Re:And showing every bit of its age too, apparentl by phantomfive · · Score: 1

    True, but adding // comments would take 10 minutes (assuming you know the code), and giving the ability to declare variables wouldn't take long either.

    Anyway, range-for loops are good too. But let's be honest, is there any reason a company with Microsoft's resources can't keep up with gcc?

    --
    "First they came for the slanderers and i said nothing."
  52. Re:And showing every bit of its age too, apparentl by Anonymous Coward · · Score: 0

    The following list shows the microprocessor families supported in Windows CE .NET

  53. Re:And showing every bit of its age too, apparentl by shutdown+-p+now · · Score: 4, Informative

    True, but adding // comments would take 10 minutes (assuming you know the code), and giving the ability to declare variables wouldn't take long either.

    You forget about all the associated red tape. Even a minor feature has to be tested, and some QA ultimately has to sign off for that. It also has to be documented by tech writers, complete with code samples, and said documentation to be translated to all supported languages (I believe over a dozen now for VS). Any associated user-visible output (e.g. new errors/warnings) also has to be proof-readed and translated. It all adds up.

    But let's be honest, is there any reason a company with Microsoft's resources can't keep up with gcc?

    It can, if that were the goal. But the ultimate goal is to earn money, same as for any other for-profit company. Hence, things aren't done because they are neat or the Right Thing or because everyone else has them. They're done because the expected profit from the feature - whether direct (from sales of the product) or indirect (from sales of other products propped up by the SDK, like, say Windows) - exceeds expenses. Even more importantly, resources being large but still limited, for every feature the question is not whether it is profitable in and of itself, but whether it is more profitable than something else that could be implemented in its place. It's that stack ranking that really kills C99 support - there's always something more important (read: more profitable).

    Of course, people aren't cogs, and sometimes they feel hard enough about something - purely out of the desire to do the Right Thing - that they play bureaucracy games to come up with a plausible "business case" for their favorite cause, and ultimately convince the management that calls shots to let them put it in. But, there's no-one there who feels hard about C99 (or at least harder than a dozen other things that need to be done first, preferably yesterday - like, say, variadic templates...)

  54. Re:And now it's time to bow out gracefully by peppepz · · Score: 2
    What's funny is that people keep saying that the extremists are the GNU supporters, because the license they use has a political stance and whatnot. Look at this discussion - one third of the comments are from BSD fans hijacking a discussion about GCC to promote their own thing.

    Long live GCC, IMHO the major reason why we no longer pay for compilers as we used to.

  55. Re:And showing every bit of its age too, apparentl by pankkake · · Score: 2

    LLVM/Clang is a very interesting project, it's sad it's gaining traction because of GPLv3 haters/fanboys/etc. and not because of its qualities. I fear their actions might even harm it, i.e. users and developers could stop being interested in it being the better compiler as long as it's "more open" (lol).

    --
    Kill all hipsters.
  56. Re:And showing every bit of its age too, apparentl by TheRaven64 · · Score: 2

    As the other poster pointed out, clang does not support OpenMP. If your code uses OpenMP, then this is a very serious limitation. It means that your code will execute on a single thread with clang, but on multiple concurrent threads with gcc. If your program doesn't make use of OpenMP, then this benchmark is highly misleading.

    Oh, and if your code does use OpenMP, the odds are that Path64 will be significantly faster than gcc.

    The other poster mentioned blocks. I just did some work on Solaris support in LLVM and clang for a customer for exactly this reason. They wanted to use blocks with libdispatch, because it lets them scale their code up very easily to a lot of cores. GCC doesn't support blocks at all. Clang didn't support Solaris at all. Getting clang, LLVM, and libc++ all working on Solaris was a lot easier than adding blocks support to GCC would have been, so now they're using this stack.

    --
    I am TheRaven on Soylent News
  57. Re:And showing every bit of its age too, apparentl by TheRaven64 · · Score: 1

    The depressing thing is that C99 support actually used to be better in the Microsoft compiler. Most of the C99 features that people want are also C++ features. Old versions of the compiler used to compile C as C++ with a few things disabled, so you got a fairly good approximation of C99 (BCPL comments, variables declared anywhere including for loops, inline, although with the Microsoft definition not the C99 definition).

    --
    I am TheRaven on Soylent News
  58. Re:And showing every bit of its age too, apparentl by TheRaven64 · · Score: 1

    GCC can't support SEH because it's patented (although I think the patent expires next year). Win64 supports a new exception model that isn't patented and is quite similar to the DWARF exceptions used on *NIX platforms (although just different enough to be irritating). Support for it is underway in LLVM, so I'd imagine GCC will support it eventually too.

    --
    I am TheRaven on Soylent News
  59. Re:And showing every bit of its age too, apparentl by TheRaven64 · · Score: 1

    That said, it will only produce PE binaries for those platforms. If you want to produce ELF binaries... good luck.

    --
    I am TheRaven on Soylent News
  60. Re:And showing every bit of its age too, apparentl by Chryana · · Score: 1

    Yes, I agree that it looks interesting. I just hate it when someone repeats the same thing again and again in a discussion, when it's not in every discussion he goes. I'm fine with discussing the merits of LLVM, this looks like the appropriate place for it. I just don't want to read the same discussion four or five times because one person ignores what has been said on the topic and just repeats his original message.

  61. Re:And showing every bit of its age too, apparentl by Brian+Feldman · · Score: 0

    Clang is fine. I often find it producing much faster binaries than GCC. Perhaps, instead, it is your own code that sucks, not any compiler?

    --
    Brian Fundakowski Feldman
  62. Re:And showing every bit of its age too, apparentl by TheRaven64 · · Score: 2

    Almost certainly. The big problem for compiler writers today is that measuring performance is insanely hard. Things that improve microbenchmarks will often make code slower overall. A simple example is inlining, which can come with some huge benefits. If you inline a function, then you can do more optimisations across the result, and you avoid the cost of the call, but you increase the code size. You run the result, and it's faster, but now it's using 20% of your instruction cache instead of 5%. Fine? Well, now you run it on the same system that's running some other things as well, and now it's getting an instruction cache miss 1% of the time, when previously it would have no cache misses. If your cache miss penalty is 100 cycles, then you're code is now half the speed it was (a 100 cycle penalty every 100 instructions, assuming an average of one instruction per clock, which is pretty pessimistic for a modern CPU) so those optimisations had better have been worth it...

    --
    I am TheRaven on Soylent News
  63. Re:And now it's time to bow out gracefully by TheRaven64 · · Score: 1

    If it's really better then GCC will eventually fall out of development naturally

    Eventually can be a long time. For C and C++, there's really not much in it. Clang is nicer to work with as a developer because it provides much better error messages and nicely integrates with your editor of choice (vim, emacs, and eclipse plugins exist) for code completion, but for code generation an end user is unlikely to notice the difference, and even someone running benchmarks is likely to conclude that there's rarely more than 5-10% in it either way.

    For Objective-C, there is a massive difference. Clang generates much better code and supports a much newer version of the language. GCC's Objective-C support is positively archaic. It doesn't support (on non-Apple platforms), off the top of my head:

    • Blocks
    • Non-fragile instance variables
    • Instance variable definitions in implementation contexts
    • Automatic reference counting
    • New collections syntax
    • New number-object syntax

    And yet people packaging GNUstep for Linux distributions still insist on compiling it with gcc, even though that disables a number of features that can't be correctly implemented with the old version of the language.

    --
    I am TheRaven on Soylent News
  64. Re:And showing every bit of its age too, apparentl by bgat · · Score: 1

    ARM licensed technologies for architectures v4, v4T, Thumb, v5TE, and Intel XScale.

    All of which are pretty out-of-date versions of the ARM instruction set architecture. Obsolete, even.

    GCC, on the other hand, supports all the modern ARM instruction set versions. Optimizes specifically for them upon request, even.

    --
    b.g.
  65. Re:And showing every bit of its age too, apparentl by celocanth · · Score: 1

    Time to take it out back and shoot it.

    What he said.

  66. Re:And showing every bit of its age too, apparentl by Jorl17 · · Score: 1

    ReactOS struggled with SEH, but they found a way.

    --
    Have you heard about SoylentNews?