jge@unc.UUCP (John Eyles) (06/12/84)
I have found several bugs in Version 2.1 of the DeSmet C compiler. 1) the exponential function "exp" may give erroneous results when the argument is negative 2) the name of an array is not always synonymous with the pointer to the first element of the array, i.e: it may be necessary to say: double a[10][20] double *pa; pa = &a[0][0]; and use pa rather than a for subscript offset calculations; I haven't investgated this very thoroughly, but it may only be a problem with double-subscripted arrays or with arrays passed as arguments to functions 3) if function which is defined in a .h header file is then redefined explicitly in your code (and you have "include"'ed the .h file), the program tends to completely hang when it is run Hope this helps somebody out there who is going crazy trying to figure out what the hell is wrong with their program.
janney@unm-cvax.UUCP (06/14/84)
> 2) the name of an array is not always synonymous with the > pointer to the first element of the array, i.e: it may > be necessary to say: > double a[10][20] > double *pa; > pa = &a[0][0]; > and use pa rather than a for subscript offset calculations; a is not the same as &a[0][0]: it is the same as &a[0], a pointer to a vector of 20 doubles. This is not a bug but part of the language: without it multi-dimensional indexing wouldn't work right. Jim Janney {{convex,ucbvax,gatech}!unmvax, {purdue,lbl-csam,cmcl2}!lanl-a}!unm-cvax!janney