erroneous "clobbering" warning when using setjmp() (reproducible, w/ small source)

Johan Lindh johan@link-data.com
Tue Oct 19 16:39:00 GMT 1999


Hi!

My name is Johan Lindh, and I'm the author and maintainer of a package called memwatch.

Since I released memwatch for public use, I've started getting reports about gcc and egcs complaining
about things that could get clobbered in it, because it used setjmp/longjmp.

I found this strange, and investigated. I'm including a (very short, 50 lines) C program that
illustrates the bug clearly, as well as the .i and .s files you ask for on the gcc homepage.

Since I'm not on the mailing list, I'd very much appreciate any replies CC'd to my mail account.

*** gcc versions:

2.7.2 and 2.95.1 that I've tried myself, many more that others have reported

*** system type:

I tested on freebsd-3.2 and redhat-5.2, many others have been reported

*** options:

gcc -o gcc-bug -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -O -finline-functions -fkeep-inline-functions -Wbad-function-cast -Wcast-qual -Wcast-align -Wnested-externs gcc-bug.c

Regards,

Johan Lindh
johan@link-data.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-bug.c
Type: text/x-c
Size: 921 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991019/702fb3a9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-bug.i
Type: text/x-c
Size: 13037 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991019/702fb3a9/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-bug.s
Type: text/x-asm
Size: 1667 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991019/702fb3a9/attachment-0002.bin>


More information about the Gcc-bugs mailing list