Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Programming GNU is Not Unix Open Source Upgrades

LLVM Clang Compiler Now C++11 Feature Complete 291

An anonymous reader writes "With the latest development work on Clang ahead of the release of LLVM version 3.3, Clang is now C++11 feature complete. The last remaining features of the ISO C++11 feature specification have been implemented. C++11 support for GCC is also more or less complete."
This discussion has been archived. No new comments can be posted.

LLVM Clang Compiler Now C++11 Feature Complete

Comments Filter:
  • Thank you, Apple! (Score:5, Insightful)

    by Anonymous Coward on Saturday April 20, 2013 @10:28AM (#43503421)

    Regardless of what you may personally think about Apple, they have made some very valuable contributions to LLVM and Clang. So I just want to say, thank you, Apple. Your generosity has touched my heart, and made C++11 a reality.

  • BSD (Score:2, Insightful)

    by BasilBrush ( 643681 )

    One of the great things about Clang and LLVM are they are BSD licensed rather than GPL.

    • Re: (Score:2, Insightful)

      by Microlith ( 54737 )

      So are you seriously trying to start this flamewar again? Do you have nothing else to say?

    • Indeed. I'm a bigger fan of the GPL in most cases, but there is room enough in the world for both camps (crazy talk, I know). Now you have your compiler under a suitable license for you and your fellow travelers.

    • GPL is probably a better license for a compiler, if only because it prevents the stupid proliferation of proprietary extensions that have plagued the compiler market.

      • The GPL might encourage that, in theory, but it doesn't in practice. For example, take every MIPS vendor ever. They start with GCC, and then hack it up to support their extensions. In the process, they break every other MIPS target, so their extensions are never pushed upstream. They ship their GCC version to their customers, who are then stuck with an old implementation, with support for old language dialects. This is even worse for supercomputers, with a typical operational life of a decade or so. T
        • by AaronW ( 33736 )

          I work for a MIPS vendor (Cavium) and I know we push almost all of our extensions upstream and we ship very recent versions to customers. We're currently shipping 4.7 to customers. This includes support for the Cavium OCTEON proprietary assembly instructions as well (encryption, hashing, load/store indexed and atomic instructions). There is a lot of active GCC development where I work and in fact we are looking for more GCC developers for both MIPS and ARM.

          Similarly we work hard to push all of our stuff ups

    • Re:BSD (Score:5, Insightful)

      by thatkid_2002 ( 1529917 ) on Saturday April 20, 2013 @10:50AM (#43503545)
      I can't see the harm in a compiler being GPLed. In fact, GPLing a compiler makes sense because it is a tool where users rights (distributing freely, mainly) are important and where contributing back optimisations is useful and important.
      What exactly is the advantage of a BSD license for a compiler?
      • You can freely distribute clang. You can contribute back to clang. It's probably easier to contribute back since the code isn't a monolithic mess.

        It makes no difference to me as a user whether my compiler is GPL or BSD licensed. But those license decisions affect the compiler architecture which affects the compiler. Clang/LLVM are modular for technical reasons. They don't care if you "steal" a component. GCC is monolithic for political reasons. RMS is afraid you'll use it without giving back. What

        • GCC is monolithic for political reasons. RMS is afraid you'll use it without giving back.

          How does the design of GCC prevent anyone from *using* it without giving back?

      • Re:BSD (Score:5, Interesting)

        by pavon ( 30274 ) on Saturday April 20, 2013 @11:45AM (#43503917)

        Well the GPL specificly isn't a problem here, however it is really nice to have an alternative to GCC that actually encourages and facilitates reuse of their code rather than one that puts up deliberate obsticles to reuse even by other free software projects.

        One of the big reasons that CLang was created was because there were some free software developers that wanted to integrate high quality front-ends (parser, etc) into other projects like IDEs, LLVM, and such. They prefered to work together with GCC to share the effort, but GCC refused. They were so paranoid about proprietary applications using GCC code that they refused to seperate the front-end into a GPL library that GPL applications could use. Their rational was that someone could easily write a GPL wrapper application around that GPL library that just serialized the data to/from a text representation, which could then be legally used with a proprietary application. In their mind, it was more important to make it difficult for proprietary applications to use their code than to make it easy for free software to use their code.

        So LLVM was forced with the decision to either fork GCC or write their own. GCC was never designed with front-end modularity in mind, and a lot of changes would be necessary to do so. Once that massive refactoring was complete, it would be difficult to share improvements between the two codebases. Between that and some compelling technical reasons they chose go write their own and CLang was born.

      • For Apple it started to matter as soon as GCC went to the GPL 3.0. They didn't want to be at risk of giving out their patents, so they switched to CLANG, which is BSD, since they were modifying the compiler.

        For most of us it doesn't matter at all.
  • It would be so nice if they added OpenMp support. It's an awesome compiler, but due to lackin OpenMp currently not so suitable for cross-platoform number-crunching.
    • It's being worked on. There are patches from Intel that add support, but they're currently under review. There was a big discussion at the last LLVM DevMeeting about the correct way to add support. GCC adds the calls to the OpenMP runtime library very early on in the compile pipeline, which destroys a lot of potential optimisation opportunities. The goal with LLVM is to preserve the parallel loop structure through optimisations and then insert the calls out to the runtime library much later on.
  • by goombah99 ( 560566 ) on Saturday April 20, 2013 @10:46AM (#43503511)

    How can something be more Complete? I can understand less complete. Does this imply knowledge of the future?

  • Like, has a new edition of The C++ Programming Language come out to reflect C++11, and all of its changes? Or are the only complete specifications purely online?
    • by Fei ( 471738 )

      The fourth edition of The C++ Programming Language with c++11 coverage will come out next month. (ISBN: 978-0321563842)
      There are already general books on c++ that cover the new standard, like C++ Primer 5th edition.

  • The standard specifies compiler behavior and the run-time library behavior. I know GCC has been pretty up to date with respect to the language features, but there are still some "Partial" and "No" entries in the run-time library implementation's C++11 status [gnu.org]. Is Clang's library implementation complete with respect to the C++11 standard?

Today is a good day for information-gathering. Read someone else's mail file.