This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: RFA: remove unused argument to build_block
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 18 Apr 2005 18:10:13 -0600
- Subject: Patch: RFA: remove unused argument to build_block
- Reply-to: tromey at redhat dot com
Today I happened to notice that build_block() has an unused argument.
I didn't see a reason for this, and no caller passes anything other
than NULL here, so I removed it.
Bootstrapped on x86 FC2 (c/c++/fortran/java), no regressions.
Ok for trunk?
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* tree.c (build_block): Removed unused 'tags' argument.
* tree.h (build_block): Removed argument.
Index: fortran/ChangeLog
from Tom Tromey <tromey@redhat.com>
* f95-lang.c (poplevel): Updated for change to build_block.
Index: java/ChangeLog
from Tom Tromey <tromey@redhat.com>
* expr.c (build_jni_stub): Updated for change to build_block.
Index: treelang/ChangeLog
from Tom Tromey <tromey@redhat.com>
* treetree.c (poplevel): Updated for change to build_block.
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.472
diff -u -r1.472 tree.c
--- tree.c 30 Mar 2005 21:34:29 -0000 1.472
+++ tree.c 18 Apr 2005 22:36:37 -0000
@@ -2813,8 +2813,7 @@
compiled. This information is used for outputting debugging info. */
tree
-build_block (tree vars, tree tags ATTRIBUTE_UNUSED, tree subblocks,
- tree supercontext, tree chain)
+build_block (tree vars, tree subblocks, tree supercontext, tree chain)
{
tree block = make_node (BLOCK);
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.714
diff -u -r1.714 tree.h
--- tree.h 9 Apr 2005 17:19:03 -0000 1.714
+++ tree.h 18 Apr 2005 22:36:39 -0000
@@ -2904,7 +2904,7 @@
#define build_tree_list(t,q) build_tree_list_stat(t,q MEM_STAT_INFO)
extern tree build_decl_stat (enum tree_code, tree, tree MEM_STAT_DECL);
#define build_decl(c,t,q) build_decl_stat (c,t,q MEM_STAT_INFO)
-extern tree build_block (tree, tree, tree, tree, tree);
+extern tree build_block (tree, tree, tree, tree);
#ifndef USE_MAPPED_LOCATION
extern void annotate_with_file_line (tree, const char *, int);
extern void annotate_with_locus (tree, location_t);
Index: fortran/f95-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/f95-lang.c,v
retrieving revision 1.34
diff -u -r1.34 f95-lang.c
--- fortran/f95-lang.c 1 Apr 2005 04:16:51 -0000 1.34
+++ fortran/f95-lang.c 18 Apr 2005 22:36:43 -0000
@@ -420,7 +420,7 @@
binding level is a function body, or if there are any nested blocks then
create a BLOCK node to record them for the life of this function. */
if (keep || functionbody)
- block_node = build_block (keep ? decl_chain : 0, 0, subblock_chain, 0, 0);
+ block_node = build_block (keep ? decl_chain : 0, subblock_chain, 0, 0);
/* Record the BLOCK node just built as the subblock its enclosing scope. */
for (subblock_node = subblock_chain; subblock_node;
Index: java/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.221
diff -u -r1.221 expr.c
--- java/expr.c 17 Mar 2005 14:43:26 -0000 1.221
+++ java/expr.c 18 Apr 2005 22:36:50 -0000
@@ -2513,8 +2513,7 @@
method_args = DECL_ARGUMENTS (method);
else
method_args = BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (method));
- block = build_block (env_var, NULL_TREE, NULL_TREE,
- method_args, NULL_TREE);
+ block = build_block (env_var, NULL_TREE, method_args, NULL_TREE);
TREE_SIDE_EFFECTS (block) = 1;
/* When compiling from source we don't set the type of the block,
because that will prevent patch_return from ever being run. */
Index: treelang/treetree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/treetree.c,v
retrieving revision 1.61
diff -u -r1.61 treetree.c
--- treelang/treetree.c 1 Apr 2005 14:13:20 -0000 1.61
+++ treelang/treetree.c 18 Apr 2005 22:36:55 -0000
@@ -1023,7 +1023,7 @@
binding level is a function body, or if there are any nested blocks then
create a BLOCK node to record them for the life of this function. */
if (keep || functionbody)
- block_node = build_block (keep ? decl_chain : 0, 0, subblock_chain, 0, 0);
+ block_node = build_block (keep ? decl_chain : 0, subblock_chain, 0, 0);
/* Record the BLOCK node just built as the subblock its enclosing scope. */
for (subblock_node = subblock_chain; subblock_node;