This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/24556] gcc can't inline functions using setjmp
- From: "samuel dot thibault at ens-lyon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2005 13:45:00 -0000
- Subject: [Bug regression/24556] gcc can't inline functions using setjmp
- References: <bug-24556-11603@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from samuel dot thibault at ens-lyon dot org 2005-10-27 13:45 -------
Subject: Re: gcc can't inline functions using setjmp
pinskia at gcc dot gnu dot org, le Thu 27 Oct 2005 13:37:32 -0000, a écrit :
> This is not a bug as if you inline it, the place setjmp goes to could be not
> where you want to goto.
I don't understand that. I did google before submitting the bug and couldn't
find anything that would prevent our code from working. Something I could find
is
jmp_buf buf;
inline f() {
if (setjmp(buf));
}
g() {
f();
longjmp(buf);
}
Of course _this_ is wrong, since f() is terminated when longjmp occurs.
But in our code, switch_to() is _never_ terminated when longjmp goes to it, so
I don't see any issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24556