aboutsummaryrefslogtreecommitdiff
path: root/driver.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-11-20 12:43:53 -0800
committerMichael Forney <mforney@mforney.org>2019-11-20 12:43:53 -0800
commitf12ae432305a0cdef1bf46ce1617637eaaf72cbc (patch)
tree4120642366cc5d59d43964f3cf8c373866615982 /driver.c
parentd9d91de05830b782bcf09183df43e44b114a866a (diff)
driver: Pass -std=* through to the preprocessor
This will prevent the preprocessor from defining several unreserved identifiers when built with an ISO C language standard, which may conflict with identifiers used by the program being built.
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver.c b/driver.c
index 29452c3..0d9c897 100644
--- a/driver.c
+++ b/driver.c
@@ -431,7 +431,9 @@ main(int argc, char *argv[])
} else if (strcmp(arg, "-pipe") == 0) {
/* ignore */
} else if (strncmp(arg, "-std=", 5) == 0) {
- /* ignore */
+ /* pass through to the preprocessor, it may
+ * affect its default definitions */
+ arrayaddptr(&stages[PREPROCESS].cmd, arg);
} else if (strcmp(arg, "-pedantic") == 0) {
/* ignore */
} else {