From 717a457b697a46b8904792d59cf568d848fb2a73 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 18 Feb 2010 23:22:18 +0100 Subject: Allow CONFIG_foo COMPARISON-OP number in preprocessor conditionals. * parse.cxx (eval_pp_conditional): Handle r->type == tok_number when l->type == tok_identifier. * testsuite/semok/config_number.stp: New test. --- testsuite/semok/config_number.stp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 testsuite/semok/config_number.stp (limited to 'testsuite') diff --git a/testsuite/semok/config_number.stp b/testsuite/semok/config_number.stp new file mode 100755 index 00000000..b384c3e5 --- /dev/null +++ b/testsuite/semok/config_number.stp @@ -0,0 +1,20 @@ +#! stap -p2 + +# check that number comparisons work in CONFIG checks +probe + %( CONFIG_NR_CPUS == 13 %? + noprobe + %: + %( CONFIG_NR_CPUS < 1 %? + nonoprobe + %: + %( CONFIG_NR_CPUS >= 0 %? + begin + %: + nononoprobe + %) + %) + %) +{ + exit() +} -- cgit