aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-04-23 22:44:06 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-04-23 22:44:06 +0000
commit6338b35872d465cf27fdbbc43b5a146363c8f246 (patch)
treee4f819e101d1dc188ae9d2012e0cb8ab2239160d /gcc/cp
parent06f5e63748eeb66140858914bbffb149406789a9 (diff)
downloadgcc-6338b35872d465cf27fdbbc43b5a146363c8f246.zip
gcc-6338b35872d465cf27fdbbc43b5a146363c8f246.tar.gz
gcc-6338b35872d465cf27fdbbc43b5a146363c8f246.tar.bz2
Makefile.in (c-lex.o, [...]): Update.
* Makefile.in (c-lex.o, LIBCPP_OBJS, cpplex.o): Update. * c-lex.c (MULTIBYTE_CHARS): Remove conditionals. (lex_string): Take cpp_string with full spelling. (cb_ident): Update. (c_lex): Update diagnostics. * cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL. (create_literal): New. (lex_string): Unterminated literals have type CPP_OTHER. (_cpp_lex_direct): Update calls to lex_string. Use create_literal for CPP_OTHER. (cpp_token_len, cpp_spell_token, cpp_output_token): Simplify. (_cpp_equiv_tokens, cpp_interpret_charconst): Update. * cpplib.c (parse_include, do_line, do_linemarker, destringize_and_run): Update for token storing full spelling. * cpplib.h: Update token spelling types. * cppmacro.c (stringify_arg, check_trad_stringification): Update for token storing full spelling. cp: * Make-lang.in (lex.o): Remove mbchar.h. * lex.c (MULTIBYTE_CHARS): Lose. * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled in c-lex.c. testsuite: * gcc.dg/cpp/include2.c: Update. * gcc.dg/cpp/multiline-2.c: New. * gcc.dg/cpp/multiline.c: Update. * gcc.dg/cpp/strify2.c: Update. * gcc.dg/cpp/trad/literals-2.c: Update. From-SVN: r66019
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/Make-lang.in2
-rw-r--r--gcc/cp/lex.c5
-rw-r--r--gcc/cp/parser.c4
4 files changed, 8 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 723f67a..13d2c54 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2003-04-23 Neil Booth <neil@daikokuya.co.uk>
+
+ * Make-lang.in (lex.o): Remove mbchar.h.
+ * lex.c (MULTIBYTE_CHARS): Lose.
+ * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
+ in c-lex.c.
+
2003-04-23 Mark Mitchell <mark@codesourcery.com>
PR c++/9847
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 6e66a77..c8d27ab 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -228,7 +228,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h c-common.h \
$(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h
cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h \
- c-pragma.h toplev.h output.h mbchar.h input.h diagnostic.h \
+ c-pragma.h toplev.h output.h input.h diagnostic.h \
cp/operators.def $(TM_P_H)
cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h langhooks.h \
$(LANGHOOKS_DEF_H) c-common.h
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 617be82..5ecb03e 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -40,11 +40,6 @@ Boston, MA 02111-1307, USA. */
#include "timevar.h"
#include "diagnostic.h"
-#ifdef MULTIBYTE_CHARS
-#include "mbchar.h"
-#include <locale.h>
-#endif
-
static int interface_strcmp PARAMS ((const char *));
static void init_cp_pragma PARAMS ((void));
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7515089..2d54e7e 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -644,10 +644,6 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
error ("invalid token");
break;
- case CPP_OTHER:
- /* These tokens are already warned about by c_lex. */
- break;
-
default:
/* This is a good token, so we exit the loop. */
done = true;