gcc/libcpp
Jakub Jelinek 2c6e3f5540 charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
* charset.c (cpp_init_iconv): Initialize utf8_cset_desc.
	(_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc
	and char32_cset_desc.
	(converter_for_type): Handle CPP_UTF8STRING.
	(cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings.
	* directives.c (get__Pragma_string): Handle CPP_UTF8STRING.
	(parse_include): Reject raw strings.
	* include/cpplib.h (CPP_UTF8STRING): New token type.
	* internal.h (struct cpp_reader): Add utf8_cset_desc field.
	* lex.c (lex_raw_string): New function.
	(lex_string): Handle u8 string literals, call lex_raw_string
	for raw string literals.
	(_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R"
	sequences.
	* macro.c (stringify_arg): Handle CPP_UTF8STRING.

	* c-common.c (c_parse_error): Handle CPP_UTF8STRING.
	* c-lex.c (c_lex_with_flags): Likewise.  Test C_LEX_STRING_NO_JOIN
	instead of C_LEX_RAW_STRINGS.
	(lex_string): Handle CPP_UTF8STRING.
	* c-parser.c (c_parser_postfix_expression): Likewise.
	* c-pragma.h (C_LEX_RAW_STRINGS): Rename to ...
	(C_LEX_STRING_NO_JOIN): ... this.

	* parser.c (cp_lexer_print_token, cp_parser_is_string_literal,
	cp_parser_string_literal, cp_parser_primary_expression): Likewise.
	(cp_lexer_get_preprocessor_token): Use C_LEX_STRING_JOIN instead
	of C_LEX_RAW_STRINGS.

	* gcc.dg/raw-string-1.c: New test.
	* gcc.dg/raw-string-2.c: New test.
	* gcc.dg/raw-string-3.c: New test.
	* gcc.dg/raw-string-4.c: New test.
	* gcc.dg/raw-string-5.c: New test.
	* gcc.dg/raw-string-6.c: New test.
	* gcc.dg/raw-string-7.c: New test.
	* gcc.dg/utf8-1.c: New test.
	* gcc.dg/utf8-2.c: New test.
	* gcc.dg/utf-badconcat2.c: New test.
	* gcc.dg/utf-dflt2.c: New test.
	* gcc.dg/cpp/include6.c: New test.
	* g++.dg/ext/raw-string-1.C: New test.
	* g++.dg/ext/raw-string-2.C: New test.
	* g++.dg/ext/raw-string-3.C: New test.
	* g++.dg/ext/raw-string-4.C: New test.
	* g++.dg/ext/raw-string-5.C: New test.
	* g++.dg/ext/raw-string-6.C: New test.
	* g++.dg/ext/raw-string-7.C: New test.
	* g++.dg/ext/utf8-1.C: New test.
	* g++.dg/ext/utf8-2.C: New test.
	* g++.dg/ext/utf-badconcat2.C: New test.
	* g++.dg/ext/utf-dflt2.C: New test.

From-SVN: r152995
2009-10-19 23:41:15 +02:00
..
include charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
po * cpplib.pot: Regenerate. 2009-10-17 14:46:26 +01:00
aclocal.m4 Regenerate tree using Autoconf 2.64 and Automake 1.11. 2009-08-22 13:22:20 +00:00
ChangeLog charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
charset.c charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
config.in Regenerate tree using Autoconf 2.64 and Automake 1.11. 2009-08-22 13:22:20 +00:00
configure configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h. 2009-09-23 15:21:42 +00:00
configure.ac configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h. 2009-09-23 15:21:42 +00:00
directives-only.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
directives.c charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
errors.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
expr.c expr.c (num_div_op): Take explicit location. 2009-06-18 15:10:23 +00:00
files.c re PR preprocessor/38987 (Including a precompiled header from another header causes invalid assembly to be generated) 2009-09-22 08:37:31 +00:00
identifiers.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
init.c cpplib.h (struct cpp_options): Add warn_cxx_operator_names field. 2009-06-12 19:43:25 +00:00
internal.h charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
lex.c charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
line-map.c re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed) 2009-10-14 12:04:22 +02:00
macro.c charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 2009-10-19 23:41:15 +02:00
Makefile.in directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value. 2009-07-18 03:22:16 +00:00
makeucnid.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
mkdeps.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
pch.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
symtab.c directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value. 2009-07-18 03:22:16 +00:00
system.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
traditional.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ucnid.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ucnid.tab Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00