Just for my curiosity's sake, would you mind posting the code you tried that segfaulted?
From the article, about the C version: "Mine hadn't worked, which I suspect is some sort of compiler issue."
Yeah I'm going to go out on a limb and proclaim that there's no way this was due to a compiler "issue" in gcc. Not that gcc is perfect, but there's no way it is barfing on one of these handful of line programs that does nothing but some logical operations and printfs.
Parts of the blog post was written late last night (about 3 am), and parts of it was written on my commute to work. I tried to rewrite what I wrote last night and tried to compile it on my work computer, and all I got were warnings.
So... can't recreate. Sorry