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]

Re: Applied: PATCH for thread-safe C++ static local initialization


I needed to apply this patch to avoid uninitialized variable warnings.  I
didn't notice this when I tested the patch because I was accidentally
testing with BOOT_CFLAGS=-g3.  Oops.

2004-08-28  Jason Merrill  <jason@redhat.com>

	* decl.c (expand_static_init): Avoid bogus warnings.

*** decl.c.~2~	2004-08-27 14:47:12.090723653 -0400
--- decl.c	2004-08-28 02:31:23.910682293 -0400
*************** expand_static_init (tree decl, tree init
*** 5151,5158 ****
    if (DECL_FUNCTION_SCOPE_P (decl))
      {
        /* Emit code to perform this initialization but once.  */
!       tree if_stmt, inner_if_stmt;
!       tree then_clause, inner_then_clause;
        tree guard, guard_addr, guard_addr_list;
        tree acquire_fn, release_fn, abort_fn;
        tree flag, begin;
--- 5151,5158 ----
    if (DECL_FUNCTION_SCOPE_P (decl))
      {
        /* Emit code to perform this initialization but once.  */
!       tree if_stmt, inner_if_stmt = NULL_TREE;
!       tree then_clause, inner_then_clause = NULL_TREE;
        tree guard, guard_addr, guard_addr_list;
        tree acquire_fn, release_fn, abort_fn;
        tree flag, begin;

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