The stuff that didn't fit in anywhere else is documented here.
Controls whether a final newline is enforced when the file is saved. The value is an association list that for each language mode specifies the value to give to
require-final-newline(see Saving Buffers) at mode initialization. If a language isn't present on the association list, CC Mode won't touch
require-final-newlinein buffers for that language.
The default is to set
tin the languages that mandate that source files should end with newlines. These are C, C++ and Objective-C.
Note however that CC Mode doesn't make any special effort to check for syntactic errors; that's the job of the compiler. The reason it can report cases like the one above is that it can't find the correct anchoring position to indent the line in that case.