1. 22 Jul, 2013 1 commit
  2. 21 Jul, 2013 2 commits
    • class.c: Fix typos. · c65cb8d1
      2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
      
      	* class.c: Fix typos.
      	* cp-array-notation.c: Likewise.
      	* cp-objcp-common.c: Likewise.
      	* decl.c: Likewise.
      	* init.c: Likewise.
      	* mangle.c: Likewise.
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      	* semantics.c: Likewise.
      
      From-SVN: r201106
      Ondřej Bílka committed
    • Fix some typos. · 587ae1e3
      2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
      
      	* objc-act.c: Fix typos.
      	* objc-encoding.c: Likewise.
      	* objc-gnu-runtime-abi-01.c: Likewise.
      	* objc-next-runtime-abi-01.c: Likewise.
      	* objc-next-runtime-abi-02.c: Likewise.
      
      From-SVN: r201096
      Ondřej Bílka committed
  3. 14 Jul, 2013 2 commits
    • Extract lambda functions from semantics.c. · a960e808
      	* gcc/cp/semantics.c (build_lambda_expr),
      	(build_lambda_object), (begin_lambda_type), (lambda_return_type),
      	(lambda_function), (lambda_capture_field_type), (is_capture_proxy),
      	(is_normal_capture_proxy), (insert_capture_proxy),
      	(insert_pending_capture_proxies), (lambda_proxy_type),
      	(build_capture_proxy), (vla_capture_type),
      	(register_capture_members), (add_default_capture),
      	(lambda_expr_this_capture), (maybe_resolve_dummy),
      	(nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
      	(is_lambda_ignored_entity): Moved definitions into ...
      	* gcc/cp/lambda.c: ... this new file.
      
      From-SVN: r200948
      Adam Butcher committed
    • call.c (build_conditional_expr_1): Handle the case with 1 vector and 2 scalars. · 07298ffd
      2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
      
      gcc/cp/
      	* call.c (build_conditional_expr_1): Handle the case with 1 vector
      	and 2 scalars. Call save_expr before building a vector.
      	* typeck.c (cp_build_binary_op): Check complain before complaining.
      
      gcc/testsuite/
      	* g++.dg/ext/vector19.C: Adapt.
      	* g++.dg/ext/vector23.C: New testcase.
      
      From-SVN: r200947
      Marc Glisse committed
  4. 13 Jul, 2013 4 commits
  5. 10 Jul, 2013 2 commits
    • re PR c++/57869 ([C++11] Casting a object pointer to a function pointer should… · dfeadaa0
      re PR c++/57869 ([C++11] Casting a object pointer to a function pointer should not warn about a forbidden conversion)
      
      /c-family
      2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57869
      	* c.opt: Add Wconditionally-supported.
      
      /cp
      2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57869
      	* typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
      	warn about casting between pointer-to-function and pointer-to-object.
      
      /gcc
      2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57869
      	* doc/invoke.texi: Document -Wconditionally-supported.
      
      /testsuite
      2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57869
      	* g++.dg/cpp0x/reinterpret_cast1.C: New.
      	* g++.dg/warn/Wconditionally-supported-1.C: Likewise.
      	* g++.dg/conversion/dr195.C: Update.
      	* g++.dg/expr/cast2.C: Likewise.
      
      From-SVN: r200876
      Paolo Carlini committed
    • re PR c++/57402 (ICE: in make_decl_rtl, at varasm.c:1147 when initializing variable-sized array) · 06b76c7f
      	PR c++/57402
      	* init.c (build_vec_init): Don't take shortcuts when initializing
      	a VLA.
      
      From-SVN: r200860
      Jason Merrill committed
  6. 09 Jul, 2013 12 commits
  7. 06 Jul, 2013 1 commit
  8. 05 Jul, 2013 1 commit
  9. 04 Jul, 2013 1 commit
  10. 03 Jul, 2013 1 commit
  11. 29 Jun, 2013 2 commits
    • lex.c (lex_raw_string(), [...]): Constrain suffixes treated as concatenated… · c865f923
      lex.c (lex_raw_string(), [...]): Constrain suffixes treated as concatenated literal and macro to just the...
      
      libcpp:
      
      2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
      
      	* lex.c (lex_raw_string(), lex_string()): Constrain suffixes treated
      	as concatenated literal and macro to just the patterns found in
      	inttypes.h; (is_macro()): New.
      
      
      gcc/cp:
      
      2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
      
      	* cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
      	* parser.c (cp_parser_operator()): Parse user-defined string
      	literal as literal operator.
      
      
      gcc/testsuite:
      
      2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
      
      	* g++.dg/cpp0x/udlit-nospace-neg.C: Adjust.
      	* g++.dg/cpp1y/udlit-enc-prefix-neg.C: New.
      	* g++.dg/cpp1y/udlit-userdef-string.C: New.
      	* g++.dg/cpp1y/complex_literals.h: New.
      
      From-SVN: r200563
      Ed Smith-Rowland committed
    • re PR c++/57645 (Explicitly-declared destructor with no exception specification… · a5e90b2a
      re PR c++/57645 (Explicitly-declared destructor with no exception specification is always noexcept(true))
      
      /cp
      2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57645
      	* class.c (deduce_noexcept_on_destructors): Save, set, and restore
      	TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
      	destructors.
      
      /testsuite
      2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57645
      	* g++.dg/cpp0x/noexcept21.C: New.
      
      From-SVN: r200559
      Paolo Carlini committed
  12. 28 Jun, 2013 2 commits
    • Implemented Jason Merrill's suggestions on Array Notation C++. · 1141ed3f
      gcc/ChangeLog
      2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * builtins.def: Fixed the function type of CILKPLUS_BUILTIN.
      
      gcc/c/ChangeLog
      2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * c-parser.c (c_parser_array_notation): Removed rejection of array
              notations in an array of function pointers.
      
      gcc/c-family/ChangeLog
      2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * array-notation-common.c (length_mismatch_in_expr_p): Collapsed two
              if-statements and compared the trees directly using tree_int_cst_equal.
              (find_rank): Checked for array notations in function name to handle
              array notations in function pointers.
              (extract_array_notation_exprs): Likewise.
              (replace_array_notations): Likewise.
              (cilkplus_extract_an_triplets): Replaced safe_push with
              safe_grow_cleared.  Also removed an unnecessary check to see if the
              node is of type ARRAY_NOTATION_REF.
              (fix_sec_implicit_args): Removed an unnecessary check for ADDR_EXPR.
              Also switched two if-statements to remove an unnecessary comparison.
      
      
      gcc/cp/ChangeLog
      2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * parser.c (cp_parser_array_notation): Removed rejection array notation
              of type function pointers. Added handling of array expressions when
              Cilk Plus is enabled.  Took out type-checking.
              (cp_parser_postfix_open_square_expression): Moved normal array expr.
              parsing into cp_parser_array_notation when cilkplus is enabled.
              (cp_parser_compound_statement): Removed expansion of array notations.
              (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
              (cp_parser_function_definition_after_declarator): Likewise.
              (cp_parser_selection_statement): Removed error reporting.
              (cp_parser_iteration_statement): Likewise.
              (cp_parser_direct_declarator): Removed error checking/reporting if
              array notations are used in the declarator.
              * pt.c (instantiate_decl): Likewise.
              (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
              (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
              (potential_constant_expression_1): Returned false for ARRAY_NOTATION_REF
              case.
              * cp-gimplify.c (cp_genericize): Added expansion of array notation
              expressions here.
              * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
              parameters.  Replaced build_decls with get_temp_regvar with type as
              ptrdiff.
              (create_array_refs): Made the type-casting to ptrdiff_type.
              (replace_invariant_var): Added a check for void return type before 
      	creating new var.  Replaced build_decl and build_min_nt_loc with
              get_temp_regvar.
              (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else with
              gcc_unreachable.  Removed few unwanted checks.  Made induction variable
              type as ptrdiff_type.  Removed loc and complain arguments passed into
              make_triplet_val_inv.  Replaced all modify expression's code from NOP
              EXPR to INIT EXPR.  Replaced all forceful appending into stmt. list
              with the non-forceful one.  Replaced some integer conversion and
              equality-checking to using tree_int_cst_equal.
              (expand_sec_reduce_builtin): All changes mentioned in above function
              expand_an_in_modify_expr.  Made the new variable type of
              SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
              (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
              the error reporting from parser to this function.  Removed unwanted
              statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
              (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
              in function pointers.
              (cp_expand_cond_array_notations): Added a new if statements to check
              if condition has a zero rank.  If so, then just return.
              (expand_return_expr): Added a check for return expressions with a rank.
              Replaced get_tmp_regvar with a create_temporary_var.
              (build_array_notation_ref): Simplified and removed unwanted if-stmts.
              Moved common code outside if-statements.  Moved type-checking from
              parser to here.
              * semantics.c (finish_return_stmt): Removed a check for return exprs.
              with a rank.
              * call.c (convert_like_real): Removed a check for array notation
              expression in a function.
              (build_over_call): Likewise.
              (magic_varargs_p): Added a check for builtin array notation function.
              Made this function non-static and removed its prototype.
              * cp-tree.h (magic_varargs_p): New prototype.
              * typeck.c (cp_build_function_call_vec): Removed automatic setting of
              nargs to the param->length when builtin reduction function is used.
              (convert_arguments): Replaced check for a constant_p function with
              margic_varargs_p function call.
              (cp_build_binary_op): Removed calling of the function
              find_correct_array_notation_type.
              (cp_build_addr_expr_1): Removed an unwanted if-statement.
              (convert_for_assignment): Removed automatic return of rhs when array
              notation builtin function is used.
      
      gcc/testsuite/ChangeLog
      2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Made this testcase
              c specific.
              * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Changed dg-error
              strings to match the fixed error messages.
              * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/rank_mismatch.c (main): Added a new error
              message check.
      
      From-SVN: r200554
      Balaji V. Iyer committed
    • re PR c++/57682 (Uniform initialization syntax rejected in function-try-block) · 7350faad
      /cp
      2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57682
      	* parser.c (cp_parser_save_member_function_body): Handle correctly
      	curly braces in function-try-block mem-initializers.
      
      /testsuite
      2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/57682
      	* g++.dg/cpp0x/initlist73.C: New.
      
      From-SVN: r200504
      Paolo Carlini committed
  13. 27 Jun, 2013 4 commits
  14. 26 Jun, 2013 1 commit
  15. 25 Jun, 2013 1 commit
    • Replaced Dynamic arrays with vec trees in Array Notation for C. · 713b46fa
      gcc/c-family/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * array-notation-common.c (length_mismatch_in_expr): Changed the
              parameter type's from a dynamic array to a vec_tree.  Also removed
              the size parameters.
              * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
              the change above.
      
      gcc/cp/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
              (expand_an_in_modify_expr): Changed a function call from the above
              removed function to length_mismatch_in_expr_p.
      
      gcc/c/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * c-array-notation.c (make_triplet_val_inv): New function.
              (create_cmp_incr): Likewise.
              (create_array_refs): Likewise.
              (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
              Also modularized common parts between functions and called the function.
              (build_array_notation_expr): Likewise.
              (fix_conditional_array_notations_1): Likewise.
              (fix_array_notation_expr): Likewise.
              (fix_array_notation_call_expr): Likewise.
      
      From-SVN: r200405
      Balaji V. Iyer committed
  16. 23 Jun, 2013 1 commit
    • c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x. · 604b2bfc
      2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
      	* c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
      	* c-cppbuiltin.c (c_cpp_builtins): Likewise.
      	* c-opts.c (c_common_post_options): Likewise.
      
      cp/
      2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
      	* call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
      	* class.c (add_implicitly_declared_members): Likewise.
      	(check_field_decl): Likewise.
      	(finalize_literal_type_property): Likewise.
      	(check_bases_and_members): Likewise.
      	* decl.c (poplevel): Likewise.
      	(case_conversion): Likewise.
      	(check_initializer): Likewise.
      	(grokfndecl): Likewise.
      	(check_static_variable_definition): Likewise.
      	(compute_array_index_type): Likewise.
      	(grokdeclarator): Likewise.
      	(build_enumerator): Likewise.
      	* friend.c (make_friend_class): Likewise.
      	* lex.c (init_reswords): Likewise.
      	* method.c (synthesized_method_walk): Likewise.
      	(implicitly_declare_fn): Likewise.
      	* parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
      	(cp_parser_constant_expression): Likewise.
      	(cp_parser_for_init_statement): Likewise.
      	(cp_parser_block_declaration): Likewise.
      	(cp_parser_type_name): Likewise.
      	(cp_parser_enum_specifier): Likewise.
      	(cp_parser_enumerator_list): Likewise.
      	(cp_parser_member_declaration): Likewise.
      	(cp_nth_tokens_can_be_std_attribute_p): Likewise.
      	(cp_parser_template_declaration_after_export): Likewise.
      	* pt.c (convert_nontype_argument_function): Likewise.
      	(convert_nontype_argument): Likewise.
      	(convert_template_argument): Likewise.
      	(tsubst_copy_and_build): Likewise.
      	(build_non_dependent_expr): Likewise.
      	* semantics.c (non_const_var_error): Likewise.
      	(potential_constant_expression_1): Likewise.
      	* tree.c (lvalue_kind): Likewise.
      	(build_vec_init_expr): Likewise.
      	(cast_valid_in_integral_constant_expression_p): Likewise.
      	* typeck.c (build_x_conditional_expr): Likewise.
      	* typeck2.c (check_narrowing): Likewise.
      
      From-SVN: r200348
      Gabriel Dos Reis committed
  17. 21 Jun, 2013 2 commits
    • Implemented Cilk Plus Array Notation for C++ · 2ce86d2e
      Implemented Cilk Plus Array Notation for C++ 
      gcc/c-family/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * c-common.h (struct cilkplus_an_parts): New structure.
              (struct cilkplus_an_loop_parts): Likewise.
              (cilkplus_extract_an_triplets): New prototype.
              (fix_sec_implicit_args): Likewise.
              * array-notation-common.c (cilkplus_extract_an_triplets): New function.
              (fix_sec_implicit_args): Likewise.
      
      gcc/cp/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * call.c (convert_like_real): Added a check if array notation is present
              in expression.  If so, then no conversion of arguments is necessary.
              (build_over_call): Likewise.
              * typeck.c (cp_build_function_call_vec): Likewise.
              (convert_for_assignment): Likewise.
              (cp_build_array_ref): Reject array notations with a rank greater than 1
              as an array's index.
              (cp_build_binary_op): If array notations are preent in op, then call
              find_correct_array_notation_type.
              (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
              * cp-array-notation.c: New file.
              * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
              as typed.
              * cp-tree.h (fix_array_notation_exprs): New prototype.
              * semantics.c (finish_return_stmt): Reject array notations as
              return value.
              (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
              (potential_constant_expression_1): Likewise.
              * tree.c (lvalue_kind): Likewise.
              * error.c (dump_decl): Likewise.
              (dump_expr): Likewise.
              * pt.c (ARRAY_NOTATION_REF): Likewise.
              (type_unification_real): Do not unify any arguments if array notations
              are found in arg.
              (instantiate_decl): Added a check for array notaitons inside the
              function body.  If so, then expand them.
              * parser.c (cp_parser_array_notation): New function.
              (cp_parser_postfix_open_square_expression): Added a check for colons
              inside square braces.  If found, then handle the array access as an
              array notation access.  Also, disable auto-correction from a single
              colon to scope when Cilk Plus is enabled.
              (cp_parser_compound_statement): Added a check for array notations
              inside the statement.  If found, then expand them.
              (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
              (cp_parser_function_definition_after_declarator): Likewise.
              (cp_parser_selection_statement): Searched for array notations inside
              condition.  If so, then emit an error.
              (cp_parser_iteration_statement): Likewise.
              (cp_parser_direct_declarator): Reject array notations inside a
              variable or array declaration.
              * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
      
      gcc/testsuite/ChangeLog
      2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
      
              * c-c++-common/cilk-plus/AN/array_test1.c: Make this an execution test.
              Also changed the returns from error as distinct values so that debugging
              can get easier.
              * c-c++-common/cilk-plus/AN/if_test_errors.c (main): Made certain
              errors specific to C, if necessary.  Also added new error hooks for C++.
              * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/pr57541.c (main): Likewise.
              * c-c++-common/cilk-plus/AN/parser_errors4.c (main): In addition to the
              same changes as parser_errors3.c, spaces were added between colons to
              not confuse C++ compiler with 2 colons as scope.
              * c-c++-common/cilk-plus/AN/vla.c: Make this test C specific.
              * g++.dg/cilk-plus/AN/array_test1_tplt.cc: New test.
              * g++.dg/cilk-plus/AN/array_test2_tplt.cc: Likewise.
              * g++.dg/cilk-plus/AN/array_test_ND_tplt.cc: Likewise.
              * g++.dg/cilk-plus/AN/braced_list.cc: Likewise.
              * g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc: Likewise.
              * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc: Likewise.
              * g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Likewise.
              * g++.dg/cilk-plus/AN/preincr_test.cc: Likewise.
              * g++.dg/cilk-plus/AN/postincr_test.cc: Likewise.
              * g++.dg/cilk-plus/cilk-plus.exp: New script.
              * gcc/testsuite/g++.dg/dg.exp: Included Cilk Plus C++ tests in the list.
      
      From-SVN: r200319
      Balaji V. Iyer committed
    • re PR c++/55149 (capturing VLA in lambda) · 593bcbb8
      	PR c++/55149
      	* decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
      	context if we're in C++14 mode.
      	* tree.c (array_of_runtime_bound_p): Return true for a dependent
      	bound that is not potentually constant.
      	* cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
      	* pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
      	* semantics.c (build_lambda_object): Don't rvalue a VLA capture.
      	(build_capture_proxy): Set REFERENCE_VLA_OK.
      	(vla_capture_type): Make it a proper C++ class.
      	(add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
      	initializer.
      
      From-SVN: r200279
      Jason Merrill committed