This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Fix NULL reference types.
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: nathan at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Aug 04 05:03:25 EDT
- Subject: Re: [gfortran] Fix NULL reference types.
aah, I see. Perhaps we need a lang_hook 'ref_type_can_be_null', or
a flag on the type itself TYPE_REFERENCE_MAY_BE_NULL.
I have a more fundamental question: at the tree level, what is the
difference between POINTER_TYPE and REFERENCE_TYPE?
tree.def says:
/* A reference is like a pointer except that it is coerced
automatically to the value it points to. Used in C++. */
But that's not a statement about the tree language (and hence should probably
be removed).
Is the only *current* difference the syntax used to write it out and what the
debugging info says?
Because of the way build_pointer_type works we have to be careful about
adding flags on pointers and reference types.