All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] keyword cleanup
@ 2017-05-05  1:50 Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 1/6] keyword: add test case for reserved '_Static_assert' Luc Van Oostenryck
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

The recent patch "add support for _Static_assert" triggered
some spring cleanup of the "ident-list.h" file.
The changes in this series are mainly moving around some
definitions and removing unneeded ones.

The patches are to be applied on top of the '_Static_assert' patch.

Luc Van Oostenryck (6):
  keyword: add test case for reserved '_Static_assert'
  keyword: regroup the [reserved] keywords
  keyword: explicitly add C99 & C11 keywords
  keyword: add more reserved keywords to the test case
  keyword: add a comment about NS_TYPEDEF & reserved keywords
  keyword: no pre-declaration needed for attribute names

 ident-list.h          |  78 ++++++-----------------
 parse.c               |   1 +
 validation/reserved.c | 171 ++++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 163 insertions(+), 87 deletions(-)


The series can also be found at:
  git://github.com/lucvoo/sparse.git keyword-cleanup
based on commit a04a3b0acdaa0d95bba30a12e691804e13ef8166:
  sparse: add support for _Static_assert
up to commit 467aed81354b5a404a7c6c47aa38a2c6bfe08b8f:
  keyword: no pre-declaration needed for attribute names

-- Luc Van Oostenryck

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] keyword: add test case for reserved '_Static_assert'
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 2/6] keyword: regroup the [reserved] keywords Luc Van Oostenryck
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 validation/reserved.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/validation/reserved.c b/validation/reserved.c
index e5d7af862..2ca9ac40a 100644
--- a/validation/reserved.c
+++ b/validation/reserved.c
@@ -16,6 +16,7 @@ static int (__typeof__);
 static int (inline);
 static int (__inline);
 static int (__inline__);
+static int (_Static_assert);
 /*
  * check-name: const et.al. are reserved identifiers
  * check-error-start:
@@ -37,5 +38,6 @@ reserved.c:15:12: error: Trying to use reserved word '__typeof__' as identifier
 reserved.c:16:12: error: Trying to use reserved word 'inline' as identifier
 reserved.c:17:12: error: Trying to use reserved word '__inline' as identifier
 reserved.c:18:12: error: Trying to use reserved word '__inline__' as identifier
+reserved.c:19:12: error: Trying to use reserved word '_Static_assert' as identifier
  * check-error-end:
  */
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] keyword: regroup the [reserved] keywords
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 1/6] keyword: add test case for reserved '_Static_assert' Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 3/6] keyword: explicitly add C99 & C11 keywords Luc Van Oostenryck
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

The idents in "ident-list.h" are probably organized mainly
in the chronological order of their addition to the file and
as such a bit dispersed here and there.

Change this by regrouping them in Basic C/C99/C11/GCC extensions/...

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 ident-list.h | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/ident-list.h b/ident-list.h
index 3c7547783..dbed06858 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -16,7 +16,6 @@ IDENT_RESERVED(for);
 IDENT_RESERVED(while);
 IDENT_RESERVED(do);
 IDENT_RESERVED(goto);
-IDENT_RESERVED(_Static_assert);
 
 /* C typenames. They get marked as reserved when initialized */
 IDENT(struct);
@@ -26,13 +25,22 @@ IDENT(__attribute); IDENT(__attribute__);
 IDENT(volatile); IDENT(__volatile); IDENT(__volatile__);
 IDENT(double);
 
+/* C storage classes. They get marked as reserved when initialized */
+IDENT(static);
+
+/* C99 keywords */
+IDENT(restrict); IDENT(__restrict); IDENT(__restrict__);
+
+/* C11 keywords */
+IDENT_RESERVED(_Alignof);
+IDENT_RESERVED(_Static_assert);
+
 /* Special case for L'\t' */
 IDENT(L);
 
 /* Extended gcc identifiers */
 IDENT(asm); IDENT_RESERVED(__asm); IDENT_RESERVED(__asm__);
 IDENT(alignof); IDENT_RESERVED(__alignof); IDENT_RESERVED(__alignof__); 
-IDENT_RESERVED(_Alignof);
 IDENT_RESERVED(__sizeof_ptr__);
 IDENT_RESERVED(__builtin_types_compatible_p);
 IDENT_RESERVED(__builtin_offsetof);
