Cpp: Use directive_* functions for #error and #warning. Replace the hard-coded special cases for #error and #warning with use of the new generic directive_* API. This should make the code easier to read, and reduces code-duplication somewhat.