|
|
Subscribe / Log in / New account

What's new in GCC 4.5?

What's new in GCC 4.5?

Posted May 15, 2010 5:08 UTC (Sat) by arief (guest, #58729)
In reply to: What's new in GCC 4.5? by pr1268
Parent article: What's new in GCC 4.5?

I would second this.

C "bugs" of taking-everything-programmers-throws-at-it is actually a "features".

A feature that force developers to think very carefully of what they are trying todo. Having to thought it for 5 times of whether it is possible to free up a pointer. Check a million times for dangling ones.

C is easy to comprehend and hard to master. While C++ is hard to understand and hard to master.


to post comments

What's new in GCC 4.5?

Posted May 15, 2010 10:28 UTC (Sat) by nix (subscriber, #2304) [Link]

Your implication here is that the GCC developers are trying to go to C++ because they haven't mastered C. Nothing could be further from the truth. GCC uses every C coding trick going and then some (with one single exception: no tricks relying on GCC extensions are used in the middle-end or C frontend because they must be compilable with non-GCC bootstrap compilers, and no tricks that bootstrap compilers choke on are allowed there either, which is why everyone hated trying to bootstrap with the horrible HP-UX 10 bundled C compiler). The language it's written in uses so many elaborate macros it's barely even C anymore (in this it is similar to many other large C projects). And that's the problem: many of these macros are intrinsically non-typesafe, and bugs *do* crop up as a consequence of this.

Regarding the 'free up a pointer' thing, well, this proved so intractable to get right for GCC (where many objects have extremely hard-to-describe and interacting lifetimes crossing many passes) that it ended up with a garbage collector simply to lift the burden of manual memory management from the developers; it is not known how many bugs this fixed, but it was surely a lot. (Some heavily-used objects have since been shifted back from GC for speed reasons, but it's a case-by-case judgement whether to *not* garbage-collect, rather than vice versa.)

What's new in GCC 4.5?

Posted May 15, 2010 14:57 UTC (Sat) by HelloWorld (guest, #56129) [Link]

<blockquote>C "bugs" of taking-everything-programmers-throws-at-it is actually a "features".</blockquote>
This is *exactly* the kind of *bullshit* that keeps the same bugs happening over and over again in C programs.

Good programmers think about their code anyway, but no matter how good they are, they *will* make silly mistakes, and if the compiler (or whatever else) catches those, then that is a Good Thing.

What's new in GCC 4.5?

Posted May 17, 2010 8:10 UTC (Mon) by mpr22 (subscriber, #60784) [Link]

>A feature that force developers to think very carefully of what they are trying todo. Having to thought it for 5 times of whether it is possible to free up a pointer. Check a million times for dangling ones.
And get a Schrödinbug when you (almost inevitably) miss one.

I like C. I like C++. I am not so enamoured of either to call it a flawless or even merely universally superior choice in all problem spaces.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds