News for hackers. Stuff that matters.
Re:C Language Quirks by silentbicycle on Thursday May 06, 2010 @11:27PM (#1326622)
For far more of same, there's Koenig's _C Traps and Pitfalls_. Heck, the article (http://www.literateprogramming.com/ctraps.pdf) that grew into the book is even free online.

Also, for anybody doing modern C work, I strongly recommend both Hanson's _C Interfaces and Implementations_ and Ierusalimschy's _Programming in Lua_, 2nd ed. The former nails writing good C libraries, and the latter covers one particular library that provides a portable, C-friendly, mature, efficient (http://luajit.org/), ready-made scripting language that is a cleaner incarnation of JavaScript's "good parts".

Also, both are good reading. The former is a shining example of literate programming, and the latter is IMHO one of the best programming texts that wasn't co-written by Brian Kernighan. :)

Re:C Language Quirks by silentbicycle on Friday May 07, 2010 @07:51AM (#1327275)
("Also, also"? Oops. Missed that before the edit window closed.)
Re:C Language Quirks by tgerhard on Friday May 07, 2010 @09:53AM (#1327557)
How refreshing!!

As an editor, I must say that it warms my heart to know that someone out there actually proofreads his comments. Bravo!

Also, thanks for the C Pitfalls link. It will prove quite useful in my current project. The original article isn't too bad, either.

Re:C Language Quirks by CountHackulus on Friday May 07, 2010 @11:33AM (#1327846)
I work on a compiler, I agree, there's some weird behaviour that's possible, but a lot of the things he's described are implementation defined. There are general conventions, but things like shifting values more than double their size is implementation defined.

If you really want to get a good handle on C, there's nothing like reading the spec.

Re:C Language Quirks by grogers on Friday May 07, 2010 @10:32AM (#1327677)
The common theme in almost all of these are:

1) implicit integer promotion causes hard to find errors 2) operator precedence is non-intuitive (just use parens anyways!)