Dear GCC developers,

  I've been following the plugins discussion and have seen various 
proposals. So far all of them seem to be focusing on plugins as
dynamically linkable libraries (with all associated versioning and
portability ballast). While you could also easily extend that, and
integrate plugins more tightly with the compiler binary as static
libraries (thereby creating customized compilers), I was wondering
whether in future there might be a need to express tighter dependency
between the code and the plugin(s) that the code might require... Or 
at least the dependency between the code and the plugin 
configuration options...

  Should we not have a way to specify a plugin in the source itself?
This could be achieved by tagging a function with a __plugin__
attribute (or a #pragma), exporting the PluginAPI as a bunch of 
built-in functions and having the compiler itself (1) ensure that such
functions only call portable built-ins, and (2) compiling/executing or 
interpreting them as compilation passes. Then, the code can just 
#include a source-level plugin to have it available just for that 
translation unit.

  This is useful for at least one project I am working on...

Regards,

Pjotr Kourzanov





Reply via email to