There has been recent discussion on the gcc mailing list about plugins. There was a very interesting paper at the last gcc summit about a plugin architecture, with some interesting examples.
I think plugins would be a useful addition to gcc. I think this mainly because many researchers and grad students want it. After many years, gcc is finally getting some traction in the compiler research community. That can only be a good thing for gcc, as it means that more people will learn gcc internals in school and be able to make useful contributions.
Plugins are also useful for people with special needs, like special gcc warnings or the more general case of static analysis. This is code which may not be appropriate for mainline gcc, but is still useful for a subset of the gcc user population.
The people opposed to plugins argue that it will make it too easy to extend gcc in a proprietary way. I think this is a red herring. It is already easy to extend gcc with proprietary code. Plugins will not make that more legal under the GPL, and they won’t make it significantly easier–the hard part is writing the code, not attaching it to gcc.
Plugins do make it easier to distribute those proprietary extensions, but I still think it is a red herring. There are no secrets in the compiler field; it’s not as though anybody can claim some sort of special advantage by keeping their plugin proprietary. And there is no money in the compiler field; nobody can become rich by selling their proprietary plugin, even if that were legal.
The decision as to whether to permit plugins is one about costs and benefits. The costs are low. The benefits are unknown but potentially high. To me the decision is a no-brainer. I’ve been surprised by the opposition I’ve seen on the gcc mailing list.