This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
c: Remove dead code in c-typeck.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: c: Remove dead code in c-typeck.c
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sat, 27 Oct 2001 10:46:30 +0100
- Cc: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
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. */