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]

Re: [C++ PATCH]: size_zero_node


>>>>> "Richard" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:

    Richard>     I assume that you mean "an unset TYPE_SIZE means an
    Richard> *incomplete* type and VOID_TYPE isn't"?

    Richard> Yes.

    Richard>     But `void' *is* incomplete.

    Richard> I don't see it that way.  I see it anp complete type that
    Richard> represents nothing.  I view an incomplete type as one
    Richard> that can be completed later and void cannot.

The C and C++ standards say that `void' is an incomplete type, but, as
you say, one that can never be completed.  In fact, the C++ standard
says, precisely:

  The void type is an incomplete type that cannot be completed.

I, for one, think that the more the compiler uses standard terminology
to mean standard things, the better off we will be.  GCC is built
around the C standard, even though it allows for lots of other
languages (and should!).  Still, most of the basic notions in the tree
structure are C-based.

Your point of view isn't unreasonable, from a theoretical point of
view, but seems confusing to me in the compiler proper.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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