@@ -88,12 +96,10 @@ IDENT(stdcall); IDENT(__stdcall__);
 IDENT(fastcall); IDENT(__fastcall__);
 IDENT(dllimport); IDENT(__dllimport__);
 IDENT(dllexport); IDENT(__dllexport__);
-IDENT(restrict); IDENT(__restrict); IDENT(__restrict__);
 IDENT(artificial); IDENT(__artificial__);
 IDENT(leaf); IDENT(__leaf__);
 IDENT(vector_size); IDENT(__vector_size__);
 IDENT(error); IDENT(__error__);
-IDENT(static);
 
 
 /* Preprocessor idents.  Direct use of __IDENT avoids mentioning the keyword
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] keyword: explicitly add C99 & C11 keywords
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 1/6] keyword: add test case for reserved '_Static_assert' Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 2/6] keyword: regroup the [reserved] keywords Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 4/6] keyword: add more reserved keywords to the test case Luc Van Oostenryck
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

Explicitly add the new keywords introduced by C99 & C11 to
the file "ident-list.h" and insure that they are marked as
reserved (even if not used, so we're future-ready).

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 ident-list.h          |  8 ++++++++
 validation/reserved.c | 21 ++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/ident-list.h b/ident-list.h
index dbed06858..709ffce01 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -30,10 +30,18 @@ IDENT(static);
 
 /* C99 keywords */
 IDENT(restrict); IDENT(__restrict); IDENT(__restrict__);
+IDENT(_Bool);
+IDENT_RESERVED(_Complex);
+IDENT_RESERVED(_Imaginary);
 
 /* C11 keywords */
+IDENT(_Alignas);
 IDENT_RESERVED(_Alignof);
+IDENT_RESERVED(_Atomic);
+IDENT_RESERVED(_Generic);
+IDENT(_Noreturn);
 IDENT_RESERVED(_Static_assert);
+IDENT(_Thread_local);
 
 /* Special case for L'\t' */
 IDENT(L);
diff --git a/validation/reserved.c b/validation/reserved.c
index 2ca9ac40a..546fd19dd 100644
--- a/validation/reserved.c
+++ b/validation/reserved.c
@@ -16,7 +16,17 @@ static int (__typeof__);
 static int (inline);
 static int (__inline);
 static int (__inline__);
+static int (_Alignas);
+static int (_Alignof);
+static int (_Atomic);
+static int (_Bool);
+static int (_Complex);
+static int (_Generic);
+static int (_Imaginary);
+static int (_Noreturn);
 static int (_Static_assert);
+static int (_Thread_local);
+
 /*
  * check-name: const et.al. are reserved identifiers
  * check-error-start:
@@ -38,6 +48,15 @@ reserved.c:15:12: error: Trying to use reserved word '__typeof__' as identifier
 reserved.c:16:12: error: Trying to use reserved word 'inline' as identifier
 reserved.c:17:12: error: Trying to use reserved word '__inline' as identifier
 reserved.c:18:12: error: Trying to use reserved word '__inline__' as identifier
-reserved.c:19:12: error: Trying to use reserved word '_Static_assert' as identifier
+reserved.c:19:12: error: Trying to use reserved word '_Alignas' as identifier
+reserved.c:20:12: error: Trying to use reserved word '_Alignof' as identifier
+reserved.c:21:12: error: Trying to use reserved word '_Atomic' as identifier
+reserved.c:22:12: error: Trying to use reserved word '_Bool' as identifier
+reserved.c:23:12: error: Trying to use reserved word '_Complex' as identifier
+reserved.c:24:12: error: Trying to use reserved word '_Generic' as identifier
+reserved.c:25:12: error: Trying to use reserved word '_Imaginary' as identifier
+reserved.c:26:12: error: Trying to use reserved word '_Noreturn' as identifier
+reserved.c:27:12: error: Trying to use reserved word '_Static_assert' as identifier
+reserved.c:28:12: error: Trying to use reserved word '_Thread_local' as identifier
  * check-error-end:
  */
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] keyword: add more reserved keywords to the test case
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
                   ` (2 preceding siblings ...)
  2017-05-05  1:50 ` [PATCH 3/6] keyword: explicitly add C99 & C11 keywords Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 5/6] keyword: add a comment about NS_TYPEDEF & reserved keywords Luc Van Oostenryck
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

The testsuite contains a test case checking if some reserved
keywords are indeed reserved. But this test case contains some
of the reserved keywords.

