All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Josh Triplett <josh@freedesktop.org>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: [PATCH 3/5] Add (more) support for WIN32 attribute names
Date: Tue, 22 May 2007 19:00:53 +0100	[thread overview]
Message-ID: <46532FD5.6000307@ramsay1.demon.co.uk> (raw)


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

             reply	other threads:[~2007-05-22 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 18:00 Ramsay Jones [this message]
2007-05-22 22:50 ` [PATCH 3/5] Add (more) support for WIN32 attribute names Josh Triplett
2007-05-24 15:59   ` Ramsay Jones
2007-05-24 17:24     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46532FD5.6000307@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=josh@freedesktop.org \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.