While I was setting up my new machine, I had to rebuild
aspell. The last time I did that it built without any problems. This time, despite the fact that it was the same version as before, there were several fatal errors. I asked DuckDuckGo what it knew about the matter and it referred me to this stackoverflow question.
The answer is correct but it's not very clear where you have to apply the fixes. For the record, the error is in
interfaces/cc/aspell.h in the section marked “errors” that starts on line 237. Just comment out the entire section with
#ifndef __cplusplus …
lotsoffreetime suggests in the stackoverflow post.