Change this by adding (most of) all reserved keywords.

Note: one of the reserved keyword not added is '__attribute__'
      because the syntax and our parsing doesn't allow us to
      properly make a test for it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 validation/reserved.c | 174 +++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 135 insertions(+), 39 deletions(-)

diff --git a/validation/reserved.c b/validation/reserved.c
index 546fd19dd..29554560b 100644
--- a/validation/reserved.c
+++ b/validation/reserved.c
@@ -1,21 +1,47 @@
-static int (struct);
-static int (union);
-static int (enum);
-static int (volatile);
-static int (__volatile);
-static int (__volatile__);
+static int (auto);
+static int (break);
+static int (case);
+static int (char);
 static int (const);
 static int (__const);
 static int (__const__);
+static int (continue);
+static int (default);
+static int (do);
+static int (double);
+static int (else);
+static int (enum);
+static int (extern);
+static int (float);
+static int (for);
+static int (goto);
+static int (if);
+static int (inline);
+static int (__inline);
+static int (__inline__);
+static int (int);
+static int (long);
+static int (register);
 static int (restrict);
 static int (__restrict);
 static int (__restrict__);
+static int (return);
+static int (short);
+static int (signed);
+static int (sizeof);
+static int (static);
+static int (struct);
+static int (switch);
 static int (typedef);
-static int (__typeof);
-static int (__typeof__);
-static int (inline);
-static int (__inline);
-static int (__inline__);
+static int (union);
+static int (unsigned);
+static int (void);
+static int (volatile);
+static int (volatile);
+static int (__volatile);
+static int (__volatile__);
+static int (while);
+
 static int (_Alignas);
 static int (_Alignof);
 static int (_Atomic);
@@ -27,36 +53,106 @@ static int (_Noreturn);
 static int (_Static_assert);
 static int (_Thread_local);
 
+// Sparse extensions
+static int (__context__);
+static int (__range__);
+static int (__sizeof_ptr__);
+
+// GCC extensions
+static int (__alignof);
+static int (__alignof__);
+static int (asm);			// not reserved!
+static int (__asm);
+static int (__asm__);
+static int (__label__);
+static int (__thread);
+static int (typeof);
+static int (__typeof);
+static int (__typeof__);
+
+static int (__int128);
+static int (__int128_t);
+static int (__uint128_t);
+
+static int (__builtin_ms_va_list);
+static int (__builtin_offsetof);
+static int (__builtin_types_compatible_p);
+static int (__builtin_va_list);
+
 /*
  * check-name: const et.al. are reserved identifiers
  * check-error-start:
-reserved.c:1:12: error: Trying to use reserved word 'struct' as identifier
-reserved.c:2:12: error: Trying to use reserved word 'union' as identifier
-reserved.c:3:12: error: Trying to use reserved word 'enum' as identifier
-reserved.c:4:12: error: Trying to use reserved word 'volatile' as identifier
-reserved.c:5:12: error: Trying to use reserved word '__volatile' as identifier
-reserved.c:6:12: error: Trying to use reserved word '__volatile__' as identifier
-reserved.c:7:12: error: Trying to use reserved word 'const' as identifier
-reserved.c:8:12: error: Trying to use reserved word '__const' as identifier
-reserved.c:9:12: error: Trying to use reserved word '__const__' as identifier
-reserved.c:10:12: error: Trying to use reserved word 'restrict' as identifier
-reserved.c:11:12: error: Trying to use reserved word '__restrict' as identifier
-reserved.c:12:12: error: Trying to use reserved word '__restrict__' as identifier
-reserved.c:13:12: error: Trying to use reserved word 'typedef' as identifier
-reserved.c:14:12: error: Trying to use reserved word '__typeof' as identifier
-reserved.c:15:12: error: Trying to use reserved word '__typeof__' as identifier
-reserved.c:16:12: error: Trying to use reserved word 'inline' as identifier
-reserved.c:17:12: error: Trying to use reserved word '__inline' as identifier
-reserved.c:18:12: error: Trying to use reserved word '__inline__' as identifier
-reserved.c:19:12: error: Trying to use reserved word '_Alignas' as identifier
-reserved.c:20:12: error: Trying to use reserved word '_Alignof' as identifier
-reserved.c:21:12: error: Trying to use reserved word '_Atomic' as identifier
-reserved.c:22:12: error: Trying to use reserved word '_Bool' as identifier
-reserved.c:23:12: error: Trying to use reserved word '_Complex' as identifier
-reserved.c:24:12: error: Trying to use reserved word '_Generic' as identifier
-reserved.c:25:12: error: Trying to use reserved word '_Imaginary' as identifier
-reserved.c:26:12: error: Trying to use reserved word '_Noreturn' as identifier
-reserved.c:27:12: error: Trying to use reserved word '_Static_assert' as identifier
-reserved.c:28:12: error: Trying to use reserved word '_Thread_local' as identifier
+reserved.c:1:12: error: Trying to use reserved word 'auto' as identifier
+reserved.c:2:12: error: Trying to use reserved word 'break' as identifier
+reserved.c:3:12: error: Trying to use reserved word 'case' as identifier
+reserved.c:4:12: error: Trying to use reserved word 'char' as identifier
+reserved.c:5:12: error: Trying to use reserved word 'const' as identifier
+reserved.c:6:12: error: Trying to use reserved word '__const' as identifier
+reserved.c:7:12: error: Trying to use reserved word '__const__' as identifier
+reserved.c:8:12: error: Trying to use reserved word 'continue' as identifier
+reserved.c:9:12: error: Trying to use reserved word 'default' as identifier
+reserved.c:10:12: error: Trying to use reserved word 'do' as identifier
+reserved.c:11:12: error: Trying to use reserved word 'double' as identifier
+reserved.c:12:12: error: Trying to use reserved word 'else' as identifier
+reserved.c:13:12: error: Trying to use reserved word 'enum' as identifier
+reserved.c:14:12: error: Trying to use reserved word 'extern' as identifier
+reserved.c:15:12: error: Trying to use reserved word 'float' as identifier
+reserved.c:16:12: error: Trying to use reserved word 'for' as identifier
+reserved.c:17:12: error: Trying to use reserved word 'goto' as identifier
+reserved.c:18:12: error: Trying to use reserved word 'if' as identifier
+reserved.c:19:12: error: Trying to use reserved word 'inline' as identifier
+reserved.c:20:12: error: Trying to use reserved word '__inline' as identifier
+reserved.c:21:12: error: Trying to use reserved word '__inline__' as identifier
+reserved.c:22:12: error: Trying to use reserved word 'int' as identifier
+reserved.c:23:12: error: Trying to use reserved word 'long' as identifier
+reserved.c:24:12: error: Trying to use reserved word 'register' as identifier
+reserved.c:25:12: error: Trying to use reserved word 'restrict' as identifier
+reserved.c:26:12: error: Trying to use reserved word '__restrict' as identifier
+reserved.c:27:12: error: Trying to use reserved word '__restrict__' as identifier
+reserved.c:28:12: error: Trying to use reserved word 'return' as identifier
+reserved.c:29:12: error: Trying to use reserved word 'short' as identifier
+reserved.c:30:12: error: Trying to use reserved word 'signed' as identifier
+reserved.c:31:12: error: Trying to use reserved word 'sizeof' as identifier
+reserved.c:32:12: error: Trying to use reserved word 'static' as identifier
+reserved.c:33:12: error: Trying to use reserved word 'struct' as identifier
+reserved.c:34:12: error: Trying to use reserved word 'switch' as identifier
+reserved.c:35:12: error: Trying to use reserved word 'typedef' as identifier
+reserved.c:36:12: error: Trying to use reserved word 'union' as identifier
+reserved.c:37:12: error: Trying to use reserved word 'unsigned' as identifier
+reserved.c:38:12: error: Trying to use reserved word 'void' as identifier
+reserved.c:39:12: error: Trying to use reserved word 'volatile' as identifier
+reserved.c:40:12: error: Trying to use reserved word 'volatile' as identifier
+reserved.c:41:12: error: Trying to use reserved word '__volatile' as identifier
+reserved.c:42:12: error: Trying to use reserved word '__volatile__' as identifier
+reserved.c:43:12: error: Trying to use reserved word 'while' as identifier
+reserved.c:45:12: error: Trying to use reserved word '_Alignas' as identifier
+reserved.c:46:12: error: Trying to use reserved word '_Alignof' as identifier
+reserved.c:47:12: error: Trying to use reserved word '_Atomic' as identifier
+reserved.c:48:12: error: Trying to use reserved word '_Bool' as identifier
+reserved.c:49:12: error: Trying to use reserved word '_Complex' as identifier
+reserved.c:50:12: error: Trying to use reserved word '_Generic' as identifier
+reserved.c:51:12: error: Trying to use reserved word '_Imaginary' as identifier
+reserved.c:52:12: error: Trying to use reserved word '_Noreturn' as identifier
+reserved.c:53:12: error: Trying to use reserved word '_Static_assert' as identifier
+reserved.c:54:12: error: Trying to use reserved word '_Thread_local' as identifier
+reserved.c:57:12: error: Trying to use reserved word '__context__' as identifier
+reserved.c:58:12: error: Trying to use reserved word '__range__' as identifier
+reserved.c:59:12: error: Trying to use reserved word '__sizeof_ptr__' as identifier
+reserved.c:62:12: error: Trying to use reserved word '__alignof' as identifier
+reserved.c:63:12: error: Trying to use reserved word '__alignof__' as identifier
+reserved.c:65:12: error: Trying to use reserved word '__asm' as identifier
+reserved.c:66:12: error: Trying to use reserved word '__asm__' as identifier
+reserved.c:67:12: error: Trying to use reserved word '__label__' as identifier
+reserved.c:68:12: error: Trying to use reserved word '__thread' as identifier
+reserved.c:69:12: error: Trying to use reserved word 'typeof' as identifier
+reserved.c:70:12: error: Trying to use reserved word '__typeof' as identifier
+reserved.c:71:12: error: Trying to use reserved word '__typeof__' as identifier
+reserved.c:73:12: error: Trying to use reserved word '__int128' as identifier
+reserved.c:74:12: error: Trying to use reserved word '__int128_t' as identifier
+reserved.c:75:12: error: Trying to use reserved word '__uint128_t' as identifier
+reserved.c:77:12: error: Trying to use reserved word '__builtin_ms_va_list' as identifier
+reserved.c:78:12: error: Trying to use reserved word '__builtin_offsetof' as identifier
+reserved.c:79:12: error: Trying to use reserved word '__builtin_types_compatible_p' as identifier
+reserved.c:80:12: error: Trying to use reserved word '__builtin_va_list' as identifier
  * check-error-end:
  */
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] keyword: add a comment about NS_TYPEDEF & reserved keywords
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
                   ` (3 preceding siblings ...)
  2017-05-05  1:50 ` [PATCH 4/6] keyword: add more reserved keywords to the test case Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-05  1:50 ` [PATCH 6/6] keyword: no pre-declaration needed for attribute names Luc Van Oostenryck
  2017-05-07  5:15 ` [PATCH 0/6] keyword cleanup Christopher Li
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

