aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2003-06-12 06:09:15 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2003-06-12 06:09:15 +0000
commit78b8811a387bd5f91d4b0a70fdd63e043ffa4bf9 (patch)
tree0ab8d16523fbcbfca756131fa06162d509f6269a /gcc/cppinit.c
parented44683592f6503ce41f466aa075aa146235ca11 (diff)
Don't warn on dollars in builtin macro definitions,
e.g. __REGISTER_PREFIX__. * cpphash.h (struct cpp_reader): Move member warn_dollars... * cpplib.h (struct cpp_options): ...to here. Change type to unsigned char. * cppinit.c (cpp_create_reader): Set it to 1 here. (post_options): Don't set it here. * c-opts.c (c_common_init_options): Reset it to 0 here. (finish_options): Set it here. * cpplex.c (forms_identifier_p): Tweak for new location of warn_dollars. From-SVN: r67824
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index d6e7ae426d2..cace8b9f5db 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -151,6 +151,7 @@ cpp_create_reader (lang, table)
CPP_OPTION (pfile, warn_deprecated) = 1;
CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99);
CPP_OPTION (pfile, dollars_in_ident) = 1;
+ CPP_OPTION (pfile, warn_dollars) = 1;
/* Default CPP arithmetic to something sensible for the host for the
benefit of dumb users like fix-header. */
@@ -570,11 +571,4 @@ post_options (pfile)
CPP_OPTION (pfile, trigraphs) = 0;
CPP_OPTION (pfile, warn_trigraphs) = 0;
}
-
- /* C99 permits implementation-defined characters in identifiers.
- The documented meaning of -std= is to turn off extensions that
- conflict with the specified standard, and since a strictly
- conforming program cannot contain a '$', we do not condition
- their acceptance on the -std= setting. */
- pfile->warn_dollars = CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99);
}