Last modified 3 weeks ago Last modified on 02/09/17 20:48:06

This project is now hosted on github:

Archive of old content follows:

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.


Latest tarball release 0.15 (release notes)


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

Mailing list

The project's mailing list is here:

There's also a mailing list that receives commit notifications here: