All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Recognize and ignore _Complex, artificial and vector_size
@ 2011-08-04 21:38 Pavel Roskin
  2011-08-04 22:49 ` Christopher Li
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Roskin @ 2011-08-04 21:38 UTC (permalink / raw)
  To: linux-sparse

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 ident-list.h |    2 ++
 parse.c      |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ident-list.h b/ident-list.h
index b94aece..973bf57 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -87,6 +87,8 @@ IDENT(fastcall); IDENT(__fastcall__);
 IDENT(dllimport); IDENT(__dllimport__);
 IDENT(dllexport); IDENT(__dllexport__);
 IDENT(restrict); IDENT(__restrict);
+IDENT(artificial); IDENT(__artificial__);
+IDENT(vector_size); IDENT(__vector_size__);
 
 /* Preprocessor idents.  Direct use of __IDENT avoids mentioning the keyword
  * itself by name, preventing these tokens from expanding when compiling
diff --git a/parse.c b/parse.c
index 537055f..1c3e305 100644
--- a/parse.c
+++ b/parse.c
@@ -145,6 +145,10 @@ static struct symbol_op restrict_op = {
 	.type = KW_QUALIFIER,
 };
 
+static struct symbol_op complex_op = {
+	.type = KW_QUALIFIER,
+};
+
 static struct symbol_op typeof_op = {
 	.type = KW_SPECIFIER,
 	.declarator = typeof_specifier,
@@ -419,6 +423,7 @@ static struct init_keyword {
 	/* Ignored for now.. */
 	{ "restrict",	NS_TYPEDEF, .op = &restrict_op},
 	{ "__restrict",	NS_TYPEDEF, .op = &restrict_op},
+	{ "_Complex",	NS_TYPEDEF, .op = &complex_op},
 
 	/* Storage class */
 	{ "auto",	NS_TYPEDEF, .op = &auto_op },
@@ -486,6 +491,8 @@ const char *ignored_attributes[] = {
 	"__alloc_size__",
 	"always_inline",
 	"__always_inline__",
+	"artificial",
+	"__artificial__",
 	"bounded",
 	"__bounded__",
 	"cdecl",
@@ -563,6 +570,8 @@ const char *ignored_attributes[] = {
 	"__unused__",
 	"used",
 	"__used__",
+	"vector_size",
+	"__vector_size__",
 	"visibility",
 	"__visibility__",
 	"warn_unused_result",

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

* Re: [PATCH] Recognize and ignore _Complex, artificial and vector_size
  2011-08-04 21:38 [PATCH] Recognize and ignore _Complex, artificial and vector_size Pavel Roskin
@ 2011-08-04 22:49 ` Christopher Li
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2011-08-04 22:49 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-sparse

Do mind add a test case of _Complex? It can be a separate
patch.

It helps me understanding the usage of _Complex as well.

Thanks

Chris

On Thu, Aug 4, 2011 at 2:38 PM, Pavel Roskin <proski@gnu.org> wrote:
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
>
>  ident-list.h |    2 ++
>  parse.c      |    9 +++++++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/ident-list.h b/ident-list.h
> index b94aece..973bf57 100644
> --- a/ident-list.h
> +++ b/ident-list.h
> @@ -87,6 +87,8 @@ IDENT(fastcall); IDENT(__fastcall__);
>  IDENT(dllimport); IDENT(__dllimport__);
>  IDENT(dllexport); IDENT(__dllexport__);
>  IDENT(restrict); IDENT(__restrict);
> +IDENT(artificial); IDENT(__artificial__);
> +IDENT(vector_size); IDENT(__vector_size__);
>
>  /* Preprocessor idents.  Direct use of __IDENT avoids mentioning the keyword
>  * itself by name, preventing these tokens from expanding when compiling
> diff --git a/parse.c b/parse.c
> index 537055f..1c3e305 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -145,6 +145,10 @@ static struct symbol_op restrict_op = {
>        .type = KW_QUALIFIER,
>  };
>
> +static struct symbol_op complex_op = {
> +       .type = KW_QUALIFIER,
> +};
> +
>  static struct symbol_op typeof_op = {
>        .type = KW_SPECIFIER,
>        .declarator = typeof_specifier,
> @@ -419,6 +423,7 @@ static struct init_keyword {
>        /* Ignored for now.. */
>        { "restrict",   NS_TYPEDEF, .op = &restrict_op},
>        { "__restrict", NS_TYPEDEF, .op = &restrict_op},
> +       { "_Complex",   NS_TYPEDEF, .op = &complex_op},
>
>        /* Storage class */
>        { "auto",       NS_TYPEDEF, .op = &auto_op },
> @@ -486,6 +491,8 @@ const char *ignored_attributes[] = {
>        "__alloc_size__",
>        "always_inline",
>        "__always_inline__",
> +       "artificial",
> +       "__artificial__",
>        "bounded",
>        "__bounded__",
>        "cdecl",
> @@ -563,6 +570,8 @@ const char *ignored_attributes[] = {
>        "__unused__",
>        "used",
>        "__used__",
> +       "vector_size",
> +       "__vector_size__",
>        "visibility",
>        "__visibility__",
>        "warn_unused_result",
> --
> 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
>
--
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

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

end of thread, other threads:[~2011-08-04 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04 21:38 [PATCH] Recognize and ignore _Complex, artificial and vector_size Pavel Roskin
2011-08-04 22:49 ` 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.