cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit f12ae432305a0cdef1bf46ce1617637eaaf72cbc
parent d9d91de05830b782bcf09183df43e44b114a866a
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 20 Nov 2019 12:43:53 -0800

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:
Mdriver.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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 {