Bill Allombert on Wed, 15 Jan 2003 18:45:12 +0100


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

Warning with OSF/1 cc


Hello PARI developers,

Compiling PARI CVS with OSF/1 cc outpout warnings similar to this one

/usr/bin/cc  -c -O4 -migrate -ifo -Olimit 9999   -I. -I../src/headers -o init.o ../src/language/init.c
cc: Warning: ../src/language/init.c, line 1217: In this statement, & before array "__env" is ignored.
    TRY { x = lisseq(f); } ENDCATCH;
----^
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;
----^

__env is defined by jmp_buf __env;

The definition of jmp_buf on this system is:

#define _JBLEN  (35+1+48)
typedef long    jmp_buf[_JBLEN];

It looks like this compiler does not like deferencing array pointer ?

For reference under GNU/Linux, setjmp is referenced by

typedef struct __jmp_buf_tag    /* C++ doesn't like tagless structs.  */
  {
    __jmp_buf __jmpbuf;         /* Calling environment.  */
    int __mask_was_saved;       /* Saved the signal mask?  */
    __sigset_t __saved_mask;    /* Saved signal mask.  */
  } jmp_buf[1];

so is a one element array.

Cheers,
Bill.