Ian Lance Taylor wrote: > Brendon Costa <[EMAIL PROTECTED]> writes: > >> For each FUNCTION_DECL node I find, I want to determine what its >> exception specification list is. I.e. the throws() statement in its >> prototype. > > Look at TYPE_RAISES_EXCEPTIONS (FNDECL). > > Ian
This macro does not seem to work. Either that or i am doing something wrong. I have some code that looks a little like: temp_tree = TYPE_RAISES_EXCEPTIONS(node); if (temp_tree) { fprintf(stderr, "Has an exception spec.\n"); for (list = node; list; list = TREE_CHAIN(list)) { /* Get the type for the specification. */ temp_tree = TREE_VALUE(list); ... If i use the test code below: void Function1() throw() { } void Function2() throw(float) { throw 1.0f; } int main() { Function1(); Function2(); return 0; } I never see the print statement. I am doing this with the FUNCTION_DECL nodes that pass through the: gimplify_function_tree() function. Is there something incorrect about my usage of this macro? I am using gcc-4.0.1 Thanks, Brendon.