From 691ed5ee7aeaaf365814f3b569f68c387e743a55 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 28 Aug 2008 12:34:55 +0000 Subject: [PATCH] Add the GCC options -f(no-)dollars-in-identifiers. [r21545] --- lexer.h | 2 +- main.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lexer.h b/lexer.h index b1120cf..35b2fb3 100644 --- a/lexer.h +++ b/lexer.h @@ -24,7 +24,7 @@ #include "token_t.h" extern token_t lexer_token; -extern bool allow_dollar_in_symbols; +extern bool allow_dollar_in_symbol; void lexer_next_token(void); diff --git a/main.c b/main.c index 84bba12..82baf22 100644 --- a/main.c +++ b/main.c @@ -106,9 +106,6 @@ bool strict_mode = false; /** use builtins for some libc functions */ bool use_builtins = false; -/** allow dollar signs in symbols */ -extern bool allow_dollar_in_symbols; - /* to switch on printing of implicit casts */ extern bool print_implicit_casts; @@ -620,7 +617,11 @@ int main(int argc, char **argv) const char *opt; GET_ARG_AFTER(opt, "-f"); - if(strcmp(opt, "syntax-only") == 0) { + if (strcmp(opt, "dollars-in-identifiers") == 0) { + allow_dollar_in_symbol = true; + } else if (strcmp(opt, "no-dollars-in-identifiers") == 0) { + allow_dollar_in_symbol = false; + } else if (strcmp(opt, "syntax-only") == 0) { mode = ParseOnly; } else if(strcmp(opt, "omit-frame-pointer") == 0) { set_be_option("omitfp"); -- 2.20.1