Add the GCC options -f(no-)dollars-in-identifiers.
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 28 Aug 2008 12:34:55 +0000 (12:34 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 28 Aug 2008 12:34:55 +0000 (12:34 +0000)
[r21545]

lexer.h
main.c

diff --git a/lexer.h b/lexer.h
index b1120cf..35b2fb3 100644 (file)
--- 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 (file)
--- 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");