aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-10-09 16:22:20 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-10-09 16:22:20 -0400
commit9e979f8fd8fb1ac8a2402e5c3b9e4f4a51783712 (patch)
treedf4e878adecbb32de20a05fe8e07a33da294d747 /gcc/cpplib.c
parent45870676ab967902f35a749539872ebeef705776 (diff)
downloadgcc-9e979f8fd8fb1ac8a2402e5c3b9e4f4a51783712.zip
gcc-9e979f8fd8fb1ac8a2402e5c3b9e4f4a51783712.tar.gz
gcc-9e979f8fd8fb1ac8a2402e5c3b9e4f4a51783712.tar.bz2
(cpp_options_init): Ignore DOLLARS_IN_IDENTIFIERS.
(parse_name): Diagnose $ in identifier if pedantic. (cpp_handle_options): -traditional no longer messes with dollars_in_ident. From-SVN: r12935
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 6719c82..24ac342 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -785,7 +785,6 @@ cpp_options_init (opts)
/* Initialize is_idchar to allow $. */
opts->dollars_in_ident = 1;
initialize_char_syntax (opts);
- opts->dollars_in_ident = DOLLARS_IN_IDENTIFIERS > 0;
opts->no_line_commands = 0;
opts->no_trigraphs = 1;
@@ -5228,6 +5227,9 @@ parse_name (pfile, c)
break;
}
+ if (c == '$' && CPP_PEDANTIC (pfile))
+ cpp_pedwarn ("`$' in identifier");
+
CPP_RESERVE(pfile, 2); /* One more for final NUL. */
CPP_PUTC_Q (pfile, c);
c = GETC();
@@ -6418,8 +6420,6 @@ cpp_handle_options (pfile, argc, argv)
case 't':
if (!strcmp (argv[i], "-traditional")) {
opts->traditional = 1;
- if (opts->dollars_in_ident > 0)
- opts->dollars_in_ident = 1;
} else if (!strcmp (argv[i], "-trigraphs")) {
if (!opts->chill)
opts->no_trigraphs = 0;