> This patch makes it possible to suppress the function-name display in > a straightforward way: it adds a new global which the plugin can set > to declare the name of the dummy function. > > This patch seems like a bit of a hack, but there didn't seem to be a > notably cleaner approach.
Can't you override the diagnostic_starter() in your plugin? This way you can even customize it to print "gdb" in the prefix (if you wish to provide a custom prefix). If that is possible, that seems way cleaner. If not, I wonder why not. Otherwise, why not override the lang_hook itself? This way the plugin can provide its own lang_hook so that your proposed c_print_error_function lives in the plugin itself. I'm probably missing something obvious here. Cheers, Manuel.