From a195e296a9ee13fb3dc8f1de6e39448476c40eb7 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 2 Nov 2012 17:58:21 +0100 Subject: [PATCH] -E switch to set opt_pp_only --- gmqcc.h | 1 + main.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/gmqcc.h b/gmqcc.h index 42a5fc6..437cc8a 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -1012,6 +1012,7 @@ extern bool opts_dump; extern bool opts_werror; extern bool opts_forcecrc; extern uint16_t opts_forced_crc; +extern bool opts_pp_only; /*===================================================================*/ #define OPTS_FLAG(i) (!! (opts_flags[(i)/32] & (1<< ((i)%32)))) diff --git a/main.c b/main.c index 0ea96c4..a65a735 100644 --- a/main.c +++ b/main.c @@ -34,6 +34,7 @@ bool opts_memchk = false; bool opts_dump = false; bool opts_werror = false; bool opts_forcecrc = false; +bool opts_pp_only = false; uint16_t opts_forced_crc; @@ -61,6 +62,7 @@ static int usage() { printf(" -o, --output=file output file, defaults to progs.dat\n" " -a filename add an asm file to be assembled\n" " -s filename add a progs.src file to be used\n"); + printf(" -E stop after preprocessing\n"); printf(" -f enable a flag\n" " -fno- disable a flag\n" " -std standard select one of the following standards\n" @@ -212,6 +214,10 @@ static bool options_parse(int argc, char **argv) { exit(0); break; + case 'E': + opts_pp_only = true; + break; + /* handle all -fflags */ case 'f': util_strtocmd(argv[0]+2, argv[0]+2, strlen(argv[0]+2)+1); -- 2.39.2