This is the mail archive of the gcc@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: Size of basic types


Paul Schlie wrote:
> > From: Zack Weinberg <zack@codesourcery.com>
...
> > Secondarily, I consider it an important property of C-as-she-is-spoke
> > that sizeof(void*) <= sizeof(long), and I do not think GCC should ever
> > facilitate breaking that property.
> 
> Thanks, I didn't appreciate that there was a dependency between the
> size of a pointer and the size of a long; I had mistakenly presumed
> that as long as there was a supported int datatype which was at
> least as large as a pointer (as in the above example long long ==
> pointer size) GCC's infrastructure would support it.

I think GCC could be made to support it as a target; however, it is a
pervasive assumption of C programs that 'long' is the machine pointer
size.  (Formerly and with somewhat less justification, 'int'.)  I
suspect GCC would have trouble being *hosted* on such a platform, and
I think it is bad to break this assumption.

zw


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