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]

c: Remove dead code in c-typeck.c


Whilst investigating what can be passed to int_size_in_bytes to get a
NULL size tree, I noticed this dead code.  size is never used, and
int_size_in_bytes has no side effects.

OK?

Neil.

	* c-typeck.c (pop_init_level): Remove unused variable and
	unused assignment to it.

Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.144
diff -u -p -r1.144 c-typeck.c
--- c-typeck.c	2001/10/26 20:49:47	1.144
+++ c-typeck.c	2001/10/27 09:40:30
@@ -5414,7 +5414,6 @@ pop_init_level (implicit)
      int implicit;
 {
   struct constructor_stack *p;
-  HOST_WIDE_INT size = 0;
   tree constructor = 0;
 
   if (implicit == 0)
@@ -5429,9 +5428,6 @@ pop_init_level (implicit)
     }
 
   p = constructor_stack;
-
-  if (constructor_type != 0)
-    size = int_size_in_bytes (constructor_type);
 
   /* Error for initializing a flexible array member, or a zero-length
      array member in an inappropriate context.  */


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