3 ms·
If it was a week or two ago, the quiz was probably from the same person as this article. He's not just doing it for fun; he's a professor at the University of
by rcfox 14y ago
If it was a week or two ago, the quiz was probably from the same person as this article.
He's not just doing it for fun; he's a professor at the University of Utah, and he's researching this area, looking for bugs in compilers. In fact, he's developed a tool for this: http://embed.cs.utah.edu/csmith/ http://embed.cs.utah.edu/csmith/
These tiny bits of strange code are condensed versions of what you might see in the wild, especially after preprocessing.
Nobody's doing ++x > y, but they do something that looks reasonable like foo(x) > bar(x), where foo() and bar() return chars.
- nitrogen 14y agoNobody's doing ++x > y, but they do something that looks reasonable like foo(x) > bar(x), where foo() and bar() return chars. I might write something like "++x > y"; preincrement followed by comparison is a common operation.