Mark Chimley on Sun, 21 Jan 2001 12:27:05 +0000 (GMT)

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Strangely modified variables

I have a program with a function as follows:

int func (GEN p, char **string)
   GEN n;

   /* I have included this because it uses p, but it */
   /* doesn't seem to cause a problem */
   if (*string)
      free (*string);
   *string = GENtostr (p);

   output (p);
   n = stoi (1);
   output (p);

   /*  rest of function */

This produces the following output when called with a GEN argument of 3:


So p appears to change its value because of stoi (1). I am at a loss as
to what is going on. Incidentally, 1073741827 = 0x40000003.

Mark Chimley,
Department Of Mathematics,
University Of Bristol