This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Additional tree node questions.
- From: Brendon Costa <brendon at christian dot net>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Brendon Costa <bcosta at avdat dot com dot au>, gcc at gcc dot gnu dot org
- Date: Sun, 15 Oct 2006 10:42:01 +1000
- Subject: Re: Additional tree node questions.
- References: <452F19FF.5010002@avdat.com.au> <m3slhs6628.fsf@localhost.localdomain>
Ian Lance Taylor wrote:
> Brendon Costa <bcosta@avdat.com.au> 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.