-void parser_print_prefix_pos(source_position_t);
-void parser_print_warning_prefix_pos(source_position_t);
-void parse_warning_pos(source_position_t, const char *message);
-void parse_warning_posf(source_position_t, const char *fmt, ...);
+# if defined(_MSC_VER)
+# define NORETURN void __declspec(noreturn)
+# endif /* defined(_MSC_VER) */
+
+/* If not set above, use "void" for DOES_NOT_RETURN. */
+# ifndef NORETURN
+# define NORETURN void
+# endif /* ifndef NORETURN */
+#endif /* ifndef NORETURN */
+
+void diagnosticf(const char *fmt, ...);
+void errorf(source_position_t pos, const char *fmt, ...);
+void warningf(source_position_t pos, const char *fmt, ...);
+NORETURN internal_errorf(source_position_t pos, const char *fmt, ...);
+
+extern unsigned diagnostic_count;
+extern unsigned error_count;
+extern unsigned warning_count;
+
+/* true if warnings should be inhibited */
+extern bool inhibit_all_warnings;