diff -rc src/gcc-old/cp/ChangeLog gcc/cp/ChangeLog
*** src/gcc-old/cp/ChangeLog	Mon Nov 12 04:40:44 2001
--- src/gcc/cp/ChangeLog	Mon Nov 12 05:10:33 2001
***************
*** 47,52 ****
--- 47,56 ----
          * tree.c (char_type_p): New function.
          * typeck2.c (digest_init): Use char_type_p.
  
+ 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
+ 
+ 	* cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
+ 
  2000-01-19  Mark Mitchell  <mark@codesourcery.com>
  
  	* tree.c (bot_manip): Set DECL_CONTEXT for newly created
diff -rc gcc-old/cp/cp-tree.h gcc/cp/cp-tree.h
*** src/gcc-old/cp/cp-tree.h	Mon Nov 12 04:40:44 2001
--- src/gcc/cp/cp-tree.h	Mon Nov 12 05:26:15 2001
***************
*** 2676,2684 ****
     definition.  This is true when the back-end tells us that
     the symbol has been referenced in the generated code.  If, however,
     we are not generating code, then it is also true when a symbol has
!    just been used somewhere, even if it's not really needed.  */
  #define DECL_NEEDED_P(DECL)					\
!   (! DECL_COMDAT (DECL)						\
     || (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL))))	\
     || (flag_syntax_only && TREE_USED ((DECL))))
  
--- 2676,2686 ----
     definition.  This is true when the back-end tells us that
     the symbol has been referenced in the generated code.  If, however,
     we are not generating code, then it is also true when a symbol has
!    just been used somewhere, even if it's not really needed.  We need
!    anything that isn't comdat, but we don't know for sure whether or
!    not something is comdat until end-of-file.  */
  #define DECL_NEEDED_P(DECL)					\
!   (at_eof && ! DECL_COMDAT (DECL)				\
     || (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL))))	\
     || (flag_syntax_only && TREE_USED ((DECL))))
  


