This is the mail archive of the gcc-patches@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: [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.


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