3 ms·
This one has bit me twice in the past 35 years. I have some program I'm working on, doing the usual edit/compile/run/debug cycle. At some point I decide to com
by tasty_freeze 4y ago
This one has bit me twice in the past 35 years.
I have some program I'm working on, doing the usual edit/compile/run/debug cycle. At some point I decide to compare two versions of some section of code, so I write out temporary files of the old section named "old" and the new section named "new". Then compiles start failing, but oddly it is a file that I haven't edited recently.
The issue is that some code (not necessarily even mine) has an "#include <new>" and it is picking up my temporary file named "new".
- gpderetta 4y agoOne of the most odd issues I have encountered was a test case that would fail if one random log line was deleted (which would normally means UB or timing issues) but, wildly, not when the log line was commented out. Turns out it was interaction between the use of __LINE__ in a macro to generate unique identifiers and a violation of the One Definition Rule.
- hermitdev 4y agoHeh. If I had a nickel for every time I shot myself in the foot over the years by dropping a temporary file named "test.py" somewhere... I'd don't know about rich, but I'd probably at least be able to buy myself a coffee.