From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Jim Wilson <wilson@specifix.com>
Cc: "Rafael Ávila de Espíndola" <rafael.espindola@gmail.com>,
gcc@gcc.gnu.org
Subject: Re: can DECL_RESULT be 0?
Date: Tue, 15 Nov 2005 02:17:00 -0000 [thread overview]
Message-ID: <m3acg6fyfh.fsf@uniton.integrable-solutions.net> (raw)
In-Reply-To: <43792CBC.5050604@specifix.com>
Jim Wilson <wilson@specifix.com> 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
next prev parent reply other threads:[~2005-11-15 2:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-12 12:03 Rafael Ávila de Espíndola
2005-11-15 0:33 ` Jim Wilson
2005-11-15 2:17 ` Gabriel Dos Reis [this message]
2005-11-15 2:40 ` James E Wilson
2005-11-15 21:30 ` Rafael Ávila de Espíndola
2005-11-18 1:35 ` Jim Wilson
2005-11-20 19:58 ` Rafael Ávila de Espíndola
2005-11-21 21:19 ` James E Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3acg6fyfh.fsf@uniton.integrable-solutions.net \
--to=gdr@integrable-solutions.net \
--cc=gcc@gcc.gnu.org \
--cc=rafael.espindola@gmail.com \
--cc=wilson@specifix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).