From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22710 invoked by alias); 21 Oct 2011 16:14:17 -0000 Received: (qmail 22691 invoked by uid 22791); 21 Oct 2011 16:14:13 -0000 X-SWARE-Spam-Status: No, hits=4.0 required=5.0 tests=AWL,BAYES_50,BOTNET,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vms173011pub.verizon.net (HELO vms173011pub.verizon.net) (206.46.173.11) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Oct 2011 16:13:59 +0000 Received: from vznit170076 ([unknown] [172.18.12.131]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LTF00EI2BQY0SI2@vms173011.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Fri, 21 Oct 2011 11:13:46 -0500 (CDT) Received: from 205.167.170.13 ([205.167.170.13]) by vznit170076 (Verizon Webmail) with HTTP; Fri, 21 Oct 2011 11:13:46 -0500 (CDT) Date: Fri, 21 Oct 2011 17:04:00 -0000 From: 3dw4rd@verizon.net To: jason@redhat.com Cc: gcc-patches@gcc.gnu.org Message-id: <203011741.8124391.1319213626586.JavaMail.root@vznit170076> Subject: Re: [C++-11] User defined literals MIME-version: 1.0 Content-type: multipart/mixed; boundary="----=_Part_8124390_1062082147.1319213626427" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02001.txt.bz2 ------=_Part_8124390_1062082147.1319213626427 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 98 Jason, I split the changelog into four parts and tweaked some of the content and formatting. Ed ------=_Part_8124390_1062082147.1319213626427 Content-Type: application/octet-stream; name=CL_udlit_gcc_c-family Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=CL_udlit_gcc_c-family Content-length: 346 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. ------=_Part_8124390_1062082147.1319213626427 Content-Type: application/octet-stream; name=CL_udlit_gcc_cp Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=CL_udlit_gcc_cp Content-length: 1321 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. ------=_Part_8124390_1062082147.1319213626427 Content-Type: application/octet-stream; name=CL_udlit_gcc_testsuite Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=CL_udlit_gcc_testsuite Content-length: 1346 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. ------=_Part_8124390_1062082147.1319213626427 Content-Type: application/octet-stream; name=CL_udlit_libcpp Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=CL_udlit_libcpp Content-length: 662 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. ------=_Part_8124390_1062082147.1319213626427--