Mail Archives: djgpp/1998/01/08/10:06:07
On Thu, 8 Jan 1998, Cesar Scarpini Rabak wrote:
> At 11:00 08/01/98 +0200, Eli Zaretskii wrote:
> >Also, please note that it is usually a bad idea to put a long into a
> >buffere which was malloc'ed for int's, like you do:
> >
> > long i;
> > unsigned int *buffer;
> > ...
> > buffer[i] = i;
> >
> >This works in DJGPP, since int and long are both 32-bit, but on other
> >architectures it will crash.
>
> Eli where did you get evidence for this affirmation?
Sorry, ``crash'' was the wrong word. It just won't work as the author of
this line thinks it would, if long is wider than an int.
- Raw text -