[M3devel] size_t?

Jay jayk123 at hotmail.com
Mon Feb 11 22:51:10 CET 2008


> These are OS-dependent! They should not be in BasicCtypes.
1) There is no Utypes on Windows.
These are very basic types that belong at a very low level.
In C++ for example, size_t is provided "automatically" by the compiler, no header is needed.
 
2) Are they really OS dependent? What OS makes my definitions wrong?
On what 32 bit architecture is size_t not an unsigned 32 bit integer and ptrdiff_t not a signed 32 bit integer?
Ditto for 64 bit.
These should always be the same size as a pointer and with the proper signedness.
Even if some of the *.i3 files make size_t = int, is that really correct?
And, I assume int vs. long issue is not an issue here.
Though they may be different types in C and C++, they need not be in Modula-3 (when they are the same size, of course)
 
 - Jay

> CC: m3devel at elegosoft.com> From: hosking at cs.purdue.edu> Subject: Re: [M3devel] size_t?> Date: Mon, 11 Feb 2008 11:38:48 -0500> To: jayk123 at hotmail.com> > > On Feb 11, 2008, at 6:23 AM, Jay wrote:> > > C:\dev2\cm3.2\m3-libs\m3core\src\C\Common\Cstddef.i3(12): size_t = > > INTEGER;> >> > really? it is signed?> > and we are sure this is going to be 64 bits on 64 bit targets?> >> > size_t and ptrdiff_t ought to be in BasicCtypes, right?> > That has a 32 bit and 64 bit version, at least.> > These are OS-dependent! They should not be in BasicCtypes.> > >> >> > Does INTEGER effectively equal int or ptrdiff_t?> >> > - Jay 
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080211/d447e91b/attachment-0002.html>


More information about the M3devel mailing list