All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/5] Add (more) support for WIN32 attribute names
@ 2007-05-22 18:00 Ramsay Jones
  2007-05-22 22:50 ` Josh Triplett
  0 siblings, 1 reply; 4+ messages in thread
From: Ramsay Jones @ 2007-05-22 18:00 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Sparse Mailing-list


In particular, the following identifiers (along with their __X__ variants)
are now accepted as attribute names: fastcall, dllimport and dllexport.
(cdecl and stdcall were added in baf2c5a84e by Michael Stefaniuc).
For now, at least, these attributes are just ignored.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
  ident-list.h |    7 +++++++
  parse.c      |    6 ++++++
  2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ident-list.h b/ident-list.h
index 7633a2f..d09c2ab 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -70,6 +70,13 @@ IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
  IDENT(__deprecated__);
  IDENT(__warn_unused_result__);

+/* WIN32 specific Attribute names */
+IDENT(cdecl); IDENT(__cdecl__);
+IDENT(stdcall); IDENT(__stdcall__);
+IDENT(fastcall); IDENT(__fastcall__);
+IDENT(dllimport); IDENT(__dllimport__);
+IDENT(dllexport); IDENT(__dllexport__);
+
  /* Preprocessor idents */
  __IDENT(pragma_ident, "__pragma__", 0);
  __IDENT(__VA_ARGS___ident, "__VA_ARGS__", 0);
diff --git a/parse.c b/parse.c
index b74c7c0..db5c9e6 100644
--- a/parse.c
+++ b/parse.c
@@ -327,6 +327,12 @@ static struct init_keyword {
  	{ "__cdecl__",	NS_KEYWORD,	.op = &ignore_attr_op },
  	{ "stdcall",	NS_KEYWORD,	.op = &ignore_attr_op },
  	{ "__stdcall__",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "fastcall",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "__fastcall__",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "dllimport",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "__dllimport__",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "dllexport",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "__dllexport__",	NS_KEYWORD,	.op = &ignore_attr_op },
  };

  void init_parser(int stream)
-- 
1.5.1

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

end of thread, other threads:[~2007-05-24 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-22 18:00 [PATCH 3/5] Add (more) support for WIN32 attribute names Ramsay Jones
2007-05-22 22:50 ` Josh Triplett
2007-05-24 15:59   ` Ramsay Jones
2007-05-24 17:24     ` Randy Dunlap

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.