An unexpectedly confusing typo:
I tried to run a program under gdb, but found it had no debugging symbols. Recalled the compile command, added '-g -O0' to the end, hit Return, tried again. _Still_ no debugging symbols. What went wrong?
Turned out I hadn't hit Return after all. I had hit Alt+#. Presumably, # because it's right next to Return, and Alt because I hadn't quite let go of it from some previous readline keystroke.
Alt+# invokes a bash readline command that _comments out_ the entire line of shell input, by inserting # at the start and then behaving as if you'd pressed Return to enter the line. So instead of entering a compile command, I'd entered a comment, and so the executable file had not been rewritten.
And of course I had been _expecting_ no output from the compile command, and also expecting it to complete more or less instantly (because it was a tiny test program), so the only clue I could have spotted was the # appearing at the front of the command when I entered it, and until I noticed that, I was completely baffled!