linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Christopher Li <sparse@chrisli.org>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 1/2] fix: missing evaluate with '-include' : add testcase
Date: Sun, 17 Sep 2017 12:05:51 +0200	[thread overview]
Message-ID: <20170917100552.72288-2-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170917100552.72288-1-luc.vanoostenryck@gmail.com>

Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 validation/include-eval.c   |  7 +++++++
 validation/include-eval.inc | 12 ++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 validation/include-eval.c
 create mode 100644 validation/include-eval.inc

diff --git a/validation/include-eval.c b/validation/include-eval.c
new file mode 100644
index 000000000..bf9bf63fe
--- /dev/null
+++ b/validation/include-eval.c
@@ -0,0 +1,7 @@
+/* nothing */
+
+/*
+ * check-name: include-eval.c
+ * check-command: sparse -include ./include-eval.inc $file
+ * check-known-to-fail
+ */
diff --git a/validation/include-eval.inc b/validation/include-eval.inc
new file mode 100644
index 000000000..e2561ca41
--- /dev/null
+++ b/validation/include-eval.inc
@@ -0,0 +1,12 @@
+typedef unsigned long long_t;
+
+inline
+static unsigned int ok(void)
+{
+	return sizeof(long_t);
+}
+
+static unsigned int ko(void)
+{
+	return sizeof(long_t);
+}
-- 
2.14.0


  reply	other threads:[~2017-09-17 10:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHmME9o--jumLrBbRn63ewKOE49+uYJ9B8V5FocptdwZ5Kd9Fw@mail.gmail.com>
2017-04-04 20:12 ` sparse with 4.10? Luc Van Oostenryck
     [not found]   ` <CAHmME9qu6p344M_VnubGtRYvbM7+w4kDmHGJG_PZvLK0kaheOw@mail.gmail.com>
2017-09-16 12:25     ` Jason A. Donenfeld
2017-09-16 14:33       ` Luc Van Oostenryck
2017-09-17 10:05       ` [PATCH 0/2] fix missing evaluation when using '-include <file>' Luc Van Oostenryck
2017-09-17 10:05         ` Luc Van Oostenryck [this message]
2017-09-17 10:05         ` [PATCH 2/2] fix: missing evaluate with '-include' Luc Van Oostenryck
2017-09-17 11:59         ` [PATCH 0/2] fix missing evaluation when using '-include <file>' Jason A. Donenfeld
2017-09-17 19:02           ` Luc Van Oostenryck
2017-11-05 16:52             ` Luc Van Oostenryck
2018-01-30 13:23               ` Jason A. Donenfeld
2018-02-10 20:02                 ` Luc Van Oostenryck
2018-02-13 23:49                   ` Christopher Li
2018-02-14  0:02                     ` Luc Van Oostenryck
2018-02-14 12:15                       ` Jason A. Donenfeld
2018-02-15  0:00                         ` 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=20170917100552.72288-2-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).