Ilya Zakharevich on Thu, 16 Jan 2003 12:50:41 -0800

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

Re: Warning with OSF/1 cc

On Thu, Jan 16, 2003 at 03:45:40PM +0100, Bill Allombert wrote:
> > cc: Warning: ../src/language/init.c, line 1217: In this statement, the referenced type of the pointer value "&__env" is "long", which is not compatible with "array [84] of long".
> >     TRY { x = lisseq(f); } ENDCATCH;
> > ----^
> Well the following patch fix this. Whether it is a good idea is left
> as an excercise to the reader.

> -void   *err_catch(long errnum, jmp_buf *penv);
> +void   *err_catch(long errnum, jmp_buf penv);

1) jmp_buf is *giant* (kilobytes) on some platforms (well, I mean
   sigjmp_buf, but we may want to be able to change jmp by sigjmp some
   time in the future).

2) If changing the signature of err_catch(), please make it take cell*
   too so that the caller may allocate cell on stack.  Calls to
   malloc()/free() should slow down CATCHing order (or two!) of

   This needs to be accompanied by two changes:

     a) increase cell by padding with long reserved[10] for ABI extendability;

     b) remove the cell from the chain at the end of a successful
        block to avoid pointers to stale stack;

   I think 'b' may also significantly improve to logic of cell
   maintainance; e.g., why not make a linked list?

Hope this helps,