This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PATCH for decl.c
- To: "Martin v. Loewis" <loewis at informatik dot hu-berlin dot de>, Jason Merrill <jason at cygnus dot com>
- Subject: PATCH for decl.c
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Tue, 26 May 1998 23:11:35 -0700
- Cc: egcs-bugs at cygnus dot com
- Reply-to: mark at markmitchell dot com
Jason --
1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* decl.c (grokdeclarator): Put typedefs on the type's obstack.
This patch was slightly broken. Here's a fix. OK?
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
1998-05-26 Mark Mitchell <mark@markmitchell.com>
* decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
error_mark_node.
Index: decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.124
diff -c -p -r1.124 decl.c
*** decl.c 1998/05/26 20:59:33 1.124
--- decl.c 1998/05/27 06:06:24
*************** grokdeclarator (declarator, declspecs, d
*** 9590,9598 ****
{
/* Make sure this typedef lives as long as its type,
since it might be used as a template parameter. */
! push_obstacks (TYPE_OBSTACK (type), TYPE_OBSTACK (type));
decl = build_decl (TYPE_DECL, declarator, type);
! pop_obstacks ();
}
/* If the user declares "struct {...} foo" then `foo' will have
--- 9590,9600 ----
{
/* Make sure this typedef lives as long as its type,
since it might be used as a template parameter. */
! if (type != error_mark_node)
! push_obstacks (TYPE_OBSTACK (type), TYPE_OBSTACK (type));
decl = build_decl (TYPE_DECL, declarator, type);
! if (type != error_mark_node)
! pop_obstacks ();
}
/* If the user declares "struct {...} foo" then `foo' will have