Date: Thu, 18 May 2000 14:16:24 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Alexei A. Frounze" cc: djgpp AT delorie DOT com Subject: Re: C++, complex, etc In-Reply-To: <3923BA11.AD387617@mtu-net.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 18 May 2000, Alexei A. Frounze wrote: > Eli Zaretskii wrote: > > > > On Thu, 18 May 2000, Alexei A. Frounze wrote: > > > > > I don't use size_t in my sources. > > > > You cannot do that if those sources call standard functions which accept > > or return size_t values, such as strlen, memcpy, malloc, etc. If you use > > int instead of size_t in these cases, your code becomes non-portable. > > Really? How about type casting? It doesn't work at all for int<->size_t? Casting doesn't solve such problems, it only prevents the compiler from complaining. For example, if size_t is unsigned int, then casting it to int will not avoid problems from comparing signed and unsigned values. > If it's a standard type, what is it needed for then? Isn't int enough? No, it isn't enough. If it were enough, the ANSI comittee would not have invented it.