public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* can DECL_RESULT be 0?
@ 2005-11-12 12:03 Rafael Ávila de Espíndola
  2005-11-15  0:33 ` Jim Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Rafael Ávila de Espíndola @ 2005-11-12 12:03 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

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_struct_function calls aggregate_value_p on the DECL_RESULT and 
aggregate_value_p assumes that its argument is not null.

Should DECL_RESULT be allowed to be null or should the comment be fixed? If 
DECL_RESULT can be null, should aggregate_value_p return false if its 
argument is null? 

Thanks,
Rafael

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-21 21:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-12 12:03 can DECL_RESULT be 0? Rafael Ávila de Espíndola
2005-11-15  0:33 ` Jim Wilson
2005-11-15  2:17   ` Gabriel Dos Reis
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

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).