There is two ways a keyword can be marked as reserved:
- explicitly, by using IDENT_RESERVED() in "ident-list.h"
- implicitly, by using NS_TYPEDEF as namespace in parse.c::keyword_table

Since the implicit way is not obvious, help to make it more clear
by adding a small comment on top of keyword_table[].

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 parse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/parse.c b/parse.c
index eefc0c330..b2bef64f0 100644
--- a/parse.c
+++ b/parse.c
@@ -407,6 +407,7 @@ static struct symbol_op mode_word_op = {
 	.to_mode = to_word_mode
 };
 
+/* Using NS_TYPEDEF will also make the keyword a reserved one */
 static struct init_keyword {
 	const char *name;
 	enum namespace ns;
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] keyword: no pre-declaration needed for attribute names
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
                   ` (4 preceding siblings ...)
  2017-05-05  1:50 ` [PATCH 5/6] keyword: add a comment about NS_TYPEDEF & reserved keywords Luc Van Oostenryck
@ 2017-05-05  1:50 ` Luc Van Oostenryck
  2017-05-07  5:15 ` [PATCH 0/6] keyword cleanup Christopher Li
  6 siblings, 0 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2017-05-05  1:50 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck

Currently, we have a whole bunch of attribute names whose
identifier is declared with IDENT() in "ident-list.h".

However, these names doesn't need to be so declared as their
identifier is never directly used and are otherwise dynamically
created via parse.c:keyword_table[] and init_parser().

So remove all of them from the "ident-list.h" file.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 ident-list.h | 56 --------------------------------------------------------
 1 file changed, 56 deletions(-)

