This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++: undefined local static variable
- To: snyder at fnal dot gov
- Subject: Re: c++: undefined local static variable
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 02 Aug 2000 09:02:46 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200007262155.QAA16464@d0sgibnl1.fnal.gov><20000726215055S.mitchell@codesourcery.com><yr87la0resg.fsf@d0sgibnl1.fnal.gov>
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))))