On Mon, 2 Feb 2009, Taras Glek wrote:

> Regarding versions: I think it's crazy to be passing a version in every single
> function call. The plugin should check  the gcc version it is being loaded
> into on startup and bail if it doesn't match.

I agree with checking once at startup, but that should be GCC's job, not 
the plugin's.  The plugin should export the exact version string and 
target triplet (and maybe configure options) of the compiler it was built 
to be plugged into (the configure macros / build support provided for use 
of plugins should make this automatic).  GCC should check these at 
startup.

(OK, there's not much difference between GCC checking data automatically 
exported from a plugin and the build support code automatically putting 
checks in the plugin itself, but I think having the checks in GCC is safer 
for ensuring they are always done.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to