plugin hooks
Joseph S. Myers
joseph@codesourcery.com
Tue Oct 27 16:19:00 GMT 2009
On Tue, 27 Oct 2009, Basile STARYNKEVITCH wrote:
> I (Basile) don't know much of libcpp. If a plugin can just call cpp_define,
> this is ok for me. But then, we perhaps should document how can that be
> called, and when (at plugin initialization, at PLUGIN_START_UNIT? I don't
> know!)
A plugin can call any non-static function in GCC, with the conditions for
its inputs and when it can be called being the same as for a direct call
from GCC; this is a consequence of the design to use -rdynamic. These may
variously be documented in comments, the internals manual, list archives
and collective wisdom. If you want better documentation for a particular
function, find where the existing documentation is (comments or internals
manual) and propose a patch. If you think a static function should be
made non-static so plugins can call it, propose a patch with appropriate
rationale.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list