Mark Shroyer personal blog

Both true and false: a Zen moment with C

I ran into a really fun bug at work yesterday, where I discovered that my C program was branching down logically inconsistent code paths. After drinking another cup of coffee and firing up GDB I realized that somehow, a boolean variable in my code was simultaneously testing as both true and not true.
Points
177
HN comments
51
Submissions
1
Cited by
4 commenters

Programming LanguagesSoftware Engineering2012

On Hacker News

SubmittedTitle on HNPointsComments
Jun 27, 2012Both true and false: a Zen moment with C by Niten17751

Cited in comments

Linked from 4 Hacker News comments by 4 different people, from Aug 2014 to Nov 2022.

Most recent:

Search every comment that links here →

More from Mark Shroyer

All 2 posts →

Related posts from the same era