gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Patch for gcc 4.6 / volatile


From: Jerry James
Subject: [Gcl-devel] Patch for gcc 4.6 / volatile
Date: Thu, 10 Feb 2011 21:21:04 -0700

The Fedora project is in the midst of a mass package rebuild.  One of
the reasons for doing this is so that all C/C++/... code in Fedora 15
packages will have been built with GCC 4.6 (to be).  The GCL package
failed to rebuild.  The build failure looks exactly like the one
reported here, but this time GCC did emit warnings:

http://lists.gnu.org/archive/html/gcl-devel/2005-07/msg00028.html

I think the "volatile" annotations are still not correct.  The
attached patch results in a successful build for me.  I think the
print.d portion is obviously correct.  For the prog.c portion, the
pointers in new_top and bodysv are used after the setjmp call, so
should also be volatile.  The tinf variable is only used to iterate,
and is initialized after the setjmp call, so it does not need to be
volatile.  The tinf_base variable (as also new_top and bodysv) should
be declared with the "volatile" AFTER the asterisk, rather than
before, because it is the pointer itself that needs to survive the
setjmp call, not the thing pointed to.

Regards,
-- 
Jerry James
http://www.jamezone.org/

Attachment: gcl-2.6.8-volatile.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]