This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: can DECL_RESULT be 0?


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 file, or whether perhaps an
> implementation change was made a very long time ago. 
> 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.  doesn't look at DECL_RTL (DECL_RESULT (...))
> so there is no problem there.

I thought that there was a problem with aggregate_value_p when, after reading 
that comment, I attempted to set DECL_RESULT to 0 in a toy front end that I 
am working and the result was a segmentation fault inside aggregate_value_p.

Thank you very much for showing that the problem was in the comment.

Rafael

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]