Taras Glek wrote:
While developing my plugin I've noticed that many callbacks need to be guarded with "if (errorcount)" or the plugin will cause a gcc crash due to receiving less complete data than it expected.

Should the plugin API guard callbacks in invoke_plugin_callbacks() to avoid 99% of plugins running into this issue?


I am not sure this should be a fixed, wired (ie built-in) policy. One could imagine some plugins whose main role is precisely to issue additional errors (and IIRC, your TreeHydra did something similar to that).

Maybe we should just fix the documentation, saying that plugins should care (and plugin writers should think of) previously detected errors.

Maybe we might differentiate errors found by other passes and error found by plugins.

Maybe we should also extend the API so that some plugins get disabled when errorcount is >0. I tend to believe it should not become a general policy (but at least tunable plugin by plugin) but I may be wrong.

Regards.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to