This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: does gcc support multiple sizes, or not?
- From: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Aug 2006 11:38:25 -0400
- Subject: Re: does gcc support multiple sizes, or not?
Mark Mitchell wrote:
>I think you really have to accept that the change you want to make goes
>to a relatively fundamental invariant of C++.
I don't see how you can call this a realatively fundamental invariant
of C++, given how various C++ implementations have supported multiple
pointer sizes for much of the history of C++. Perhaps you could argue
that Standard C++ made a fundamental change to the language, but I don't
think so. The original STL made specific allowances for different memory
models and pointer types, and this design, with it's otherwise unnecessary
"pointer" and "size_type" types, was incorporated in to the standard.
I think the intent of the "(T *)(U *)(T *)x == (T *)x" invariant was
only to limit the standard pointer types, not make to non-standard
pointer types of differt size fundamentally not C++. (Unlike, say,
the fundamental changes the standard made to how templates work...)
Ross Ridge