wiki:WikiStart
Last modified 13 months ago Last modified on 04/04/13 19:08:55

GCC Python Plugin

This is a plugin for GCC, which links against libpython, and (I hope) allows you to invoke arbitrary Python scripts from inside the compiler. The aim is to allow you to write GCC plugins in Python.

The plugin is Free Software, licensed under the GPLv3 (or later).

The project is at an "alpha" level of quality: it works, and has uncovered numerous coding errors - but the APIs aren't set in stone yet.

It's already possible to use this to add additional compiler errors/warnings, e.g. domain-specific checks, or static analysis. One of my goals for this is to "teach" GCC about the common mistakes people make when writing extensions for CPython, but it could be used e.g. to teach GCC about GTK's reference-counting semantics, or about locking in the Linux kernel, or about signal-safety in APIs.

Code

http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=summary

Latest tarball release 0.12 (release notes)

Documentation

A pre-built version of the HTML documentation can be seen at:

http://readthedocs.org/docs/gcc-python-plugin/en/latest/index.html

Mailing list

The project's mailing list is here: https://fedorahosted.org/mailman/listinfo/gcc-python-plugin

There's also a mailing list that receives commit notifications here: https://fedorahosted.org/mailman/listinfo/gcc-python-plugin-commits