This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [plugins] [patch] Initial implementation of GCC plugin support


Zbigniew Chamski wrote:

gcc -fplugin=whatever --version needs to output plugin version strings
(probably calling cc1 with appropriate options to make it load plugins and
output their versions). Likewise --help, with plugin bug reporting
addresses.

Looks like at least two mandatory strings to be provided by all
plugins: say, 'plugin_version_string' and 'plugin_help_string', maybe
also 'plugin_contactinfo_string'. In order to ensure uniform behavior
(and to enforce the presence of non-NULL help strings) the machinery
for printing the help message should be implemented in the compiler,
not in the plugin.
Could we avoid strings as much as possible? Or at least have an api for parsing the gcc version? Currently it's really hard to figure out the version of gcc that we are running in. Would be nice to have something like
struct gcc_version {
int major; int minor; int micro; char *suffix;
}
that the plugin could query and compare.


Taras


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]