Really fix PR18596

James A. Morrison ja2morri@csclub.uwaterloo.ca
Sun Dec 19 19:00:00 GMT 2004



"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Sun, 19 Dec 2004, James A. Morrison wrote:
> 
> >        * c-parse.in (initdcl): Don't call finish decl if start_decl fails.
> 
> There are two calls to finish_decl (not "finish decl", please fix all the 
> typos in your ChangeLog entries) from initdcl and two from notype_initdcl.  
> Why are you only changing one of the four?  Have you tested corresponding 
> circumstances that would trigger the other three?  (Please add such tests 
> to the testsuite.)

 I didn't think I could trigger the failure in the other case, notype_initdcl
was an oversight since I didn't have that test.  Thanks for the quick look.
I've added the other tests now and checking if start_decl fails in the
other 3 cases fixes the segfaults.  I've only tested this updated patch with
make and make check RUNTESTFLAGS="gcc.dg/dg.exp" .

-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr18596-1.c
Type: text/x-csrc
Size: 744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041219/5e36f448/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr18596-2.c
Type: text/x-csrc
Size: 741 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041219/5e36f448/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr18596-3.c
Type: text/x-csrc
Size: 430 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041219/5e36f448/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static-nested5.patch
Type: text/x-patch
Size: 4570 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041219/5e36f448/attachment-0003.bin>


More information about the Gcc-patches mailing list