https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124554
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ams at gcc dot gnu.org,
| |tschwinge at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The second error (there are more) is:
.../repos/gcc/newlib/libc/include/setjmp.h:15:18: error: ‘jmp_buf’ was not
declared in this scope
15 | void longjmp (jmp_buf __jmpb, int __retval) __dead2;
| ^~~~~~~
* * *
It seems to me as if there is an issue with newlib's
libc/include/machine/setjmp.h,
https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/machine/setjmp.h,
which should at least define _JBLEN in order to define jmp_buf.
I think the first question is: Why does it suddenly fail?
And if setjmp is the issue with Newlib for gcn / nvptx: Can this be fixed or
should this be detected and excluded from libstdc++?
* * *
On the GCC side, 'csetjmp' looks as follows:
// many commented lines
#ifndef _GLIBCXX_CSETJMP
#define _GLIBCXX_CSETJMP 1
#ifdef _GLIBCXX_SYSHDR
#pragma GCC system_header
#endif
#include <bits/c++config.h>
#include <setjmp.h> // FAILS HERE
// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
#undef longjmp
// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
#ifndef setjmp
#define setjmp(env) setjmp (env)
#endif