[PATCH 6/9] spec: KW_LONG is not needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To determine the rank of shorts & floats, the keyword type
KW_LONG is used but there is no need for a specific keyword
since testing for 'Set_Long' has the same effect.

So, remove this keyword and test for 'Set_Long' instead
as this somehow clarify the processing of specifiers.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 parse.c  | 4 ++--
 symbol.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/parse.c b/parse.c
index 3526bf37e..0ace13514 100644
--- a/parse.c
+++ b/parse.c
@@ -294,7 +294,7 @@ static struct symbol_op unsigned_op = {
 };
 
 static struct symbol_op long_op = {
-	.type = KW_SPECIFIER | KW_LONG,
+	.type = KW_SPECIFIER,
 	.test = Set_S|Set_Char|Set_Float|Set_Short|Set_Vlong,
 	.set = Set_Long,
 };
@@ -1630,7 +1630,7 @@ static struct token *declaration_specifiers(struct token *token, struct decl_sta
 				size = -2;
 			} else if (s->op->set & Set_Int128) {
 				size = 3;
-			} else if (s->op->type & KW_LONG && size++) {
+			} else if (s->op->set & Set_Long && size++) {
 				if (class == CReal) {
 					specifier_conflict(token->pos,
 							   Set_Vlong,
diff --git a/symbol.h b/symbol.h
index 5b25c040c..188291cd7 100644
--- a/symbol.h
+++ b/symbol.h
@@ -82,7 +82,7 @@ enum keyword {
 	KW_ASM		= 1 << 5,
 	KW_MODE		= 1 << 6,
      // KW UNUSED	= 1 << 7,
-	KW_LONG		= 1 << 8,
+     // KW UNUSED	= 1 << 8,
 	KW_EXACT	= 1 << 9,
 };
 
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux