Here is the new fixed patch. The following operators are covered: A large number of operators in the evaluate_subexp_standard function are not changed as I am unsure what they are used for or not sure about the correct way to change them. In a sense it depends on whether it should be possible to check the scope of complex expressions. I think it probably should, as it is consistent, but it would require extra work to implement and may not be worth it as people may never use it. However, currently it should be possible to check if variables, constants, structures and memebers of structures/classes are in scope. For binary operators, I consider that an expresion is on scope of all of it's sub expressions are in scope, that is a binary AND. This is implemented (trivially) for the case for AND, and also for the case for OR. I wanted to check that we way I had done ti was teh best way to do it, before I added a case to every other binary operator. For unary operators, the value should just be the value of the subexpression (currently this is unimplemented, but will be when I can face the monotony of a lot of cutting and pasting). Any thoughts you have on the patch, other cases which should be covered, better ways of doing it, test cases, and anything like that is much appreciated. Thanks, Rob P.S. There still seems to be a lot of extra info in the diff, despite now having build directories sorted properly.