Hi, During the last two years, I developed a gcc pass called tree-check that performs user-defined checks on the tree (GIMPLE) form of a function.
The checks are specified using a new option --tree-check, and are powerful enough to express user-defined memory leaks, null pointer dereferences, unreleased locks, etc., but also more basic checks such as using an unsafe construct. The tree-check pass prints a warning for each example found in the code, but compiles the program as usual. I think that incorporating these option in a future gcc version would improve gcc in shortening the debug cycle, by avoiding to introduce bugs that can be easily specified and automatically detected. Modifications to the source of gcc are quite small: 250 lines modified and 1000 lines added, in two new modules. Is this considered a major change, or a minor one? Also, in which branch should I port these modifications (4.2, 4.1,...) to submit a patch? I originally developed the whole stuff on a tree-ssa branch dating January 2004, and then ported it to 4.0.1. Porting this to any recent branch should be easy, but which one to choose? Regards, Nic.