From c8408b459b88a5aa5f4325e690aef95b5da7c2eb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 14 Feb 2010 21:42:06 +0100 Subject: [PATCH] PR11281 Allow negative values for -D argument. Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$". * main.cxx (main): case 'D' allow optional single minus sign after equal in assert_regexp_match(). --- main.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cxx b/main.cxx index b5fdbc0cf..faac7f811 100644 --- a/main.cxx +++ b/main.cxx @@ -821,7 +821,7 @@ main (int argc, char * const argv []) break; case 'D': - assert_regexp_match ("-D parameter", optarg, "^[a-z_][a-z_0-9]*(=[a-z_0-9]+)?$"); + assert_regexp_match ("-D parameter", optarg, "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$"); if (client_options) client_options_disallowed += client_options_disallowed.empty () ? "-D" : ", -D"; s.macros.push_back (string (optarg)); -- 2.43.5