diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2003-06-12 06:09:15 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2003-06-12 06:09:15 +0000 |
commit | 78b8811a387bd5f91d4b0a70fdd63e043ffa4bf9 (patch) | |
tree | 0ab8d16523fbcbfca756131fa06162d509f6269a /gcc/cpplex.c | |
parent | ed44683592f6503ce41f466aa075aa146235ca11 (diff) | |
download | gcc-78b8811a387bd5f91d4b0a70fdd63e043ffa4bf9.zip gcc-78b8811a387bd5f91d4b0a70fdd63e043ffa4bf9.tar.gz gcc-78b8811a387bd5f91d4b0a70fdd63e043ffa4bf9.tar.bz2 |
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/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index a79bedd..e072f01 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1,5 +1,5 @@ /* CPP Library - lexical analysis. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Per Bothner, 1994-95. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -402,9 +402,9 @@ forms_identifier_p (pfile, first) return false; buffer->cur++; - if (pfile->warn_dollars && !pfile->state.skipping) + if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) { - pfile->warn_dollars = false; + CPP_OPTION (pfile, warn_dollars) = 0; cpp_error (pfile, DL_PEDWARN, "'$' in identifier or number"); } |