This is the mail archive of the
mailing list for the GCC project.
Re: does gcc support multiple sizes, or not?
Mark Mitchell <email@example.com> writes:
| DJ Delorie wrote:
| >> And back to my original answer: it's up to each language to decide
| >> that.
| > Hence my original question: is it legal or not? What did the C++
| > developers decide?
| The C++ standard implies that for all pointer-to-object types have the
| same size and that all pointer-to-function types have the same size.
| (Technically, it doesn't say that that; it says that you can convert T*
| -> U* -> T* and get the original value.) However, nothing in the
| standard says that pointer-to-object types must have the same size as
| pointer-to-function types.
However, the C++ definition has been amended at the last Lillehammer
meeting to allow that cast as "conditionally supported": either it is
valid or it errors out. the compiler has to tell.