(C++) namespace tweak

Jason Merrill jason@cygnus.com
Tue Dec 14 14:27:00 GMT 1999


We were trying to take BINDING_VALUE of error_mark_node.  That didn't work
very well.

1999-12-14  Jason Merrill  <jason@casey.cygnus.com>

	* decl2.c (ambiguous_decl): Fix to match comment.
	(lookup_using_namespace): Adjust.

Index: decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.287
diff -c -p -r1.287 decl2.c
*** decl2.c	1999/12/05 00:37:56	1.287
--- decl2.c	1999/12/14 22:25:21
*************** ambiguous_decl (name, old, new, flags)
*** 4264,4270 ****
  		}
                cp_error_at ("  also declared as `%#D' here", val);
              }
! 	  return error_mark_node;
  	}
      }
    /* ... and copy the type. */
--- 4270,4276 ----
  		}
                cp_error_at ("  also declared as `%#D' here", val);
              }
! 	  BINDING_VALUE (old) = error_mark_node;
  	}
      }
    /* ... and copy the type. */
*************** lookup_using_namespace (name, val, using
*** 4312,4318 ****
  	/* Resolve ambiguities. */
  	val = ambiguous_decl (name, val, val1, flags);
        }
!   return val != error_mark_node;
  }
  
  /* [namespace.qual]
--- 4318,4324 ----
  	/* Resolve ambiguities. */
  	val = ambiguous_decl (name, val, val1, flags);
        }
!   return BINDING_VALUE (val) != error_mark_node;
  }
  
  /* [namespace.qual]


More information about the Gcc-patches mailing list