This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

#ifdef _JBLEN not portable




Hi

The use of "#ifdef _JBLEN" in toplev.h to determine if jmp_buf is defined   
is
not portable. On my x86-linux + glibc-2.0.6 system setjmp.h is included
before toplev.h and yet the prototype for set_float_handler() is excluded
because _JBLEN is not defined.

This means that files which use set_float_handler() and include both   
setjmp.h
and toplev.h do not always see a prototype for set_float_handler depening   
on
whether setjmp.h defines _JBLEN

This problem occurs anytime a system dependent define (here I am refering
to the name and not what its defined as) to conditionalise the inclusion
of a prototype.all define is used

Any suggestion onto how to elimate this system dependency. Here are
some to start with

1. include <setjmp.h> in toplev.h so jmpbuf is always defined.

  This probably goes against egcs coding standards

2. move setjmp stuff to system.h

3. include <setjmp.h> indirectly via a egcs specific include files
    which also egcs specific define "HAS_SETJMPBUF" or
    whatever.


Graham  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]