diff --git a/ident-list.h b/ident-list.h
index 709ffce01..130875741 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -54,62 +54,6 @@ IDENT_RESERVED(__builtin_types_compatible_p);
 IDENT_RESERVED(__builtin_offsetof);
 IDENT_RESERVED(__label__);
 
-/* Attribute names */
-IDENT(packed); IDENT(__packed__);
-IDENT(aligned); IDENT(__aligned__);
-IDENT(nocast);
-IDENT(noderef);
-IDENT(safe);
-IDENT(force);
-IDENT(address_space);
-IDENT(context);
-IDENT(mode); IDENT(__mode__);
-IDENT(QI); IDENT(__QI__);
-IDENT(HI); IDENT(__HI__);
-IDENT(SI); IDENT(__SI__);
-IDENT(DI); IDENT(__DI__);
-IDENT(word); IDENT(__word__);
-IDENT(format); IDENT(__format__);
-IDENT(section); IDENT(__section__);
-IDENT(unused); IDENT(__unused__);
-IDENT(const); IDENT(__const); IDENT(__const__);
-IDENT(used); IDENT(__used__);
-IDENT(warn_unused_result); IDENT(__warn_unused_result__);
-IDENT(noinline); IDENT(__noinline__);
-IDENT(deprecated); IDENT(__deprecated__);
-IDENT(noreturn); IDENT(__noreturn__);
-IDENT(regparm); IDENT(__regparm__);
-IDENT(weak); IDENT(__weak__);
-IDENT(no_instrument_function); IDENT(__no_instrument_function__);
-IDENT(sentinel); IDENT(__sentinel__);
-IDENT(alias); IDENT(__alias__);
-IDENT(pure); IDENT(__pure__);
-IDENT(always_inline); IDENT(__always_inline__);
-IDENT(syscall_linkage); IDENT(__syscall_linkage__);
-IDENT(visibility); IDENT(__visibility__);
-IDENT(bitwise); IDENT(__bitwise__);
-IDENT(model); IDENT(__model__);
-IDENT(format_arg); IDENT(__format_arg__);
-IDENT(nothrow); IDENT(__nothrow); IDENT(__nothrow__);
-IDENT(__transparent_union__);
-IDENT(malloc);
-IDENT(__malloc__);
-IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
-IDENT(constructor); IDENT(__constructor__);
-IDENT(destructor); IDENT(__destructor__);
-IDENT(cold); IDENT(__cold__);
-IDENT(hot); IDENT(__hot__);
-IDENT(cdecl); IDENT(__cdecl__);
-IDENT(stdcall); IDENT(__stdcall__);
-IDENT(fastcall); IDENT(__fastcall__);
-IDENT(dllimport); IDENT(__dllimport__);
-IDENT(dllexport); IDENT(__dllexport__);
-IDENT(artificial); IDENT(__artificial__);
-IDENT(leaf); IDENT(__leaf__);
-IDENT(vector_size); IDENT(__vector_size__);
-IDENT(error); IDENT(__error__);
-

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/6] keyword cleanup
  2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
                   ` (5 preceding siblings ...)
  2017-05-05  1:50 ` [PATCH 6/6] keyword: no pre-declaration needed for attribute names Luc Van Oostenryck
@ 2017-05-07  5:15 ` Christopher Li
  6 siblings, 0 replies; 8+ messages in thread
From: Christopher Li @ 2017-05-07  5:15 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Linux-Sparse

On Thu, May 4, 2017 at 9:50 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> The recent patch "add support for _Static_assert" triggered
> some spring cleanup of the "ident-list.h" file.
> The changes in this series are mainly moving around some
> definitions and removing unneeded ones.

This series looks good to me.

Chris

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-07 22:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05  1:50 [PATCH 0/6] keyword cleanup Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 1/6] keyword: add test case for reserved '_Static_assert' Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 2/6] keyword: regroup the [reserved] keywords Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 3/6] keyword: explicitly add C99 & C11 keywords Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 4/6] keyword: add more reserved keywords to the test case Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 5/6] keyword: add a comment about NS_TYPEDEF & reserved keywords Luc Van Oostenryck
2017-05-05  1:50 ` [PATCH 6/6] keyword: no pre-declaration needed for attribute names Luc Van Oostenryck
2017-05-07  5:15 ` [PATCH 0/6] keyword cleanup Christopher Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.