gcc/libcpp
Ed Smith-Rowland 3ce4f9e4d2 Implement C++11 user-defined literals.
libcpp/
	* expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix,
	cpp_userdef_string_remove_type, cpp_userdef_string_add_type,
	cpp_userdef_char_remove_type, cpp_userdef_char_add_type,
	cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New.
	(cpp_classify_number): Classify unrecognized tokens as user-defined
	literals.
	* include/cpplib.h: Add new tokens for user-defined literals.
	* init.c: Add new preprocessor flag (cxx11).
	* lex.c: (lex_string, lex_raw_string): Handle user-defined literals
	including concatenation and promotion with suffixes.
c-family/
	* c-common.c (build_userdef_literal): New.
	* c-common.def: New tree code.
	* c-common.h (tree_userdef_literal): New tree struct and accessors.
	* c-lex.c (interpret_float): Add suffix parm.
	(c_lex_with_flags): Build literal tokens.
cp/
	* cp-objcp-common.c: (cp_tree_size) Return size of USERDEF_LITERAL tree.
	* cp-tree.h: (UDLIT_OP_*, UDLIT_OPER_P): Literal operator
	name tools. New tree code for user-defined literals.
	* cxx-pretty-print.h: (pp_cxx_userdef_literal) New.
	* cxx-pretty-print.c: (pp_cxx_userdef_literal) New.
	(pp_cxx_primary_expression, pp_cxx_expression): Use it.
	* decl.c: (cp_tree_node_structure): Return new tree code.
	(duplicate_decls): Check for raw vs. template operator conflicts.
	(grokfndecl, grokdeclarator): New checks for literal operators.
	* error.c: (dump_expr): Warn about user-defined literals
	in C++98 mode. (dump_function_name): Pretty printing.
	* mangle.c: (write_literal_operator_name): New.
	(write_unqualified_id, write_unqualified_name): Use it.
	* parser.c: (cp_parser_operator): Handle operator"".
	(cp_parser_userdef_char_literal, cp_parser_userdef_numeric_literal,
	cp_parser_userdef_string_literal): New.
	(cp_parser_primary_expression): Handle new user-defined literal tokens
	with new functions.
	* semantics.c: (potential_constant_expression_1): Add
	user-defined literals.
	* typeck.c (check_raw_literal_operator,
	check_literal_operator_args): New.

From-SVN: r180536
2011-10-26 15:30:59 -04:00
..
include Implement C++11 user-defined literals. 2011-10-26 15:30:59 -04:00
po be.po, [...]: Update. 2011-07-08 20:29:04 +01:00
ChangeLog Implement C++11 user-defined literals. 2011-10-26 15:30:59 -04:00
Makefile.in Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
aclocal.m4 Undo inadvertent commit in rev 160105. 2010-06-01 10:20:24 -04:00
charset.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
config.in re PR bootstrap/45538 (--enable-build-with-cxx compiling gcc/libcpp/charset.c) 2010-11-18 07:35:34 +00:00
configure Set need_64bit_hwint to yes for x86 targets. 2011-07-28 07:29:38 -07:00
configure.ac Set need_64bit_hwint to yes for x86 targets. 2011-07-28 07:29:38 -07:00
directives-only.c LINEMAP_POSITION_FOR_COLUMN had the exact same effect as linemap_position_for_column... 2011-08-15 20:35:58 +00:00
directives.c Generate virtual locations for tokens 2011-10-17 11:59:12 +02:00
errors.c Update Copyright years for files modified in 2010. 2011-01-03 21:52:22 +01:00
expr.c Implement C++11 user-defined literals. 2011-10-26 15:30:59 -04:00
files.c Linemap infrastructure for virtual locations 2011-10-17 11:58:56 +02:00
identifiers.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
init.c Implement C++11 user-defined literals. 2011-10-26 15:30:59 -04:00
internal.h Fix cpp_peek_token behaviour (PR bootstrap/50778) 2011-10-22 19:49:18 +02:00
lex.c Implement C++11 user-defined literals. 2011-10-26 15:30:59 -04:00
line-map.c Fix lookup of macro maps 2011-10-25 10:59:07 +02:00
macro.c Fix bootstrap on !NO_IMPLICIT_EXTERN_C and ia32 targets 2011-10-18 10:44:49 +02:00
makeucnid.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
mkdeps.c files.c (file_hash_eq): Use filename_cmp instead of strcmp. 2011-03-25 20:11:26 +01:00
pch.c remove useless if-before-free tests 2011-04-20 18:19:03 +00: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 system.h [...]: Wrap C function declarations in extern "C". 2011-07-25 14:26:58 +00:00
traditional.c Generate virtual locations for tokens 2011-10-17 11:59:12 +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