http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60523
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- I would suggest that you implement this as a plugin. Plugins are particularly useful for enforcing this type of coding standards. If you make a generally useful plugin like one enforcing MISRA standards, it could be distributed with GCC in order to serve as a testcase for the plugins framework.