diff mbox

cleanup: remove unused field 'string' in struct symbol

Message ID 20161102171645.17933-1-luc.vanoostenryck@gmail.com (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Luc Van Oostenryck Nov. 2, 2016, 5:16 p.m. UTC
This field is never used, better to remove it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 evaluate.c | 1 -
 symbol.h   | 1 -
 2 files changed, 2 deletions(-)

Comments

Christopher Li Nov. 17, 2016, 10:14 a.m. UTC | #1
On Thu, Nov 3, 2016 at 1:16 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> This field is never used, better to remove it.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>


NAK,

Some compiler back needs to generate the actual storage for the
anonymous string. Even though sparse front end is not using it now.
Another role of sparse other than checker is a C front end for other back
ends.

This is introduced at a12d4528ffc4e66b14519d739806f0eb793f72cf

    Marking anonymous string.

    The back end need to generate some storage for anonymous string.
    This simplify testing of anonymous string.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/evaluate.c b/evaluate.c
index b45a3958..566f0c83 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -90,7 +90,6 @@  static struct symbol *evaluate_string(struct expression *expr)
 	sym->array_size = alloc_const_expression(expr->pos, length);
 	sym->bit_size = bytes_to_bits(length);
 	sym->ctype.alignment = 1;
-	sym->string = 1;
 	sym->ctype.modifiers = MOD_STATIC;
 	sym->ctype.base_type = array;
 	sym->initializer = initstr;
diff --git a/symbol.h b/symbol.h
index 9b3f1604..b26fbbc4 100644
--- a/symbol.h
+++ b/symbol.h
@@ -172,7 +172,6 @@  struct symbol {
 					examined:1,
 					expanding:1,
 					evaluated:1,
-					string:1,
 					designated_init:1,
 					forced_arg:1,
 					transparent_union:1;