-Wunused-local-typedefs is a new warning flag of gcc-4.7, and it will enabled by -Wall since gcc-4.8 (not yet released). The fix is a big set of removals of unused typedefs (or comments, or moves, depending on the context).