From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: C++, complex, etc Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <3922DA9E DOT 8DF00783 AT mtu-net DOT ru> <392311DE DOT 3700368D AT bigfoot DOT com> <39236A55 DOT 78749ABD AT mtu-net DOT ru> <8g0688$cdm$1 AT news01 DOT cit DOT cornell DOT edu> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 35 X-Trace: /bNDCz84sMwjx+fExbLIimMFJq0w4L6c/3jDhS3iPMjO2zJrUyXTP1qph1ZphhcJvSSIrbFOb+bJ!/wpq8I5WxJJrKhv/Q+mQHuxVvjIyqudCmhnnLfUjkTmBktk7Oy117K9/UXoDYufBRh0r/Klcd5ep!alRqIno= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sat, 20 May 2000 18:42:46 GMT Distribution: world Date: Sat, 20 May 2000 18:42:46 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 18 May 2000 03:29:48 -0400, "A. Sinan Unur" wrote: >"Alexei A. Frounze" wrote in message >news:39236A55 DOT 78749ABD AT mtu-net DOT ru... > >> I've never said I _rely_. I don't use size_t in my sources. Only >> standard types: char, short, int, long int, long long,... ;) > >i am sorry but this statement makes no sense. size_t is no less standard >than int, but afaik long long is not in the standard at all. It's in C99 (IIRC), which means C++ compiler vendors who want to claim "Our C compiler supports C99" have an incentive to put it into their C++ compilers. >for example, the following code is not safe > >int main(int argc, char *argv[]) { > unsigned len = strlen(argv[0]); >} > >because unsigned int is not guaranteed to be able to hold a size_t even >though it may seem to work for now. Can size_t be safely added, subtracted, multiplied, and divided like integers (i.e. not a "magic cookie")? -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/