This document describes the Python plugin I’ve written for GCC. In theory the plugin allows you to write Python scripts that can run inside GCC as it compiles code, exposing GCC’s internal data structures as a collection of Python classes and functions. The bulk of the document describes the Python API it exposes. Hopefully this will be of use for writing domain-specific warnings, static analysers