Forgot your password?
typodupeerror
GNU is Not Unix Programming News

GCC 4.8.0 Release Marks Completion of C++ Migration 269

Posted by Soulskill
from the gnu-and-shiny dept.
hypnosec writes "GCC 4.8.0 has been released (download), and with it, the developers of the GNU Compiler Collection have switched to C++ as the implementation language, a project the developers have been working for years. Licensed under the GPLv3 or later, version 4.8.0 of the GCC not only brings with it performance improvements but also adds memory error detector AddressSanitizer, and race condition detection tool the ThreadSanitizer. Developers wanting to build their own version of GCC should have at their disposal a C++ compiler that understands C++ 2003."
This discussion has been archived. No new comments can be posted.

GCC 4.8.0 Release Marks Completion of C++ Migration

Comments Filter:
  • Nice new feature (Score:5, Interesting)

    by EvanED (569694) <evaned&gmail,com> on Friday March 22, 2013 @06:34PM (#43252521)

    From the changelog: "A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0."

    This actually sounds really attractive to me... I'll have to try it out.

  • Re:chicken or egg? (Score:4, Interesting)

    by demonlapin (527802) on Friday March 22, 2013 @06:57PM (#43252755) Homepage Journal
    Dave Gingery's books [gingerybooks.com] will get you a machine shop. That's a good start. (The first thing you build is a charcoal foundry. The second is a lathe.)

    There are also blacksmithing groups where you can learn how to make things with iron. Presumably any post-apocalyptic society will have ample supplies of scrap iron to work with.
  • Does it dance yet? (Score:3, Interesting)

    by Anonymous Coward on Friday March 22, 2013 @07:06PM (#43252831)

    From Wikipedia:

    > LLVM was originally intended to use GCC's front end, but GCC turned out to cause some problems for both the LLVM developers and Apple. GCC is a large and somewhat cumbersome system to develop; as one long-time GCC developer put it, "Trying to make the hippo dance is not really a lot of fun"[7] and a Google Summer of Code intern commented, "Reading GCC codebase has been a hard exercise for me. In fact it's the only project I know of that becomes more and more difficult as time passes."[8]

    I'm just wondering, is this still the case? It sounds like they haven't changed much of anything, merely ported their codebase to C++. Am I correct in assuming that the above is still true or is this new version supposed to usher in a new era of GCC prosperity and usability on things other then the command line?

  • Re:chicken or egg? (Score:5, Interesting)

    by Greyfox (87712) on Friday March 22, 2013 @07:20PM (#43252947) Homepage Journal
    Back in '87 in my assembly language class, which was on some ancient DEC machine (Think it was a PDP 11-03 or something,) our instructor gave us all a sheet with the bootstrap code we had to type in, in octal, to make the system jump to the OS instructions on our 8" floppy disks. He showed us how to use a table in our assembly language book to convert assembly code to machine code by hand. If all you're looking at is a slab of iron (Arrhn!) that's where you start! It's a little intimidating imagining having to start with nothing but a table of opcodes and a slab of raw iron that you can enter bits into somehow. I'd think you'd want a basic program loader, so you could save the assembler that you carve out of opcodes. Once you have your assembler stored on disk, you can write your initial C compiler (Not the standard library mind you, just the compiler!) At some point along the way, you compile EMACS.

    Of course, all those pokes in the back of Compute! magazine were really just hand-converted machine instructions to be stuffed into specific areas of memory, but I didn't realize that at the time. I forget exactly when I finally made that association. I think it was during that assembly class; I was like "Oh, the number is just an opcode! Derp!" I probably could have squeezed a lot more interesting stuff out of my first computer (A TI 99/4A) if I'd know that at the time.

  • Re:chicken or egg? (Score:5, Interesting)

    by demonlapin (527802) on Friday March 22, 2013 @10:07PM (#43254093) Homepage Journal
    I remember seeing a pretty cool 8080 program to zero memory. It went something like:
    LXI BC, 0000
    LXI HL, 0009
    LXI SP, 0008
    PUSH BC
    PCHL
    HL, BC, and SP (the stack pointer) are all 16-bit registers, and the first three instructions occupy 0x0000-0x0008 in memory. PUSH BC is one byte at 0x0009, and PCHL (another one-byte instruction) sets the program counter to the value of HL; essentially it allows you to jump to the address contained in the HL register. The PUSH operation decremented the stack pointer before storing each of the bytes, so you would set the stack pointer to one higher than the highest address you wanted to overwrite. Because the 8080 was little-endian, address 0x0008 was the upper byte of the third instruction's numeric value - it was already zero (if it were big-endian you could just throw in a NOP to get it to align properly). The final PUSH operation - after the program had cycled through all of memory - wiped out the PUSH BC and PCHL operations, and the computer would go to all NOPs.
  • Re:chicken or egg? (Score:4, Interesting)

    by dryeo (100693) on Saturday March 23, 2013 @12:45AM (#43254799)

    You need to compile this compiler with a compiler which begs the question....

    Sigh. It raises the question. To "beg the question" means something completely different. Here is a simple rule of thumb of when that phrase should be used: never.

    Nice comment.
    Language evolves. This makes it nice and raises the question of what I mean by "nice comment" From http://etymonline.com/?term=nice [etymonline.com],
    nice (adj.) Look up nice at Dictionary.com
            late 13c., "foolish, stupid, senseless," from Old French nice (12c.) "careless, clumsy; weak; poor, needy; simple, stupid, silly, foolish," from Latin nescius "ignorant, unaware," literally "not-knowing," from ne- "not" (see un-) + stem of scire "to know" (see science). "The sense development has been extraordinary, even for an adj." [Weekley] -- from "timid" (pre-1300); to "fussy, fastidious" (late 14c.); to "dainty, delicate" (c.1400); to "precise, careful" (1500s, preserved in such terms as a nice distinction and nice and early); to "agreeable, delightful" (1769); to "kind, thoughtful" (1830).

The sooner you fall behind, the more time you have to catch up.

Working...