public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: 3dw4rd@verizon.net
To: jason@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [C++-11] User defined literals
Date: Fri, 21 Oct 2011 17:04:00 -0000	[thread overview]
Message-ID: <203011741.8124391.1319213626586.JavaMail.root@vznit170076> (raw)

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

Jason,

I split the changelog into four parts and tweaked some of the content and formatting.

Ed

[-- Attachment #2: CL_udlit_gcc_c-family --]
[-- Type: application/octet-stream, Size: 346 bytes --]

2011-10-21  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++11 user-defined literals.
	* 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_integer, interpret_float): Return suffixes.
	(c_lex_with_flags): Build literal tokens.

[-- Attachment #3: CL_udlit_gcc_cp --]
[-- Type: application/octet-stream, Size: 1321 bytes --]

2011-10-21  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++11 user-defined literals.
	* 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.
	* gcc/cp/cxx-pretty-print.h: (pp_cxx_userdef_literal) New.
	* gcc/cp/cxx-pretty-print.c: (pp_cxx_userdef_literal) New.
	(pp_cxx_primary_expression, pp_cxx_expression): Use it.
	* gcc/cp/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.
	* gcc/cp/error.c: (dump_expr): Warn about user-defined literals
	in C++98 mode. (dump_function_name): Pretty printing.
	* gcc/cp/mangle.c: (write_literal_operator_name): New.
	(write_unqualified_id, write_unqualified_name): Use it.
	* gcc/cp/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.
	* gcc/cp/semantics.c: (potential_constant_expression_1): Add
	user-defined literals.
	* gcc/cp/typeck.c (check_raw_literal_operator,
	check_literal_operator_args): New.

[-- Attachment #4: CL_udlit_gcc_testsuite --]
[-- Type: application/octet-stream, Size: 1346 bytes --]

2011-10-21  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++11 user-defined literals.
	* g++.dg/cpp0x/udlit-addr.C: New.
	* g++.dg/cpp0x/udlit-args.C: New.
	* g++.dg/cpp0x/udlit-args-neg.C: New.
	* g++.dg/cpp0x/udlit-clink-neg.C: New.
	* g++.dg/cpp0x/udlit-concat.C: New.
	* g++.dg/cpp0x/udlit-concat-neg.C: New.
	* g++.dg/cpp0x/udlit-constexpr.C: New.
	* g++.dg/cpp0x/udlit-cpp98-neg.C: New.
	* g++.dg/cpp0x/udlit-declare-neg.C: New.
	* g++.dg/cpp0x/udlit-friend.C: New.
	* g++.dg/cpp0x/udlit-general.C: New.
	* g++.dg/cpp0x/udlit-inline.C: New.
	* g++.dg/cpp0x/udlit-linkage-neg.C: New.
	* g++.dg/cpp0x/udlit-member-neg.C: New.
	* g++.dg/cpp0x/udlit-namespace.C: New.
	* g++.dg/cpp0x/udlit-nofunc-neg.C: New.
	* g++.dg/cpp0x/udlit-nonempty-str-neg.C: New.
	* g++.dg/cpp0x/udlit-nospace-neg.C: New.
	* g++.dg/cpp0x/udlit-nosuffix-neg.C: New.
	* g++.dg/cpp0x/udlit-nounder-neg.C: New.
	* g++.dg/cpp0x/udlit-operator-neg.C: New.
	* g++.dg/cpp0x/udlit-raw-str.C: New.
	* g++.dg/cpp0x/udlit-shadow-neg.C: New.
	* g++.dg/cpp0x/udlit-suffix-neg.C: New.
	* g++.dg/cpp0x/udlit-systemheader.C: New.
	* g++.dg/cpp0x/udlit-template.C: New.
	* g++.dg/cpp0x/udlit-tmpl-arg.C: New.
	* g++.dg/cpp0x/udlit-tmpl-arg-neg.C: New.
	* g++.dg/cpp0x/udlit-tmpl-parms.C: New.
	* g++.dg/cpp0x/udlit-tmpl-parms-neg.C: New.
	* g++.dg/cpp0x/udlit_system_header: New.

[-- Attachment #5: CL_udlit_libcpp --]
[-- Type: application/octet-stream, Size: 662 bytes --]

2011-10-21  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++11 user-defined literals.
	* 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.

             reply	other threads:[~2011-10-21 16:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 17:04 3dw4rd [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-31 17:58 3dw4rd
2011-10-31 20:20 ` Jason Merrill
2011-10-26 20:33 3dw4rd
2011-10-26 20:46 ` Jason Merrill
2011-10-12 21:12 3dw4rd
2011-10-15 23:13 ` Jason Merrill
2011-10-16  7:59 ` Jason Merrill
2011-10-21 14:56   ` Ed Smith-Rowland
2011-10-21 21:20     ` Tom Tromey
2011-10-21 23:38       ` Jason Merrill
2011-10-23 22:29         ` Ed Smith-Rowland
2011-10-24 15:41         ` Ed Smith-Rowland
2011-10-25 23:38           ` Jason Merrill
2011-10-26  9:16             ` Ed Smith-Rowland
2011-10-26 20:13               ` Jason Merrill
2011-10-27 19:15                 ` Ed Smith-Rowland
2011-10-27 19:55                 ` Ed Smith-Rowland
2011-10-27 20:37                   ` Jason Merrill
2011-10-30 19:10                     ` Ed Smith-Rowland
2011-10-31 17:52                       ` Jason Merrill
2011-10-25  7:07         ` Ed Smith-Rowland
2011-09-13 15:36 Ed Smith-Rowland
2011-09-13 16:43 ` Jason Merrill
2011-09-14  8:00 ` Jason Merrill
2011-09-19  8:33   ` Ed Smith-Rowland
2011-09-19 22:43     ` Jason Merrill
2011-09-20  7:23       ` Ed Smith-Rowland
2011-09-20 21:48         ` Jason Merrill
2011-10-05 15:57           ` Ed Smith-Rowland
2011-10-05 21:24             ` Jason Merrill
2011-10-08 21:38               ` Ed Smith-Rowland
2011-10-09  1:18                 ` Jason Merrill
2011-10-09 23:46                   ` Ed Smith-Rowland
2011-10-11 19:20                     ` Jason Merrill
2011-10-11 17:39                       ` Jason Merrill
2011-10-12  6:51                         ` Ed Smith-Rowland
2011-10-12 18:49                           ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=203011741.8124391.1319213626586.JavaMail.root@vznit170076 \
    --to=3dw4rd@verizon.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).