This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
#ifdef _JBLEN not portable
- To: egcs-bugs at cygnus dot com
- Subject: #ifdef _JBLEN not portable
- From: grahams at rcp dot co dot uk
- Date: Tue, 23 Jun 1998 16:16:42 GMT
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