Mail Archives: djgpp/2000/05/20/14:45:22
On Thu, 18 May 2000 03:29:48 -0400, "A. Sinan Unur" <sinan AT unur DOT com>
wrote:
>"Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru> 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/
- Raw text -