This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH: Fix PR c++/16270


This obvious patch fixes PR 16270.

Tested on x86_64-unknown-linux-gnu, applied on the mainline.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2004-07-02  Mark Mitchell  <mark@codesourcery.com>

	PR c++/16270
	* decl.c (grokdeclarator): Robustify.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1229
diff -c -5 -p -r1.1229 decl.c
*** decl.c	27 Jun 2004 03:03:54 -0000	1.1229
--- decl.c	2 Jul 2004 21:59:03 -0000
*************** grokdeclarator (const cp_declarator *dec
*** 6373,6382 ****
--- 6373,6384 ----
  		  in_namespace = qualifying_scope;
  		decl = TREE_OPERAND (decl, 1);
  	      }
  	    if (TREE_CODE (decl) == BASELINK)
  	      decl = BASELINK_FUNCTIONS (decl);
+ 	    if (decl == error_mark_node)
+ 	      return error_mark_node;
  	    switch (TREE_CODE (decl))
  	      {
  	      case BIT_NOT_EXPR:
  		{
  		  tree type = TREE_OPERAND (decl, 0);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]