summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsayjones.plus.com>2018-11-19 20:50:37 +0000
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-11-24 18:29:01 +0100
commitea3b2526d48aba9e5f3d30e1ce6e81cb12e9cacc (patch)
tree33420943af73cf232b3b9ebb1331a40dc5996419
parentf32b8b2f6e79db2e72c1e57b29da6dd8a94b4478 (diff)
downloadsparse-ea3b2526d48aba9e5f3d30e1ce6e81cb12e9cacc.tar.gz
pre-process: don't put spaces in macro parameter list
The dump_macros() function adds a ", " separator between the arguments of a function-like macro. Using a simple "," separator, which aligns the output with gcc, leads to one less distraction when comparing the output of sparse and gcc. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--pre-process.c2
-rw-r--r--validation/preprocessor/dump-macros.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/pre-process.c b/pre-process.c
index f9480fd4..a258da68 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -2184,7 +2184,7 @@ static void dump_macro(struct symbol *sym)
continue;
printf("%s%s", sep, show_token(token));
args[narg++] = token;
- sep = ", ";
+ sep = ",";
}
putchar(')');
}
diff --git a/validation/preprocessor/dump-macros.c b/validation/preprocessor/dump-macros.c
index 5a964649..f8983d82 100644
--- a/validation/preprocessor/dump-macros.c
+++ b/validation/preprocessor/dump-macros.c
@@ -19,5 +19,5 @@ check-output-contains: #define IJK ijk
check-output-contains: #define DEF xyz
check-output-contains: #define NYDEF ydef
check-output-contains: #define STRING(x) #x
-check-output-contains: #define CONCAT(x, y) x ## y
+check-output-contains: #define CONCAT(x,y) x ## y
*/