On Wed, Oct 28, 2009 at 8:34 PM, Basile STARYNKEVITCH <bas...@starynkevitch.net> wrote: > Hello All > > Rafael Espindola wrote: >>> >>> I have a concrete example here: plugin-specific pragmas (see >>> PLUGIN_REGISTER_PRAGMA on http://gcc.gnu.org/wiki/plugin%20hook for >>> details) >>> >>> I have two imaginary use cases here. >> > > There are not so imaginary. I am sure I will need plugin specific pragmas in > 2010. I explained why. But I also told that it is more than one man-year > effort to exhibit a realistic plugin needing PLUGIN_REGISTER_PRAGMA > > >>> People won't even bother to make plugins if they >>> > feel the set of hooks is blantly unsufficient. [They will either >>> > experiment on their own GCC branch, or avoid GCC entirely, for instance >>> > using LLVM instead]. But working on one's branch is much more painful >>> > than coding a plugin! >> >> I don't see a chicken and egg problem. Your work on making the GC >> accessible to plugins is a good example why it is not :-) > > Honestly, the [enormous in my view] effort I did make to push that GGC > related features into the trunk have been disproportionately important > w.r.t. the result. My work on GGC plugin events is precisely a good example > of why I need to anticipate my plugin needs. > > >> Sorry, the point is precisely that they should be concrete :-) >> >> If you are actually coding a plugin and get to the stage "ok, now I >> need a new hook", please send a patch adding the hook and a >> description of what the plugin is trying to do. > > > You are forgetting an important point in GCC. > > The majority of GCC users won't compile GCC. Actually, I have concrete > experience that most GCC users are not even able (that is willing to make > the effort) to compile it. They will use a GCC in some distributed *binary* > form (e.g. the gcc-4.5 package of some future Ubuntu, Debian, ... > distribution, released in mid 2010). > > So in christmas 2010, a recently released Ubuntu contains the gcc-4.5 > package (the compiler) and the gcc-dev-4.5 package (enough to compile a gcc > 4.5 plugin). > > Now I (Basile) have developed a plugin by that time which will use a > PLUGIN_REGISTER_PRAGMA. If I requires its users to compile a gcc-trunk > (since only after mid 2010 will I be able to really demonstrate a valid use > of PLUGIN_REGISTER_PRAGMA), nobody -I really think not a single person- will > use my plugin. If my plugin runs on a standard 4.5 binary distribution of > gcc, I might have a few users! > > > I really think we should add more plugin hooks *now* for gcc-4.5. They > really cannot wait the future 4.6 release (in 2011, 2012?), especially since
I don't agree at all. Also I have the feeling that plugins will in the end result in less developers on the core GCC infrastructure and thus plugins are bad for GCC. Richard.