From 1989a6dd37a81eabb79952b6125e482a4d0b24c7 Mon Sep 17 00:00:00 2001 From: Zeex Date: Sun, 5 Jan 2014 16:29:34 +0700 Subject: [PATCH] Allow multiple warnings in #pragma warning enable/disable Make it possible to specify multiple warning numbers in #pragma warning enable/disable. The values must be separated with commas (possibly with whitespace in between). --- source/compiler/sc2.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index 55c8a8b..b2ca69e 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -1175,12 +1175,16 @@ static int command(void) if (ok) { if (strcmp(str,"enable")==0) { cell val; - preproc_expr(&val,NULL); - pc_enablewarning(val,1); + do { + preproc_expr(&val,NULL); + pc_enablewarning(val,1); + } while (*lptr!='\0'); } else if (strcmp(str,"disable")==0) { cell val; - preproc_expr(&val,NULL); - pc_enablewarning(val,0); + do { + preproc_expr(&val,NULL); + pc_enablewarning(val,0); + } while (*lptr!='\0'); } else if (strcmp(str,"push")==0) { pc_pushwarnings(); } else if (strcmp(str,"pop")==0) {