GCC 4.8.0 Release Marks Completion of C++ Migration 269
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."
Nice new feature (Score:5, Interesting)
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)
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)
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)
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)
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)
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).