This is the mail archive of the gcc-bugs@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]

Re: c++: undefined local static variable



Scott --

  Thanks for the bug report.

  Fixed with this patch.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-08-02  Mark Mitchell  <mark@codesourcery.com>

	* cp-tree.h (DECL_NEEDED_P): Tweak.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.504
diff -c -p -r1.504 cp-tree.h
*** cp-tree.h	2000/07/31 00:24:43	1.504
--- cp-tree.h	2000/08/02 15:58:13
*************** struct lang_decl
*** 1936,1942 ****
     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))))
  
--- 1936,1942 ----
     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 && TREE_PUBLIC (DECL) && !DECL_COMDAT (DECL))	\
     || (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL))))	\
     || (flag_syntax_only && TREE_USED ((DECL))))
  

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