A misunderstanding that I sometimes run into when teaching programming is that the compiler can and should guess what the programmer means. This isn’t usually quite what people say, but it’s what they’re thinking. A great example appeared in a message sent to the avr-gcc mailing list. The poster had upgraded his version of GCC,… Continue reading The Compiler Doesn’t Care About Your Intent
[ This post was co-written with Nigel Jones, who maintains an excellent embedded blog Stack Overflow. Nigel and I share an interest in volatile pitfalls in embedded C/C++ and this post resulted from an email discussion we had. Since we both have blogs, we decided to both post it. However, since comments are not enabled… Continue reading C and C++ Make It Hard to Read a Register for Its Side Effects
Science fiction explores the effect of technological progress on society. It is ironic, then, that the majority of SF authors miserably failed to predict the impact of computers and information technology. Why does Google return no meaningful hits for “computer science fiction?” Is it not obvious that this term needs to exist, if we wish… Continue reading Computer Science Fiction
This morning I reported the 200th bug found by our compiler testing tool. It is a new way to crash GCC. The failure-inducing input is not pretty so I won’t give it here, but it can be found in GCC’s bugzilla. Although the testing tool is now entirely developed by some excellent PhD students, I… Continue reading 200 Compiler Bugs
Some excellent resources exist about how to write a good systems paper. This post is about a slightly different topic. In a typical recent year I review about 100 papers, mostly conference papers 8-14 pages long in 9 or 10 point font. People in similar positions — mid-career computer systems professors — are generally in… Continue reading How to Evaluate a Computer Systems Research Paper
The volatile qualifier in C/C++ is a little bit like the C preprocessor: an ugly, blunt tool that is easy to misuse but that — in a very narrow set of circumstances — gets the job done. This article will first briefly explain volatile and its history and then, through a series of examples about… Continue reading Nine ways to break your systems code using volatile
It’s common for a computer program to display behavior seemingly unrelated to its source code. Additionally, programs written in C/C++ frequently change their behavior when the compiler optimization options are changed. This post is a quick guide to figuring out if the compiler is at fault. This post was motivated by a blog post by… Continue reading Is That a Compiler Bug?