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, 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 file, or whether perhaps an | implementation change was made a very long time ago. Either way, this | comment as written is wrong, and has been for a very long time. We | could perhaps drop the comment about 0 values, or maybe expand it to | say that the DECL_RTL of the RESULT_DECL is 0 for functions that | return no value. aggregate_value_p doesn't look at DECL_RTL | (DECL_RESULT (...)) so there is no problem there.
I was under the impression that the DECL_RESULT is nullified for a function that passes the named return-value optimization. -- Gaby