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

gcc.dg/unused-3.c


On Tue, Sep 19, 2000 at 06:33:30AM +0000, GCC regression checker wrote:
> The old failures, which were not fixed or introduced by your patch, are:
> gcc.sum gcc.dg/compare2.c
> gcc.sum gcc.dg/unused-3.c

This appears to fix the later.  I notice that the C++ front end
calls warn_about_unused_variables directly.  Is there a reason?


r~


	* c-semantics.c (genrtl_scope_stmt): Pass expand_end_bindings
	the variable chain for the block.

Index: c-semantics.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-semantics.c,v
retrieving revision 1.9
diff -c -p -d -r1.9 c-semantics.c
*** c-semantics.c	2000/09/17 07:38:11	1.9
--- c-semantics.c	2000/09/19 07:24:23
*************** genrtl_scope_stmt (t)
*** 606,612 ****
  	expand_start_bindings_and_block (2 * SCOPE_NULLIFIED_P (t),
  					 SCOPE_STMT_BLOCK (t));
        else if (SCOPE_END_P (t))
! 	expand_end_bindings (NULL_TREE, !SCOPE_NULLIFIED_P (t), 0);
      }
    else if (!SCOPE_NULLIFIED_P (t))
      {
--- 606,616 ----
  	expand_start_bindings_and_block (2 * SCOPE_NULLIFIED_P (t),
  					 SCOPE_STMT_BLOCK (t));
        else if (SCOPE_END_P (t))
! 	{
! 	  tree vars = SCOPE_STMT_BLOCK (t);
! 	  vars = vars ? BLOCK_VARS (vars) : NULL_TREE;
! 	  expand_end_bindings (vars, !SCOPE_NULLIFIED_P (t), 0);
! 	}
      }
    else if (!SCOPE_NULLIFIED_P (t))
      {

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