X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCmain.c;h=da935a7aba8ec63c4e95191de277ee21c781e96a;hb=551b5c5f6e0c2592db0d1076bdd41c9822406406;hp=3460abbd496d31d2b9e7f339f5a943904455cf36;hpb=96d38082954b27937548beb827a4038f9e7c8a55;p=fw%2Fsdcc diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 3460abbd..da935a7a 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -142,6 +142,7 @@ char buffer[PATH_MAX * 2]; #define OPTION_STD_SDCC99 "--std-sdcc99" #define OPTION_CODE_SEG "--codeseg" #define OPTION_CONST_SEG "--constseg" +#define OPTION_DOLLARS_IN_IDENT "--fdollars-in-identifiers" static const OPTION optionsTable[] = { @@ -176,6 +177,7 @@ optionsTable[] = { { 0, OPTION_STD_SDCC89, NULL, "Use C89 standard with SDCC extensions (default)" }, { 0, OPTION_STD_C99, NULL, "Use C99 standard only (incomplete)" }, { 0, OPTION_STD_SDCC99, NULL, "Use C99 standard with SDCC extensions (incomplete)" }, + { 0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character" }, { 0, NULL, NULL, "Code generation options"}, { 'm', NULL, NULL, "Set the port to use e.g. -mz80." }, @@ -2017,6 +2019,10 @@ preProcess (char **envp) addSet(&preArgvSet, buf); } + /* if using dollar signs in identifiers */ + if (options.dollars_in_ident) + addSet(&preArgvSet, Safe_strdup("--fdollars-in-identifiers")); + /* if using external stack define the macro */ if (options.useXstack) addSet(&preArgvSet, Safe_strdup("-DSDCC_USE_XSTACK"));