Re: can DECL_RESULT be 0?

2005-11-21 Thread James E Wilson
On Sun, 2005-11-20 at 12:01, Rafael Ávila de Espíndola wrote: > What do you thing about adding an assert? Something similar to the attached > patch. I think there is no chance of a user seeing this problem. It can only occur when working on a front end, in which case the problem would be obvious

Re: can DECL_RESULT be 0?

2005-11-20 Thread Rafael Ávila de Espíndola
On Thursday 17 November 2005 23:35, Jim Wilson wrote: > > I've checked in a patch to fix the comment typo. Thanks, What do you thing about adding an assert? Something similar to the attached patch. Rafael Index: gcc/function.c === -

Re: can DECL_RESULT be 0?

2005-11-17 Thread Jim Wilson
Rafael Ávila de Espíndola wrote: Thank you very much for showing that the problem was in the comment. I've checked in a patch to fix the comment typo. -- Jim Wilson, GNU Tools Support, http://www.specifix.com

Re: can DECL_RESULT be 0?

2005-11-15 Thread Rafael Ávila de Espíndola
On Monday 14 November 2005 22:33, Jim Wilson wrote: > I looked at gcc-1.42, and even there, a DECL_RESULT always holds a > RESULT_DECL. It can never be zero. However, the DECL_RTL of this > RESULT_DECL is zero for a function that returns no value. I'm not sure > if this is a typo in the tree.def

Re: can DECL_RESULT be 0?

2005-11-14 Thread James E Wilson
On Mon, 2005-11-14 at 18:16, Gabriel Dos Reis wrote: > I was under the impression that the DECL_RESULT is nullified for a > function that passes the named return-value optimization. Just using grep, I don't see any obvious evidence of that. I don't know where to look for more info. I see a numb

Re: can DECL_RESULT be 0?

2005-11-14 Thread Gabriel Dos Reis
Jim Wilson <[EMAIL PROTECTED]> writes: | Rafael Ávila de Espíndola wrote: | > DECL_RESULT holds a RESULT_DECL node for the value of a function, | > or it is 0 for a function that returns no value. | > (C functions returning void have zero here.) | | I looked at gcc-1.42, and even there,

Re: can DECL_RESULT be 0?

2005-11-14 Thread Jim Wilson
Rafael Ávila de Espíndola wrote: DECL_RESULT holds a RESULT_DECL node for the value of a function, or it is 0 for a function that returns no value. (C functions returning void have zero here.) I looked at gcc-1.42, and even there, a DECL_RESULT always holds a RESULT_DECL. It can neve

can DECL_RESULT be 0?

2005-11-12 Thread Rafael Ávila de Espíndola
In tree.def:329 it is written that DECL_RESULT holds a RESULT_DECL node for the value of a function, or it is 0 for a function that returns no value. (C functions returning void have zero here.) but C functions returning void have void_type_node in DECL_RESULT. Also note that allocate_s