1 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3 * constexpr.c: Remove redundant enum from machine_mode.
5 2014-10-28 Jason Merrill <jason@redhat.com>
7 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
9 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
11 * call.c: Adjust include files.
22 * vtable-class-hierarchy.c: Ditto.
24 2014-10-24 Jason Merrill <jason@redhat.com>
26 Implement N3653 (Member initializers and aggregates) and fix
27 references to 'this' in constexpr constructors.
28 * class.c (check_field_decls): In C++14 an NSDMI does not make the
30 * constexpr.c (struct constexpr_ctx): New.
31 (cxx_bind_parameters_in_call): Handle 'this'.
32 (cxx_eval_call_expression): Create new constexpr_ctx.
33 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
34 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
35 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
36 (cxx_eval_vec_init_1): Likewise.
37 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
38 [TARGET_EXPR]: Build new constexpr_ctx.
39 [PLACEHOLDER_EXPR]: New.
40 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
42 (is_sub_constant_expr): Build new constexpr_ctx.
43 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
45 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
46 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
47 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
48 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
49 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
50 (build_ctor_subob_ref, replace_placeholders): New.
51 * typeck2.c (store_init_value): Use replace_placeholders.
52 (process_init_constructor_record): Make zero-init before NSDMI
55 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
57 * cp-gimplify.c: Adjust include files.
59 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
62 * cp-objcp-common.c: Do not include new.
63 (cxx_initialize_diagnostics): Move from here to ...
64 * error.c (cxx_initialize_diagnostics): : ... here. Move
65 diagnostics initialization here from init_error.
66 (cxx_pp): Use a real pointer not a macro.
67 (init_error): Just initialize cxx_pp.
68 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
69 not set maximum line length.
71 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
74 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
76 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
78 * parser.c (cp_parser_unary_expression): Add default arguments.
79 (cp_parser_cast_expression, cp_parser_sizeof_operand,
80 cp_parser_omp_atomic): Adjust.
82 2014-10-20 Jason Merrill <jason@redhat.com>
85 * lambda.c (current_nonlambda_function): New.
86 * semantics.c (finish_this_expr): Use it.
87 * cp-tree.h: Declare it.
89 2014-10-17 Alan Modra <amodra@gmail.com>
92 * decl.c (merge_decls): Don't merge section name, comdat group or
93 tls model to newdecl symtab node, instead merge to olddecl.
94 Override existing olddecl section name. Set tls_model for all
95 thread-local vars, not just OMP thread-private ones. Remove
98 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
100 * cp-tree.h: Adjust include files.
102 2014-10-15 Jason Merrill <jason@redhat.com>
105 * pt.c (lookup_template_variable): Call coerce_template_parms.
107 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
109 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
110 ensure_literal_type_for_constexpr_object,
111 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
112 retrieve_constexpr_fundef, is_valid_constexpr_fn,
113 build_anon_member_initialization, build_data_member_initialization,
114 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
115 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
116 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
117 massage_constexpr_body, cx_check_missing_mem_inits,
118 register_constexpr_fundef, explain_invalid_constexpr_fn,
119 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
120 maybe_initialize_constexpr_call_table, get_function_named_in_call,
121 get_nth_callarg, lookup_parameter_binding,
122 cxx_eval_builtin_function_call, adjust_temp_type,
123 cxx_bind_parameters_in_call, push_cx_call_context,
124 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
125 reduced_constant_expression_p, verify_constant,
126 cxx_eval_unary_expression, cxx_eval_binary_expression,
127 cxx_eval_conditional_expression, cxx_eval_array_reference,
128 cxx_eval_component_reference, cxx_eval_bit_field_ref,
129 cxx_eval_logical_expression, base_field_constructor_elt,
130 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
131 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
132 cxx_eval_trinary_expression, var_in_constexpr_fn,
133 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
134 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
135 maybe_constant_init, potential_constant_expression_1,
136 potential_constant_expression, potential_rvalue_constant_expression,
137 require_potential_constant_expression,
138 require_potential_rvalue_constant_expression): Moved definitions...
139 * constexpr.c: ... here, new file.
140 * Make-lang.in: Update.
141 * config-lang.in: Likewise.
143 2014-10-14 Jason Merrill <jason@redhat.com>
146 * parser.c (struct saved_token_sentinel): New.
147 (cp_parser_statement): Use it.
148 (cp_parser_start_tentative_firewall): New.
149 (cp_parser_end_tentative_firewall): New.
150 (cp_parser_lambda_expression): Use them.
151 (cp_parser_statement_expr): New.
152 (cp_parser_primary_expression): Use it.
154 2014-10-14 DJ Delorie <dj@redhat.com>
156 * typeck.c (cp_common_type): Check for all __intN types, not just
158 * decl.c (grokdeclarator): Likewise.
159 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
161 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
162 for all __intN types, not just __int128.
163 (cp_parser_simple_type_specifier): Likewise.
164 * mangle.c (integer_type_codes): Remove int128-specific codes.
165 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
166 __intN was specified.
167 * lex.c (init_reswords): Reserve all __intN keywords.
169 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
171 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
173 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
175 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
177 (print_template_statistics): Cast size and elements to long.
179 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
181 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
182 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
185 2014-10-10 Jason Merrill <jason@redhat.com>
188 * class.c (build_base_path): Preserve rvalueness.
189 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
190 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
193 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
195 * method.c (implicitly_declare_fn): Handle deleted lambda default
196 ctor and copy assop here.
197 * class.c (check_bases_and_members): Not here.
198 (add_implicitly_declared_members): And don't set
199 CLASSTYPE_LAZY_MOVE_ASSIGN.
201 * semantics.c (finish_id_expression): Check for error_mark_node.
203 2014-10-09 Jason Merrill <jason@redhat.com>
206 * semantics.c (outer_var_p): Non-static.
207 (process_outer_var_ref): Split out from finish_id_expression.
208 * pt.c (tsubst_copy_and_build): Call them.
209 * cp-tree.h: Declare them.
211 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
213 * semantics.c (check_constexpr_ctor_body_1): New.
214 (check_constexpr_ctor_body): Use it; add bool parameter.
215 (build_data_member_initialization): Handle BIND_EXPR and
216 USING_STMT in the main conditional.
217 (build_constexpr_constructor_member_initializers): Do not
218 handle BIND_EXPR here.
219 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
220 (massage_constexpr_body): Don't do it here.
221 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
222 Adjust check_constexpr_ctor_body call.
223 (cp_parser_compound_statement): Do not pedwarn for compound-statement
224 in constexpr function in C++14 mode.
225 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
227 2014-10-09 Jason Merrill <jason@redhat.com>
230 * parser.c (cp_parser_class_head): push_template_decl for members
234 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
235 (iterative_hash_template_arg): Likewise.
238 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
239 * semantics.c (force_paren_expr): And set it.
240 * typeck.c (check_return_expr): And handle it.
242 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
244 * decl.c (grokdeclarator): constexpr only implies const in C++11.
246 2014-10-08 Jason Merrill <jason@redhat.com>
249 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
252 * tree.c (build_cplus_array_type): Look for a type with no
253 typedef-name or attributes.
255 * call.c (call_copy_ctor): New.
256 (build_over_call): Use it to avoid infinite recursion on invalid code.
258 2014-10-07 Jason Merrill <jason@redhat.com>
260 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
262 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
264 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
266 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
269 * semantics.c (check_constexpr_bind_expr_vars): New.
270 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
271 (build_constexpr_constructor_member_initializers): Handle
272 BIND_EXPR in the main conditional.
274 2014-10-02 Mark Wielaard <mjw@redhat.com>
277 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
278 (cp_function_decl_deleted_p): New prototype.
279 * cp-objcp-common.c (cp_function_deleted_p): New function.
281 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
286 * typeck.c (cp_build_binary_op): save_expr after convert to save
287 redundant operations.
288 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
289 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
291 2014-10-03 Jason Merrill <jason@redhat.com>
293 * decl.c (start_decl): Complain about static/thread_local vars
294 in constexpr function.
295 (check_for_uninitialized_const_var): Also uninitialized vars.
296 * parser.c (cp_parser_jump_statement): And gotos.
297 (cp_parser_asm_operand_list): And asm.
298 (cp_parser_try_block): And try.
299 * semantics.c (ensure_literal_type_for_constexpr_object): And
302 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
303 (var_in_constexpr_fn): New.
304 (cxx_eval_constant_expression): Look into DECL_INITIAL.
305 (potential_constant_expression_1): Allow constexpr-local vars.
308 * tree.c (strip_typedefs): Handle TREE_LIST.
310 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
312 * parser.c (cp_parser_assignment_expression,
313 cp_parser_constant_expression): Add default arguments.
314 (cp_parser_primary_expression,
315 cp_parser_postfix_open_square_expression,
316 cp_parser_parenthesized_expression_list,
317 cp_parser_question_colon_clause,
318 cp_parser_expression, cp_parser_constant_expression,
319 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
320 cp_parser_template_argument, cp_parser_enumerator_definition,
321 cp_parser_member_declaration, cp_parser_constant_initializer,
322 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
323 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
324 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
325 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
326 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
327 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
328 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
330 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
333 * cp-tree.h (struct saved_scope): Add noexcept_operand.
334 (cp_noexcept_operand): Define.
335 * call.c (build_over_call): Use it.
336 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
337 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
339 2014-10-01 Jason Merrill <jason@redhat.com>
342 * method.c (constructible_expr): Handle value-init of non-class.
343 * parser.c (cp_parser_trait_expr): Allow pack expansion.
344 * pt.c (tsubst_copy_and_build): Handle pack expansion.
347 * class.c (type_has_non_user_provided_default_constructor): Rename
348 from type_has_user_provided_default_constructor, reverse sense.
349 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
350 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
351 * call.c (build_new_method_call_1): Adjust.
353 * decl.c (grok_special_member_properties): Don't set
354 TYPE_HAS_COMPLEX_DFLT.
355 * init.c (build_value_init_noctor): Don't use
356 type_has_user_provided_default_constructor.
358 2014-09-30 Jason Merrill <jason@redhat.com>
360 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
361 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
362 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
363 * parser.c (cp_parser_primary_expression): Likewise.
364 (cp_parser_trait_expr): Likewise. Handle variadic trait.
365 * semantics.c (trait_expr_value): Likewise.
366 (finish_trait_expr): Likewise.
367 (check_trait_type): Handle variadic trait. Return bool.
368 * method.c (build_stub_object): Add rvalue reference here.
369 (locate_fn_flags): Not here.
370 (check_nontriv, assignable_expr, constructible_expr): New.
371 (is_trivially_xible): New.
373 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
374 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
375 * parser.c (cp_parser_primary_expression): Likewise.
376 (cp_parser_trait_expr): Likewise.
377 * semantics.c (trait_expr_value): Likewise.
378 (finish_trait_expr): Likewise.
380 * method.c (build_stub_object): Use CONVERT_EXPR.
381 * tree.c (build_dummy_object): Likewise.
382 (is_dummy_object): Adjust.
384 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
385 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
386 * semantics.c (trait_expr_value): Likewise.
387 (finish_trait_expr): Likewise.
388 * parser.c (cp_parser_primary_expression): Likewise.
389 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
391 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
394 * error.c (print_instantiation_context): Delete.
395 * typeck2.c (build_x_arrow): Record location when pushing
396 template instantiation.
397 * pt.c (push_tinst_level): Make it a wrapper around ...
398 (push_tinst_level_loc): ... this. New function. Make excessive
399 template instantiation depth a fatal error. Record location. Use
401 (instantiate_pending_templates): Make excessive
402 template instantiation depth a fatal error.
403 (problematic_instantiation_changed): Use bool as return type.
404 * cp-tree.h (print_instantiation_context): Delete.
405 (push_tinst_level): Update declaration.
406 (problematic_instantiation_changed): Likewise.
407 (push_tinst_level_loc): New.
409 2014-09-29 Richard Biener <rguenther@suse.de>
411 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
414 2014-09-26 Jason Merrill <jason@redhat.com>
416 * mangle.c (find_substitution): Use write_abi_tags.
418 2014-09-25 Marek Polacek <polacek@redhat.com>
421 * class.c (warn_hidden): Check for FUNCTION_DECL.
423 2014-09-25 Jakub Jelinek <jakub@redhat.com>
426 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
427 on low_bound and length.
429 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
431 * class.c, decl.c, optimize.c: Rename all instances of
432 DECL_ABSTRACT to DECL_ABSTRACT_P.
434 2014-09-24 Marek Polacek <polacek@redhat.com>
438 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
439 * tree.c (bot_manip): Add default case.
440 * parser.c (cp_parser_primary_expression): Cast the controlling
441 expression of a switch to an int.
442 (cp_parser_unqualified_id): Likewise.
444 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
447 * parser.c (cp_parser_skip_to_closing_square_bracket,
448 cp_parser_array_designator_p): New.
449 (cp_parser_initializer_list): Use the latter.
451 2014-09-22 Jason Merrill <jason@redhat.com>
453 * semantics.c (finish_non_static_data_member): In diagnostic, give
454 error at point of use and note at point of declaration.
459 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
462 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
465 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
467 2014-09-22 Jason Merrill <jason@redhat.com>
469 * decl.c (poplevel): Don't warn about unused vars in template scope.
470 * error.c (dump_decl): Handle variable templates.
472 2014-09-20 Jason Merrill <jason@redhat.com>
475 * decl.c (begin_destructor_body): Only clobber the as-base part of
478 2014-09-19 Jason Merrill <jason@redhat.com>
481 * mangle.c (write_expression): Use unresolved-name mangling for
485 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
486 after pulling out an element from a CONSTRUCTOR.
488 2014-09-18 Jakub Jelinek <jakub@redhat.com>
491 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
492 on type of type dependent expressions, and don't call it if
493 handle_omp_array_sections has kept TREE_LIST because something
495 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
496 Use keep_next_level, begin_omp_structured_block and
497 finish_omp_structured_block instead of push_stmt_list and
500 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
503 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
504 for final class types.
506 2014-09-15 Jason Merrill <jason@redhat.com>
508 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
509 necessary. Call inherit_targ_abi_tags here.
510 * class.c (check_bases_and_members): Not here.
511 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
512 * cp-tree.h: Declare inherit_targ_abi_tags.
514 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
516 Do not diagnose lambda default arguments in c++14 modes.
517 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
520 2014-09-15 Jakub Jelinek <jakub@redhat.com>
522 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
525 2014-09-13 Marek Polacek <polacek@redhat.com>
528 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
529 location of a call expression.
531 2014-09-11 Jason Merrill <jason@redhat.com>
534 * decl.c (start_decl): Handle specialization of member variable
536 * pt.c (check_explicit_specialization): Adjust error.
538 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
541 * typeck2.c (process_init_constructor_record): Do not warn about
542 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
544 2014-09-11 Jason Merrill <jason@redhat.com>
547 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
548 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
550 2014-09-10 Jason Merrill <jason@redhat.com>
553 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
554 (duplicate_decls, start_decl): Likewise.
555 * pt.c (check_explicit_specialization): Likewise.
556 (push_template_decl_real): Or static templates.
558 2014-09-08 Jason Merrill <jason@redhat.com>
560 * typeck.c (build_class_member_access_expr): Move
561 -Winvalid-offsetof code...
562 * semantics.c (finish_offsetof): ...here.
563 * parser.c (cp_parser_builtin_offsetof): Remember the location of
565 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
568 * pt.c (instantiate_decl): Handle recursive instantiation of
571 2014-09-05 Jason Merrill <jason@redhat.com>
574 * semantics.c (potential_constant_expression_1): Handle un-folded
575 pointer to member constants.
577 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
580 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
581 newdecl, not olddecl.
583 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
586 * class.c (check_field_decls): A class of literal type cannot have
587 volatile non-static data members and base classes.
588 (explain_non_literal_class): Update.
590 2014-09-02 Jakub Jelinek <jakub@redhat.com>
591 Balaji V. Iyer <balaji.v.iyer@intel.com>
592 Igor Zamyatin <igor.zamyatin@intel.com>
594 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
596 * parser.c (cp_parser_cilk_for): New function.
597 (cp_parser_cilk_grainsize): Likewise.
598 (cp_parser_statement): Added RID_CILK_FOR case.
599 (cp_parser_omp_for_cond): Added CILK_FOR check.
600 (cp_parser_omp_for_loop_init): Change function argument to accept
601 tree_code instead just a bool flag; change the check to use that
602 tree_code; check for initialization declaration in case of Cilk_for.
603 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
604 changed call to cp_parser_omp_for_loop_init according new arguments'
606 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
607 * pt.c (tsubst_expr): Added CILK_FOR case.
608 * semantics.c: Include convert.h.
609 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
610 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
611 (handle_omp_for_class_iterator): New argument lastp and its usage;
613 (finish_omp_for): Changed call to handle_omp_for_class_iterator
614 according new arguments' list; in case of Cilk_for save very first
615 decl and create empty stmt_list block; use block to build correct
618 2014-08-31 Jason Merrill <jason@redhat.com>
621 * optimize.c (cdtor_comdat_group): Just look at the
622 DECL_ASSEMBLER_NAME of the 'tors.
624 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
627 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
628 result of cxx_eval_constant_expression.
630 2014-08-26 Jason Merrill <jason@redhat.com>
633 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
634 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
635 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
638 2014-08-25 Jason Merrill <jason@redhat.com>
640 * pt.c (check_explicit_specialization): Don't complain about
641 non-template variable.
642 (template_for_substitution): Allow variable templates.
643 (check_template_variable): Fix logic for member var template.
644 * decl.c (start_decl): Don't complain about extra template header
647 * decl.c (start_decl): Look through member variable template.
648 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
649 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
652 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
655 * cp-tree.h (TFF_POINTER): Add.
656 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
658 * error.c (dump_type_suffix): Actually print the const and noreturn
659 attribute when appropriate.
661 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
663 * decl.c (compute_array_index_type, grokdeclarator,
664 undeduced_auto_decl): Change from cxx1y to cxx14.
665 *lambda.c(add_capture()): Change error message from C++1y to C++14.
666 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
667 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
668 cp_parser_decltype, cp_parser_conversion_type_id,
669 cp_parser_simple_type_specifier, cp_parser_type_id_1,
670 cp_parser_template_type_arg, cp_parser_std_attribute,
671 cp_parser_template_declaration_after_export): Ditto.
672 * pt.c (tsubst): Ditto.
673 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
674 * tree.c: Change comment.
675 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
676 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
678 2014-08-23 Jason Merrill <jason@redhat.com>
680 Allow non-constexpr variable templates.
681 * decl2.c (note_variable_template_instantiation): New.
682 * cp-tree.h: Declare it.
683 * pt.c (instantiate_decl): Call it.
684 (push_template_decl_real): Allow non-constexpr variable templates.
685 * semantics.c (finish_id_expression): Mark the variable template
686 instantiation as used.
687 * mangle.c (write_mangled_name): Variable template instantiations
689 * parser.c (cp_parser_init_declarator): Complain about
690 non-function implicit templates.
692 2014-08-22 Marek Polacek <polacek@redhat.com>
695 * parser.c (cp_parser_binary_expression): Check each LHS if it's
696 preceded with logical not. Adjust call to
697 warn_logical_not_parentheses.
699 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
702 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
703 declaration shadows a function declaration, unless the former
704 declares a function, pointer to function or pointer to member
705 function, because this is a common and valid case in real-world
707 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
710 2014-08-22 Jason Merrill <jason@redhat.com>
713 * class.c (outermost_open_class): Fix logic.
714 * decl.c (complete_vars): Fix logic.
716 2014-08-22 Jason Merrill <jason@redhat.com>
719 * class.c (outermost_open_class): New.
720 * cp-tree.h: Declare it.
721 * decl.c (maybe_register_incomplete_var): Use it.
722 (complete_vars): Handle any constant variable.
723 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
725 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
728 * cp-array-notation.c (build_array_notation_ref): Added correct
729 handling of case with incorrect array.
731 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
734 * error.c (cp_diagnostic_finalizer): Delete.
735 (init_error): Do not set diagnostic_finalizer here.
737 2014-08-19 Marek Polacek <polacek@redhat.com>
740 * call.c (build_new_op_1): Remember the type of arguments for
741 a comparison. If either operand of a comparison is a boolean
742 expression, call maybe_warn_bool_compare.
744 2014-08-19 Jason Merrill <jason@redhat.com>
746 PR tree-optimization/62091
747 * decl2.c (decl_needed_p): Return true for virtual functions when
752 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
755 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
757 * class.c (contains_empty_class_p): Remove.
759 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
761 * parser.c (cp_parser_expression): Add default arguments.
762 (cp_parser_primary_expression, cp_parser_postfix_expression,
763 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
764 cp_parser_unary_expression, cp_parser_direct_new_declarator,
765 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
766 cp_parser_lambda_body, cp_parser_expression_statement,
767 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
768 cp_parser_iteration_statement, cp_parser_jump_statement,
769 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
770 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
771 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
772 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
773 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
774 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
775 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
776 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
777 cp_parser_transaction_expression): Adjust.
779 2014-08-15 Jason Merrill <jason@redhat.com>
782 * pt.c (lookup_template_class_1): Revert recent change.
783 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
786 * pt.c (instantiate_class_template_1): Ignore lambda on
788 (push_template_decl_real): A lambda is not primary.
789 (lookup_template_class_1): Don't look for a lambda partial
791 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
792 currently in a function and the lambda living in a function.
793 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
795 2014-08-15 Richard Biener <rguenther@suse.de>
796 Jason Merrill <jason@redhat.com>
799 * tree.c (build_min_array_type, set_array_type_canon): Split out...
800 (build_cplus_array_type): ...from here. Only call build_array_type
803 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
807 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
811 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
812 cv-qualifiers of function types.
814 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
816 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
818 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
820 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
821 cp_build_array_ref, cp_build_function_call_vec): When a
822 pedwarn is suppressed under SFINAE, return error_mark_node.
824 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
825 tf_warning_or_error, where complain is a bool, glitch.
827 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
830 * decl.c (grokdeclarator): Move the check for friend initializers..
831 * decl2.c (grokfield) ..here. Postpone early return for friends
832 until after the initializer check.
834 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
837 * pt.c (coerce_template_parms): Improve error message vs default
840 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
842 * parser.c (cp_parser_init_declarator): Remove redundant check of
843 decl_specifiers->type.
845 2014-08-13 Jason Merrill <jason@redhat.com>
847 * call.c (build_x_va_arg): Support passing non-POD through ....
848 (convert_arg_to_ellipsis): Likewise.
850 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
852 * pt.c (lookup_template_variable): Make dependent variable templates
855 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
857 * parser.c (cp_parser_elaborated_type_specifier): Handle
858 specially cp_parser_template_id returning a BASELINK.
860 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
862 * parser.c (cp_parser_diagnose_invalid_type_name,
863 cp_parser_make_typename_type): Remove scope parameter.
864 (cp_parser_parse_and_diagnose_invalid_type_name,
865 cp_parser_elaborated_type_specifier): Adjust calls.
867 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
869 Reject virt-specifiers on friends and member templates
870 * friend.c (do_friend): Diagnose virt-specifiers.
871 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
873 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
875 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
876 return type to bool; in C++11 for constants give errors, not pedwarns.
877 * cp-tree.h (check_narrowing): Adjust declaration.
878 * call.c (convert_like_real): Update calls.
879 * semantics.c (finish_compound_literal): Likewise.
881 2014-08-08 Jason Merrill <jason@redhat.com>
883 * pt.c (lookup_template_class_1): Copy abi_tag.
885 2014-08-08 Kai Tietz <ktietz@redhat.com>
887 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
888 that we operate on a true inline.
890 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
892 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
893 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
895 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
898 * decl.c (build_enumerator): Handle class types with conversion
899 operators via perform_implicit_conversion_flags and
900 build_expr_type_conversion.
902 * cvt.c (build_expr_type_conversion): Replace pair of errors
905 2014-08-07 Jason Merrill <jason@redhat.com>
908 * parser.c (c_parse_file): Change sorry to fatal_error.
911 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
913 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
915 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
917 2014-08-06 Jason Merrill <jason@redhat.com>
919 * init.c (build_vec_init): Fix constant initialization of
921 (build_value_init_noctor): Call maybe_constant_init.
922 * semantics.c (maybe_constant_init): See through EXPR_STMT and
926 * init.c (build_vec_init): Reorganize earlier change a bit.
929 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
930 if we're just returning an INIT_EXPR.
932 2014-08-06 Jason Merrill <jason@redhat.com>
933 Braden Obrzut <admin@maniacsvault.net>
935 * pt.c (check_explicit_specialization): Don't test
936 DECL_DECLARED_INLINE_P for a variable template.
938 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
941 * typeck.c (cp_build_binary_op): Extend to more cases the
944 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
946 Implement constexpr variable templates
947 * decl.c (grokvardecl): Handle specializations of variable templates.
948 (grokdeclarator): Handle variable template id expressions and NULL_TREE
949 return from grokvardecl.
950 * decl2.c (check_member_template): Allow declaration of template member
952 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
954 * pt.c (check_template_variable): Accept variable temploids at
956 (push_template_decl_real): The current instantiation of a template
958 (determine_specialization): Accept variable templates.
959 (check_explicit_specialization): Handle and check for malformed
960 variable template specializations.
961 (lookup_template_variable): New.
962 (tsubst_decl): Handle variable template specializations.
963 (do_decl_instantiation): Handle template variables.
964 (instantiate_decl): Handle template variables.
965 * semantics.c (finish_template_variable): New.
966 (finish_id_expression): Instantiate variable templates.
967 * cp-tree.h (variable_template_p): New.
969 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
972 * decl.c (check_redeclaration_no_default_args): New.
973 (duplicate_decls): Use it, handle default arguments
974 in redeclarations of function templates.
976 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
978 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
980 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
982 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
983 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
984 instead of pointer_set.
986 2014-08-01 Jason Merrill <jason@redhat.com>
989 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
990 init-list for trailing elements.
991 * typeck2.c (process_init_constructor_array): Likewise.
993 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
996 * decl.c (duplicate_decls): Handle static member functions too.
998 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1000 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1003 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1006 * parser.c (cp_parser_array_notation): Added check for array_type.
1008 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1011 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1012 DECL_EXPR improved. Changed handling for INIT_EXPR.
1014 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1016 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1018 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1020 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1021 -fsanitize=alignment call ubsan_maybe_instrument_reference
1022 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1023 for calls to member functions.
1025 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1028 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1029 whether it is returning the address of a local variable.
1030 (check_return_expr): Return 0 instead of the address of a local
1033 2014-07-30 Jason Merrill <jason@redhat.com>
1037 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1039 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1042 * pt.c (unify_arity): Add boolean parameter.
1043 (unify_too_few_arguments): Likewise.
1044 (type_unification_real): Diagnose correctly insufficient
1045 arguments in the presence of trailing variadic parameters;
1046 deducing multiple trailing packs as empty is fine.
1048 2014-07-30 Jason Merrill <jason@redhat.com>
1053 * decl2.c (mark_all_virtuals): New variable.
1054 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1055 (cp_write_global_declarations): Set it and give helpful diagnostic
1056 if it introduces errors.
1057 * class.c (finish_struct_1): Check it.
1061 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1062 (check_explicit_specialization): Clear it on specializations.
1063 * decl.c (duplicate_decls, start_decl): Likewise.
1064 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1065 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1066 linkage after setting the appropriate flags.
1067 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1068 * decl2.c (mark_needed): Mark clones.
1069 (import_export_decl): Not here.
1071 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1073 Implement N4051 - Allow typename in a template template parameter
1074 * parser.c (cp_parser_type_parameter_key): New funtion;
1075 (cp_parser_token_is_type_parameter_key): Ditto;
1076 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1077 but pedwarn for less than cxx1z.
1079 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1082 * call.c (standard_conversion): Use resolve_nondeduced_context
1083 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1085 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1088 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1091 2014-07-15 Jason Merrill <jason@redhat.com>
1094 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1098 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1099 * class.c (finish_struct): Reject invalid definition of
1100 std::initializer_list.
1102 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1104 * call.c (convert_like_real): Call print_z_candidate and inform only
1105 if permerror returns true.
1107 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1109 * class.c (build_clone): Do not clear assembler names of
1111 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1112 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1113 as a special case return sizeof (struct tree_decl_non_common)
1115 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1116 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1117 * cp/cp-tree.h (tree_template_decl): New structure.
1118 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1119 (union cp_lang_tree_node): Add template_decl.
1120 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1122 2014-07-14 Jason Merrill <jason@redhat.com>
1126 * pt.c (instantiate_decl): Don't check defer_ok for local class
1129 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1132 * cp-tree.h (LITERAL_ZERO_P): Define.
1133 * parser.c (cp_parser_parenthesized_expression_list): Add
1134 want_literal_zero_p argument, if true, for literal zeros
1135 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1136 (cp_parser_postfix_expression): Adjust
1137 cp_parser_parenthesized_expression_list caller, handle
1138 -Wmemset-transposed-args.
1139 (literal_zeros): New variable.
1141 2014-07-13 Jason Merrill <jason@redhat.com>
1144 * semantics.c (is_instantiation_of_constexpr): Return true for
1145 defaulted functions, too.
1146 (explain_invalid_constexpr_fn): Only use
1147 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1148 * method.c (explain_implicit_non_constexpr): Pass
1149 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1152 * decl.c (check_initializer): Don't finish_compound_literal
1153 on erroneous constexpr init.
1156 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1159 * decl.c (create_array_type_for_decl): Only check for auto once.
1162 * call.c (build_list_conv): Don't try to build a list of references.
1164 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1166 PR C++/60209 - Declaration of user-defined literal operator cause error
1167 * parser.c (cp_parser_operator): Fold treatment of strings
1168 and user-defined string literals. Use the full string parser.
1169 (cp_parser_string_literal): Add flag to not look for literal operator.
1171 2014-07-11 Jason Merrill <jason@redhat.com>
1175 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1177 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1180 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1182 * decl.c (check_initializer): Don't call check_narrowing here,
1183 set LOOKUP_NO_NARROWING.
1184 * typeck2.c (digest_init_r): Likewise.
1186 2014-07-10 Jason Merrill <jason@redhat.com>
1189 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1193 * decl2.c (mark_all_virtuals): New variable.
1194 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1195 (cp_write_global_declarations): Set it and give helpful diagnostic
1196 if it introduces errors.
1197 * class.c (finish_struct_1): Check it.
1198 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1200 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1203 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1204 outside class declaration, in friend declaration, and neither on
1205 constructor nor conversion operator.
1207 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1211 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1212 cv-qualifiers of function types.
1214 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1215 Paolo Carlini <paolo.carlini@oracle.com>
1218 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1221 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1223 * class.c (check_for_override): Wrap the 'final' and 'override'
1224 keywords in %< and %>.
1226 2014-07-06 Marek Polacek <polacek@redhat.com>
1229 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1230 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1231 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1234 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1236 * pt.c (convert_template_argument): Use inform instead of error in
1239 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1244 * parser.c (cp_parser_userdef_string_literal): Take a tree
1246 (cp_parser_string_literal): Don't hack the token stream.
1248 2014-06-30 Jason Merrill <jason@redhat.com>
1252 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1254 * init.c (build_vtbl_address): Don't mark destructor.
1255 * class.c (finish_struct_1): Add all classes to keyed_classes
1259 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1262 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1264 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1265 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1266 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1267 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1268 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1269 * pt.c (unify): Also check whether the argument is a PMF.
1271 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1274 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1275 a '[' can also start a primary-expression.
1276 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1277 when cp_parser_tokens_start_cast_expression returns -1.
1279 2014-06-30 Jason Merrill <jason@redhat.com>
1282 * pt.c (unify_one_argument): Type/expression mismatch just causes
1285 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1288 2014-06-30 Marek Polacek <polacek@redhat.com>
1290 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1291 function has no_sanitize_undefined attribute.
1292 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1293 function has no_sanitize_undefined attribute.
1295 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1298 * cp-array-notation.c (expand_sec_reduce_builtin):
1299 Check that bultin argument is correct.
1300 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1302 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1306 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1307 types aren't the same.
1309 2014-06-27 Jason Merrill <jason@redhat.com>
1312 * error.c (dump_template_bindings): Don't tsubst in a clone.
1314 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1317 * semantics.c (finish_compound_literal): Revert r204228.
1319 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1321 * parser.c (cp_parser_compound_literal_p): New.
1322 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1324 2014-06-26 Jason Merrill <jason@redhat.com>
1326 * parser.c (cp_parser_for_init_statement): Change range-for error
1329 N3994 Ranged-based for-loops: The Next Generation
1330 * parser.c (cp_lexer_nth_token_is): New.
1331 (cp_parser_for_init_statement): Allow "for (id : init)".
1333 2014-06-26 Teresa Johnson <tejohnson@google.com>
1335 * class.c (dump_class_hierarchy): Use saved dump files.
1336 (dump_vtable): Ditto.
1339 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1342 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1343 parameter lists outside of function parameter scope.
1345 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1349 * typeck2.c (process_init_constructor_record): Do not complain about
1350 uninitialized const members, because within aggregate-initialization,
1351 members without explicit initializers are value-initialized.
1353 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1355 * semantics.c (finish_omp_clauses): Make sure
1356 OMP_CLAUSE_LINEAR_STEP has correct type.
1358 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1360 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1361 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1362 FUNCTION_DECL check.
1363 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1364 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1365 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1366 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1368 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1371 * decl.c (grokdeclarator): Do not early check for operator-function-id
1374 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1376 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1379 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1381 * parser.c (cp_parser_omp_for_loop): For
1382 #pragma omp parallel for simd move lastprivate clause from parallel
1383 to for rather than simd.
1385 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1389 * decl.c (grokparms): Accept a single parameter of type 'void'.
1391 2014-06-20 Jason Merrill <jason@redhat.com>
1394 * call.c (add_function_candidate): Avoid special 'this' handling
1395 if we have a ref-qualifier.
1398 * call.c (build_over_call): Call build_this in template path.
1400 2014-06-19 Jason Merrill <jason@redhat.com>
1403 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1405 2014-06-18 Jason Merrill <jason@redhat.com>
1408 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1409 ref-qualifier handling.
1412 * pt.c (resolve_overloaded_unification): Preserve
1413 ARGUMENT_PACK_EXPLICIT_ARGS.
1415 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1417 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1419 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1421 2014-06-17 Jason Merrill <jason@redhat.com>
1424 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1426 2014-06-15 Jason Merrill <jason@redhat.com>
1429 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1432 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1434 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1436 * decl.c (grokvardecl): Fix pasto in previous patch.
1438 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1440 * decl.c (duplicate_decls): Use set_decl_tls_model.
1441 (grokdeclarator): Likewise.
1442 * semantics.c (finish_id_expression): Check TLS only for
1444 (finish_omp_threadprivate): Use decl_default_tls_model.
1445 * decl2.c (get_guard): Likewise.
1446 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1448 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1451 * decl.c (grokparms): Improve error message about void parameters.
1452 * error.c (type_to_string): Fix aka cut off code.
1454 2014-06-12 Jason Merrill <jason@redhat.com>
1456 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1457 * cvt.c (type_promotes_to): Likewise.
1458 * mangle.c (write_type, write_expression): Likewise.
1459 (write_name, write_template_arg): Likewise.
1460 (mangle_decl): Make alias based on flag_abi_compat_version.
1461 Emit -Wabi warning here.
1462 (finish_mangling_internal): Not here. Drop warn parm.
1463 (finish_mangling_get_identifier, finish_mangling): Adjust.
1464 (mangle_type_string, mangle_special_for_type): Adjust.
1465 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1466 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1467 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1469 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1470 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1471 (layout_nonempty_base_or_field, end_of_class): Likewise.
1472 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1473 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1474 (layout_virtual_bases): Likewise.
1475 * decl.c (compute_array_index_type): Likewise.
1476 * mangle.c (write_mangled_name, write_prefix): Likewise.
1477 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1478 (write_template_arg, write_array_type): Likewise.
1479 * method.c (lazily_declare_fn): Likewise.
1480 * rtti.c (get_pseudo_ti_index): Likewise.
1481 * typeck.c (comp_array_types): Likewise.
1483 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1485 * vtable-class-hierarchy.c: Update handling for section names
1486 that are no longer trees.
1487 * decl.c (duplicate_decls): Likewise.
1489 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1492 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1493 to cp_parser_declarator.
1495 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1498 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1499 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1502 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1505 * parser.c (cp_parser_declarator): Add bool parameter.
1506 (cp_parser_direct_declarator): Likewise, use it.
1507 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1508 (cp_parser_condition, cp_parser_explicit_instantiation,
1509 cp_parser_init_declarator, cp_parser_type_id_1,
1510 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1511 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1512 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1514 * decl.c (grokdeclarator): Fix handling of friend declared in
1515 namespace scope (g++.dg/parse/friend10.C).
1517 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1519 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1521 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1522 (maybe_clone_body): Move symbol across comdat groups.
1523 * method.c (use_thunk): Copy implicit section flag.
1525 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1528 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1530 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1532 * method.c (use_thunk): Use set_decl_section_name.
1533 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1534 * decl.c (duplicate_decls): Likewise.
1535 * vtable-class-hierarchy.c: Likewise.
1537 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1540 * class.c (check_field_decls): In C++11 mode do not reject
1541 static data members and reference-type members in unions.
1543 2014-06-05 Jason Merrill <jason@redhat.com>
1546 * decl.c (check_initializer): Collapse a TREE_LIST here.
1547 * typeck2.c (store_init_value): Not here.
1549 2014-06-05 Richard Biener <rguenther@suse.de>
1550 Paolo Carlini <paolo.carlini@oracle.com>
1553 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1554 handling of empty classes.
1556 2014-06-04 Jason Merrill <jason@redhat.com>
1558 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1559 for noexcept and thread_local, too.
1562 * decl.c (check_initializer): Maybe clear
1563 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1565 2014-06-05 Richard Biener <rguenther@suse.de>
1568 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1569 warnings for accessing empty classes.
1571 2014-06-05 Marek Polacek <polacek@redhat.com>
1574 * parser.c (cp_parser_binary_expression): Warn when logical not is
1575 used on the left hand side operand of a comparison.
1577 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1580 * typeck.c (cp_build_modify_expr): Handle array of characters
1581 initialized by a string literal.
1582 * decl.c (check_initializer): Handle parenthesized string literal
1584 * typeck2.c (store_init_value): Remove redundant check.
1586 2014-06-04 Jason Merrill <jason@redhat.com>
1590 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1591 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1593 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1596 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1599 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1603 * call.c (standard_conversion): Convert nullptr to bool only
1604 in case of direct-initialization.
1605 (convert_like_real): Provide informative error message.
1607 2014-06-03 Marek Polacek <polacek@redhat.com>
1610 * semantics.c (finish_switch_cond): Warn if switch condition has
1613 2014-06-03 Jason Merrill <jason@redhat.com>
1616 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1617 variable to local_specializations.
1620 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1622 2014-06-02 Jason Merrill <jason@redhat.com>
1625 * decl.c (reshape_init_class): Handle un-folded
1626 constant-expressions.
1629 * pt.c (pack_deducible_p): Handle canonicalization.
1631 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1633 * pt.c (tsubst_function_type): Initialize arg_types.
1635 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1638 * class.c (handle_using_decl): Pass the correct scope to
1639 cp_emit_debug_info_for_using.
1641 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1645 * search.c (accessible_p): Use current_nonlambda_class_type.
1646 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1648 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1650 * decl.c: Include builtins.h.
1651 * semantics.c: Likewise.
1653 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1657 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1658 * pt.c (tsubst_function_type): Inject the this parameter; do the
1659 substitutions in the order mandated by the DR.
1660 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1661 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1662 (static_fn_type): Copy it.
1663 * decl2.c (build_memfn_type, change_return_type,
1664 cp_reconstruct_complex_type): Likewise.
1665 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1666 * tree.c (strip_typedefs): Likewise.
1667 * typeck.c (merge_types): Likewise.
1669 2014-05-30 Jason Merrill <jason@redhat.com>
1672 * pt.c (instantiate_decl): Check that defer_ok is not set for
1673 local class members.
1676 * pt.c (tsubst_init): Split out from...
1677 (tsubst_expr) [DECL_EXPR]: Here.
1678 (tsubst_copy) [VAR_DECL]: Use it.
1679 * semantics.c (finish_id_expression): Return the decl for static/const.
1681 2014-05-28 Jason Merrill <jason@redhat.com>
1684 * decl.c (cxx_comdat_group): Return a decl.
1685 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1687 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1691 * call.c (build_aggr_conv): Ignore passed in flags.
1692 (build_array_conv, build_complex_conv): Likewise.
1694 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1696 * optimize.c (maybe_thunk_body): Use set_comdat_group.
1697 (maybe_clone_body): Likewise.
1698 * decl.c (duplicate_decls): Update code duplicating comdat group;
1699 do not copy symtab pointer; before freeing newdecl remove it
1701 * decl2.c (constrain_visibility): Use set_comdat_group.
1703 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1705 * rtti.c: Include tm_p.h
1706 (emit_tinfo_decl): Force RTTI data to be aligned to required
1709 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1711 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1712 ignoring other target adjustments.
1714 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1716 * semantics.c (finish_omp_clauses): Remove duplicated variable
1719 * parser.c (cp_parser_omp_target): Return bool values.
1721 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1724 * lambda.c (add_capture): Enforce that capture by value requires
1726 * typeck2.c (cxx_incomplete_type_inform): Early return if
1727 TYPE_MAIN_DECL is null.
1729 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
1732 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1734 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1737 * lambda.c (build_capture_proxy, add_capture): Treat normal
1738 captures and init-captures identically.
1740 2014-05-21 Mark Wielaard <mjw@redhat.com>
1743 * cp-lang.c (cxx_enum_underlying_base_type): New function.
1744 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1746 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1748 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1749 * cp-array-notation.c (replace_invariant_exprs): Likewise.
1750 (expand_array_notation): Handle VOID_CST.
1751 * error.c (dump_expr): Likewise.
1752 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1753 (cxx_pretty_printer::expression): Likewise.
1754 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1755 * decl.c (register_dtor_fn): Likewise.
1756 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1757 (build_delete, push_base_cleanups): Likewise.
1758 * mangle.c (write_expression): Likewise.
1759 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1760 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1761 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1762 * tree.c (cp_tree_equal): Likewise.
1763 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1764 instead of void_zero_node.
1765 * typeck.c (check_return_expr): Likewise.
1766 * typeck2.c (build_functional_cast): Likewise.
1768 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
1771 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1773 (cp_parser_statement): ...here. Make sure only semicolon can go after
1776 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1781 * typeck2.c (digest_nsdmi_init): New.
1782 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1783 * init.c (get_nsdmi): Likewise.
1784 * cp-tree.h (digest_nsdmi_init): Declare.
1786 2014-05-20 Jason Merrill <jason@redhat.com>
1788 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1789 up a virtual function in a dummy object.
1791 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1794 * decl.c (duplicate_decls): Replace pair of warning_at with
1795 warning_at + inform.
1796 (maybe_commonize_var): Likewise.
1798 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1801 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1802 (tsubst_copy_and_build): Perform recursive substitutions in a
1803 deterministic order.
1805 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1808 * typeck2.c (cxx_incomplete_type_inform): New.
1809 (cxx_incomplete_type_diagnostic): Use it.
1810 * decl.c (grokdeclarator): Check the element type of an
1811 incomplete array type; call the above.
1812 * cp-tree.h (cxx_incomplete_type_inform): Declare.
1814 2014-05-19 Jason Merrill <jason@redhat.com>
1817 * pt.c (tsubst_copy): Don't check at_function_scope_p.
1818 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1820 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
1822 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1823 * parser.c (cp_parser_enum_specifier): Likewise.
1825 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1827 * class.c (sorted_fields_type_new): Adjust.
1828 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1829 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1830 * cp-tree.h: Remove usage of variable_size gty attribute.
1831 * decl.c (make_label_decl): Adjust.
1832 (check_goto): Likewise.
1833 (start_preparsed_function): Likewise.
1834 (save_function_data): Likewise.
1835 * lex.c (init_reswords): Likewise.
1836 (retrofit_lang_decl): Likewise.
1837 (cxx_dup_lang_specific_decl): Likewise.
1838 (copy_lang_type): Likewise.
1839 (cxx_make_type): Likewise.
1840 * name-lookup.c (binding_entry_make): Likewise.
1841 (binding_table_construct): Likewise.
1842 (binding_table_new): Likewise.
1843 (cxx_binding_make): Likewise.
1844 (pushdecl_maybe_friend_1): Likewise.
1845 (begin_scope): Likewise.
1846 (push_to_top_level): Likewise.
1847 * parser.c (cp_lexer_alloc): Likewise.
1848 (cp_lexer_new_from_tokens): Likewise.
1849 (cp_token_cache_new): Likewise.
1850 (cp_parser_context_new): Likewise.
1851 (cp_parser_new): Likewise.
1852 (cp_parser_nested_name_specifier_opt): Likewise.
1853 (cp_parser_template_id): Likewise.
1854 * pt.c (maybe_process_partial_specialization): Likewise.
1855 (register_specialization): Likewise.
1856 (add_pending_template): Likewise.
1857 (lookup_template_class_1): Likewise.
1858 (push_tinst_level): Likewise.
1859 * semantics.c (register_constexpr_fundef): Likewise.
1860 (cxx_eval_call_expression): Likewise.
1861 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1863 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
1866 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1867 when cp_parser_lookup_name sets ambiguous_decls.
1869 2014-05-15 Jason Merrill <jason@redhat.com>
1871 * call.c (print_conversion_rejection): Use loc consistently.
1873 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1875 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1876 * call.c (convert_like_real, build_new_method_call_1): Use it.
1877 * decl2.c (grokfield): Likewise.
1878 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1879 build_new_1): Likewise.
1880 * mangle.c (write_expression): Likewise.
1881 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1883 2014-05-14 Jason Merrill <jason@redhat.com>
1887 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1888 dropped cv-quals as a bad conversion.
1889 (convert_like_real) [ck_ref_bind]: Explain them.
1890 (compare_ics): Check badness before stripping reference
1891 bindings. Handle comparing bad reference bindings.
1892 * typeck.c (comp_cv_qualification): Add overload that just takes
1894 * cp-tree.h: Declare it.
1896 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1897 (arg_conversion_rejection, bad_arg_conversion_rejection)
1898 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1899 (add_function_candidate): Pass actual argument, rather than type, to
1900 bad_arg_conversion_rejection.
1901 (print_conversion_rejection): Explain what's wrong with the conversion.
1902 (print_z_candidates): Say "candidate:" before each candidate.
1903 (splice_viable): Be strict if we see a viable or template candidate.
1904 (build_user_type_conversion_1): Pass false to strict parameter.
1905 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1906 (build_new_op_1, build_new_method_call_1): Likewise.
1907 (build_op_call_1): Pass true to strict parameter.
1909 2014-05-13 Jason Merrill <jason@redhat.com>
1911 * call.c (print_error_for_call_failure): Say "no match" rather
1912 than "ambiguous" if there were no strict matches.
1913 (build_new_method_call_1): Likewise.
1916 * semantics.c (is_this_parameter): Allow capture proxies too.
1918 2014-05-12 Jason Merrill <jason@redhat.com>
1920 * call.c (maybe_print_user_conv_context): New.
1921 (convert_like_real): Use it. Print call context for bad
1922 user-defined conversion.
1923 (build_over_call): Print call context for bad 'this' conversion.
1925 * call.c (convert_like_real): Use inform for identifying the
1928 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1930 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1931 complain & tf_error is false.
1933 * decl.c (make_unbound_class_template): Prefer inform for
1934 "declared here"-type message.
1936 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1940 * lambda.c (lambda_expr_this_capture): Add new parameter
1941 add_capture_p controlling whether the functions will try to
1942 capture 'this' via the default capture.
1943 (maybe_resolve_dummy): Likewise.
1944 * cp-tree.h: Adjust prototypes.
1945 * call.c, semantics.c: Change callers of these functions.
1946 * call.c (build_new_method_call_1): Use the actual 'this' that
1947 would be potentially captured for the overload resolution, instead
1948 of the dummy object.
1950 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1952 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1954 (convert_nontype_argument): Adjust calls.
1955 (coerce_template_parameter_pack): Add missing complain & tf_error
1958 2014-05-09 Jason Merrill <jason@redhat.com>
1962 * call.c (build_conditional_expr_1, conditional_conversion): Handle
1963 non-class lvalues and xvalues that differ only in cv-qualifiers.
1967 * call.c (build_user_type_conversion_1): The copy-init temporary
1971 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1974 * call.c (build_conditional_expr_1): If overload resolution finds
1975 no match, just say "different types".
1978 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1981 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1982 if we didn't find a conversion.
1983 Don't accept a bad conversion too early.
1985 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1988 * typeck.c (convert_for_assignment): Provide an inform for pointers
1989 to incomplete class types.
1991 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1994 * pt.c (convert_nontype_argument): Protect all the error calls
1995 with complain & tf_error.
1997 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2000 * pt.c (instantiate_decl): Avoid generating the body of a
2003 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2006 * pt.c (maybe_begin_member_template_processing): Use
2007 uses_template_parms.
2009 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2010 Mike Stump <mikestump@comcast.net>
2011 Richard Sandiford <rdsandiford@googlemail.com>
2013 * call.c: Include wide-int.h.
2014 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2015 (convert_for_arg_passing): Likewise.
2016 * class.c: Include wide-int.h.
2017 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2018 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2019 (include_empty_classes): Likewise
2020 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2021 * cvt.c: Include wide-int.h.
2022 (ignore_overflows): Use wide_int_to_tree.
2023 * decl.c: Include wide-int.h.
2024 (check_array_designated_initializer): Use wide-int interfaces.
2025 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2026 (finish_enum_value_list): Use signop.
2027 (build_enumerator): Use wide-int interfaces.
2028 * init.c: Include wide-int.h.
2029 (build_new_1): Use wide-int interfaces.
2030 * mangle.c: Include wide-int.h.
2031 (write_integer_cst): Use wide-int interfaces.
2032 (write_array_type): Likewise.
2033 * tree.c: Include wide-int.h.
2034 (cp_tree_equal): Use tree_int_cst_equal.
2035 * typeck2.c: Include wide-int.h.
2036 (process_init_constructor_array): Use wide-int interfaces.
2038 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2041 * decl.c (grokfndecl): Check duplicate_decls return value for
2043 * pt.c (instantiate_decl): A deleted function is defined.
2045 2014-05-02 Jason Merrill <jason@redhat.com>
2047 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2050 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2052 (add_capture): Check for VLA before calling it.
2053 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2054 just the current one. Make non-static.
2055 * cp-tree.h: Declare it.
2056 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2057 the operand was static or constant.
2059 2014-05-02 Marek Polacek <polacek@redhat.com>
2061 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2064 2014-05-01 Marek Polacek <polacek@redhat.com>
2067 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2068 between label and variable when warning about returning local address.
2070 2014-04-30 Jason Merrill <jason@redhat.com>
2073 * init.c (build_value_init): Don't try to call an array constructor.
2076 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2078 2014-04-30 Marek Polacek <polacek@redhat.com>
2080 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2081 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2082 for non-integer types.
2084 2014-04-29 Jason Merrill <jason@redhat.com>
2087 Represent the unevaluated exception specification of an implicitly
2088 declared or deleted function with a simple placeholder, not a list
2090 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2091 * except.c (unevaluated_noexcept_spec): New.
2092 * class.c (deduce_noexcept_on_destructor): Use it.
2093 * decl.c (check_redeclaration_exception_specification): Call
2094 maybe_instantiate_noexcept.
2095 (duplicate_decls): Call it before merge_types.
2096 (start_preparsed_function): Call maybe_instantiate_noexcept.
2097 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2098 * init.c (get_nsdmi): Factor out of perform_member_init.
2099 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2100 (walk_field_subobs): Consider NSDMI for EH spec.
2101 (get_defaulted_eh_spec): New.
2102 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2103 (defaulted_late_check): Defer EH checking in non-template classes.
2104 (after_nsdmi_defaulted_late_checks): New.
2105 * parser.c (cp_parser_class_specifier_1): Use it.
2106 (unparsed_classes): New macro.
2107 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2108 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2109 Remove list-of-functions handling.
2110 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2111 handling and FN parameter.
2112 * typeck.c (merge_types): Adjust.
2114 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2117 * parser.c (cp_parser_alias_declaration): Check return value of
2120 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2122 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2123 atomic-clause, allow comma in between atomic-clause and
2126 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2129 * rtti.c (emit_support_tinfos): Do not iterate on
2130 registered_builtin_types (partial revert).
2132 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2135 * semantics.c (apply_deduced_return_type): Complete non-void type
2136 before estimating whether the type is aggregate.
2138 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2141 * rtti.c (emit_support_tinfo_1): New function, extracted from
2142 emit_support_tinfos.
2143 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2145 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2148 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2149 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2151 2014-04-18 Jason Merrill <jason@redhat.com>
2154 * call.c (reference_binding): Recurse on user-defined conversion.
2157 * call.c (standard_conversion): Don't try to apply restrict to void.
2159 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2161 * decl.c (reshape_init_r): Handle a single element of vector type.
2163 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2166 * decl2.c (cplus_decl_attributes): Handle
2167 pointer-to-member-function declarations.
2169 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2172 * call.c (build_user_type_coversion): Use build_dummy_object
2173 to create the placeholder object for a constructor method call.
2174 (build_special_member_call): Likewise.
2175 (build_over_call): Check for the placeholder object with
2177 (build_new_method_call_1): Likewise. Don't attempt to resolve
2178 a dummy object for a constructor method call.
2180 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2183 * friend.c (add_friend, make_friend_class): Move repeated friend
2184 warning under Wredundant_decls.
2186 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2188 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2189 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2190 (do_class_using_decl): Likewise.
2191 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2193 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2196 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2198 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2200 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2202 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2204 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2206 2014-04-11 Jason Merrill <jason@redhat.com>
2208 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2210 (cp_lexer_get_preprocessor_token): Always clear it.
2211 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2215 * decl.c (reshape_init_r): Handle a single element of class type.
2218 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2219 built-in operator new.
2221 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2224 * name-lookup.c (parse_using_directive): Return early if the
2225 attribs argument is error_mark_node; use get_attribute_name.
2227 2014-04-11 Jason Merrill <jason@redhat.com>
2231 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2232 * call.c (struct z_candidate): Add flags field.
2233 (add_candidate): Add flags parm.
2234 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2235 (add_template_candidate_real): Pass it.
2236 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2237 * tree.c (build_aggr_init_expr): Copy it.
2238 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2240 2014-04-10 Richard Biener <rguenther@suse.de>
2241 Jakub Jelinek <jakub@redhat.com>
2244 * error.c (dump_decl) <case FUNCTION_DECL>: If
2245 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2246 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2249 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2251 * pt.c (check_template_variable): Check for the return of pedwarn
2252 before emitting a note.
2253 * parser.c (cp_parser_lambda_introducer): Likewise.
2255 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2258 * pt.c (process_template_parm): For an invalid non-type parameter
2259 only set TREE_TYPE to error_mark_node.
2260 (push_inline_template_parms_recursive, comp_template_parms,
2261 redeclare_class_template, coerce_template_template_parm,
2262 coerce_template_template_parms, unify): Use error_operand_p.
2264 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2266 * class.c (check_bases_and_members): Warn about non-virtual dtors
2267 in public bases only. Check warn_ecpp before complaining about
2268 non-polymorphic bases.
2270 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2272 * decl.c (duplicate_decls): Check for the return of warning_at
2273 before emitting a note.
2274 (warn_misplaced_attr_for_class_type): Likewise.
2275 (check_tag_decl): Likewise.
2277 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2280 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2282 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2285 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2286 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2287 instantiating a variable-sized type.
2290 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2292 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2294 * class.c (find_abi_tags_r): Check for the return of warning
2295 before emitting a note.
2296 (one_inherited_ctor): Likewise.
2298 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2300 * decl.c (duplicate_decls): Check for the return of permerror
2301 before emitting a note.
2303 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2305 * class.c (accessible_nvdtor_p): New.
2306 (check_bases): Don't check base destructor here ...
2307 (check_bases_and_members): ... check them here. Trigger on
2308 Wnon-virtual-dtor flag.
2309 (finish_struct_1): Use accessible_nvdtor_p.
2311 2014-04-01 Jason Merrill <jason@redhat.com>
2313 * pt.c (process_partial_specialization): Say "not deducible"
2314 rather than "not used". Use inform.
2317 * pt.c (coerce_template_parms): Check that the pack expansion
2318 pattern works with the first matching parameter.
2320 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2322 * init.c (perform_member_init): Homogenize uninitialized
2325 2014-04-01 Jason Merrill <jason@redhat.com>
2328 * call.c (build_array_conv): Call complete_type.
2331 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2332 (picflag_from_initializer): Return it.
2333 (process_init_constructor): Handle it.
2336 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2337 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2338 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2339 (most_general_template): Handle more kinds of template.
2340 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2341 instantiations and specializations.
2343 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2346 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2347 COMPONENT_REFs and ARRAY_REFs sooner.
2349 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2352 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2353 usage in non-functions with pushed scope.
2355 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2358 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2359 to indicate whether a scope is in the process of defining a class.
2360 * semantics.c (begin_class_definition): Set defining_class_p.
2361 * name-lookup.c (leave_scope): Reset defining_class_p.
2362 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2363 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2364 unwinding to class-defining scope to handle the erroneous definition of
2365 a generic function of an arbitrarily nested class within an enclosing
2368 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2371 * method.c (walk_field_subobs): Improve the diagnostic
2372 locations for both REFERENCE_TYPEs and non-static const members.
2373 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2374 instead of %qD to be consistent with the c++11 diagnostic.
2376 2014-03-25 Jason Merrill <jason@redhat.com>
2380 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2381 * search.c (get_pure_virtuals): Not here.
2384 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2385 a lambda in unevaluated context.
2388 * decl.c (create_array_type_for_decl): Complain about array of auto.
2390 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2393 * semantics.c (potential_constant_expression_1): Handle
2396 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2399 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2400 introducing an implicit function template parameter within an explicit
2403 2014-03-22 Jason Merrill <jason@redhat.com>
2406 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2409 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2412 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2413 on the name argument.
2415 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2418 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2421 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2424 * call.c (build_new_method_call_1): Handle pure virtuals called by
2427 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2430 * parser.c (cp_parser_member_declaration): Don't allow
2431 finish_fully_implicit_template to consider friend declarations to be
2432 class member templates.
2433 (synthesize_implicit_template_parm): Handling winding back through class
2434 scope to the class being defined in order to inject a template argument
2438 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2439 function scope as per cp_parser_skip_to_end_of_statement.
2441 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2444 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2446 2014-03-14 Jason Merrill <jason@redhat.com>
2450 * search.c (get_pure_virtuals): Handle abstract dtor here.
2451 (dfs_get_pure_virtuals): Not here.
2454 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2455 abstract class as pure.
2457 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2460 * pt.c (maybe_process_partial_specialization): Check return value
2461 of check_specialization_namespace.
2463 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2466 * semantics.c (finish_static_assert): Call cxx_constant_value only
2467 if require_potential_rvalue_constant_expression returns true.
2469 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2472 * method.c (get_inherited_ctor): New.
2473 * cp-tree.h (get_inherited_ctor): Declare it.
2474 * semantics.c (is_valid_constexpr_fn): Use it.
2476 2014-03-10 Jason Merrill <jason@redhat.com>
2479 * call.c (convert_default_arg): Remove special handling for
2483 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2484 when deciding whether to call push_template_decl for a member class.
2485 * pt.c (push_template_decl_real): Return after wrong levels error.
2487 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2490 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2491 lambda, remove the lambda's own template argument list prior to fetching
2495 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2496 function template unwinding on error into a more general location, ...
2497 (cp_parser_skip_to_end_of_statement): ... here.
2499 2014-03-07 Jason Merrill <jason@redhat.com>
2501 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2503 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2504 we're in a trailing return type.
2506 * typeck.c (comp_template_parms_position): 'auto' and
2507 'decltype(auto)' are different from real template parms.
2509 * parser.c (cp_parser_using_declaration): Consume the semicolon
2510 after bare parameter pack error.
2512 * cp-tree.h (REF_PARENTHESIZED_P): New.
2513 * semantics.c (force_paren_expr): Set it.
2514 * pt.c (do_auto_deduction): Check it.
2515 (tsubst) [COMPONENT_REF]: Copy it.
2516 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2518 * decl.c (create_array_type_for_decl): Only warn about invalid
2519 C++1y VLA if flag_iso or warn_vla>0.
2520 (grokdeclarator): Likewise.
2521 * pt.c (tsubst): Likewise.
2522 * semantics.c (finish_decltype_type): Likewise.
2523 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2524 (cp_build_addr_expr_1): Likewise.
2525 * init.c (build_new_1): Improve diagnostics.
2527 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2530 * decl.c (check_initializer): Return NULL_TREE after error;
2531 consistently use inform.
2533 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2535 * decl.c (check_initializer): Remove dead code.
2537 2014-03-06 Marek Polacek <polacek@redhat.com>
2540 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2541 of checking tree code.
2543 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2545 * parser.c (cp_lexer_set_source_position): New.
2546 (cp_parser_mem_initializer): Use it.
2547 (cp_parser_postfix_open_square_expression): Likewise.
2548 (cp_parser_parenthesized_expression_list): Likewise.
2549 (cp_parser_new_initializer): Likewise.
2550 (cp_parser_jump_statement): Likewise.
2551 (cp_parser_initializer): Likewise.
2552 (cp_parser_functional_cast): Likewise.
2554 2014-03-05 Jason Merrill <jason@redhat.com>
2557 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2558 dependent expression.
2561 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2562 if re-parsing might succeed.
2563 * semantics.c (finish_id_expression): Use of a parameter outside
2564 the function body is a parse error.
2566 * parser.c (cp_parser_mem_initializer): Set input_location
2567 properly for init-list warning.
2568 (cp_parser_postfix_open_square_expression): Likewise.
2569 (cp_parser_parenthesized_expression_list): Likewise.
2570 (cp_parser_new_initializer): Likewise.
2571 (cp_parser_jump_statement): Likewise.
2572 (cp_parser_initializer): Likewise.
2573 (cp_parser_functional_cast): Likewise.
2575 2014-03-04 Jason Merrill <jason@redhat.com>
2578 * typeck2.c (process_init_constructor_record): Set
2579 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2583 * parser.c (cp_parser_direct_declarator): Set declarator to
2584 cp_error_declarator on invalid qualified-id.
2586 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2589 * parser.c (cp_parser_using_declaration): Early return when
2590 cp_parser_nested_name_specifier errors out.
2592 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2595 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2596 function scope on parse error in function parameter list.
2598 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2600 * method.c (implicitly_declare_fn): Remove redundant
2601 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2602 * semantics.c (is_instantiation_of_constexpr): Likewise.
2603 * error.c (dump_function_decl): Likewise.
2605 2014-03-01 Jason Merrill <jason@redhat.com>
2608 * semantics.c (begin_maybe_infinite_loop): Use
2609 fold_non_dependent_expr_sfinae.
2611 2014-02-28 Jason Merrill <jason@redhat.com>
2614 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2616 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2619 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2620 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2621 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2623 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2626 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2629 2014-02-27 Jason Merrill <jason@redhat.com>
2633 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2634 are not yet defined.
2636 2014-02-26 Jason Merrill <jason@redhat.com>
2640 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2641 * init.c (build_vtbl_address): Do it here.
2647 * pt.c (struct warning_sentinel): New.
2648 (tsubst_copy_and_build): Use it instead of
2649 c_inhibit_evaluation_warnings.
2650 * typeck.c (maybe_warn_about_useless_cast): Remove
2651 c_inhibit_evaluation_warnings check.
2654 * pt.c (get_template_parm_index): New.
2655 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2656 (process_template_parm): Allow bare packs in template template
2657 parm template parms.
2658 (coerce_template_parameter_pack): Handle fixed template template
2659 parm packs and fixed packs not at the end of the parm list.
2660 (coerce_template_parms): Handle template parm packs not at the end
2662 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2665 * pt.c (unify): Ignore alias templates when deducing a template
2671 * call.c (reference_binding): Recurse on user-defined conversion.
2672 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2674 2014-02-25 Jason Merrill <jason@redhat.com>
2677 * call.c (reference_binding): Recurse on user-defined conversion.
2678 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2680 * call.c (print_conversion_rejection): Handle n_arg of -2.
2681 (build_user_type_conversion_1): Pass it.
2684 * decl2.c (no_linkage_error): Handle C++98 semantics.
2685 (reset_type_linkage): Move from decl.c.
2686 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2687 (bt_reset_linkage_2, reset_decl_linkage): New.
2688 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2689 (cp_write_global_declarations): Move condition into no_linkage_error.
2690 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2691 * semantics.c (expand_or_defer_fn_1): Factor out
2692 tentative_decl_linkage.
2693 * cp-tree.h: Adjust.
2695 * decl2.c (finish_static_data_member_decl): Diagnose static data
2696 member in unnamed class.
2697 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2700 * class.c (clone_function_decl): Call note_vague_linkage_fn for
2701 defaulted virtual dtor.
2705 * pt.c (get_underlying_template): Fix equivalence calculation.
2707 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
2710 * parser.c (function_being_declared_is_template_p): Return false when
2711 processing a template parameter list.
2712 (cp_parser_parameter_declaration_clause): Don't set
2713 auto_is_implicit_function_template_parm_p when processing a
2714 template parameter list.
2716 * parser.c (synthesize_implicit_template_parm): Inject new template
2717 argument list appropriately when a generic member function
2718 of a class template is declared out-of-line.
2721 * parser.c (cp_parser_direct_declarator): Don't save and
2722 restore num_template_parameter_lists around call to
2723 cp_parser_parameter_declaration_list.
2724 (function_being_declared_is_template_p): New predicate.
2725 (cp_parser_parameter_declaration_list): Use
2726 function_being_declared_is_template_p as predicate for
2727 inspecting current function template parameter list length
2728 rather than num_template_parameter_lists.
2730 2014-02-24 Jason Merrill <jason@redhat.com>
2733 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2734 DECL_EXPR initialize a non-class iterator.
2737 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2739 2014-02-21 Jason Merrill <jason@redhat.com>
2742 * parser.c (cp_parser_type_name): Always check dependency.
2743 (cp_parser_type_specifier_seq): Call
2744 cp_parser_parse_and_diagnose_invalid_type_name.
2747 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2750 * parser.c (cp_parser_default_argument): Clear
2751 current_class_ptr/current_class_ref like tsubst_default_argument.
2754 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2755 than current_binding_level.
2758 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2761 * parser.c (cp_parser_enum_specifier): Call
2762 check_for_bare_parameter_packs.
2765 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2769 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2770 of the partial instantiation, not the most general template.
2771 (maybe_process_partial_specialization): Reassign everything on
2775 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2776 (check_explicit_specialization): Don't clone.
2779 * pt.c (coerce_template_parms): Bail if argument packing fails.
2782 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2783 Don't get confused by a CONSTRUCTOR that already has a type.
2786 * call.c (build_array_conv): Don't crash on VLA.
2789 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2792 * lambda.c (maybe_resolve_dummy): Don't try to capture this
2793 in declaration context.
2797 * pt.c (unify): Only unify if deducible. Handle 0-length list.
2800 * parser.c (cp_parser_direct_declarator): Don't wrap a
2801 type-dependent expression in a NOP_EXPR.
2804 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2809 * parser.c (cp_parser_template_argument): Restore dereference.
2810 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2811 (process_partial_specialization): Handle deref.
2814 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
2818 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2819 implicit_template_scope upon leaving an out-of-line generic member
2820 function definition.
2822 2014-02-20 Kai Tietz <ktietz@redhat.com>
2825 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2826 valued type argument as error_mark_node.
2829 * semantics.c (finish_fname): Handle error_mark_node.
2831 2014-02-19 Jason Merrill <jason@redhat.com>
2834 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2835 spec from template context.
2837 2014-02-19 Jakub Jelinek <jakub@redhat.com>
2840 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2841 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2844 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2846 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2849 * semantics.c (ensure_literal_type_for_constexpr_object): Use
2852 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2855 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2856 During error recovery allow_non_constant may be false.
2858 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
2861 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2862 scope whenever a template parameter list has been started, independent
2863 of whether the function call operator was well-formed or not.
2866 * parser.c (cp_parser_member_declaration): Pop fully implicit template
2867 scope for generic friend declarations as well as for non-friends.
2869 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
2872 * method.c (implicitly_declare_fn): A constructor of a class with
2873 virtual base classes isn't constexpr (7.1.5p4).
2875 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2877 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2879 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2882 * parser.c (cp_parser_omp_declare_reduction): Save and free
2885 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2889 * tree.c (handle_init_priority_attribute): Call default_conversion on
2890 the attribute argument.
2892 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2895 * method.c (synthesized_method_walk): If vbases is non-null but
2896 is_empty is true, likewise don't worry about the virtual bases.
2898 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2901 * typeck2.c (process_init_constructor_record): Just skip unnamed
2904 2014-01-31 Jason Merrill <jason@redhat.com>
2907 * pt.c (mark_decl_instantiated): Call mark_needed.
2910 * decl2.c (handle_tls_init): Handle null init fn.
2913 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2915 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2918 * class.c (build_vfield_ref): Early return error_mark_node if
2919 TYPE_VFIELD (type) is null.
2920 (build_base_path): Check return value of build_vfield_ref.
2922 2014-01-31 Jason Merrill <jason@redhat.com>
2925 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2926 [ck_list]: Check for error_mark_node.
2927 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2930 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2931 during partial ordering.
2933 2014-01-31 Marek Polacek <polacek@redhat.com>
2936 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2938 2014-01-30 Jason Merrill <jason@redhat.com>
2941 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2942 (local_specializations): New macro.
2943 * pt.c (local_specializations): Remove variable.
2945 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2948 * parser.c (make_string_pack): Use double_int::from_buffer.
2950 2014-01-30 Marek Polacek <polacek@redhat.com>
2953 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2955 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2956 with input_location.
2957 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2960 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2963 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2965 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2968 * pt.c (lookup_template_class_1): Check start_enum return value
2969 for error_mark_node.
2971 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2973 * decl.c (duplicate_decls, typename_hash, typename_compare):
2974 Use TYPE_IDENTIFIER.
2975 * error.c (dump_type): Likewise.
2976 * mangle.c (dump_substitution_candidates): Likewise.
2978 2014-01-30 Jason Merrill <jason@redhat.com>
2981 * decl2.c (attributes_naming_typedef_ok): New.
2982 * cp-tree.h: Declare it.
2983 * decl.c (grokdeclarator): Check it.
2984 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2986 2014-01-29 Jason Merrill <jason@redhat.com>
2989 * call.c (add_builtin_candidate): Catch dependent types.
2992 * pt.c (expand_template_argument_pack): Correct
2993 non_default_args_count calculation.
2996 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2999 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3000 have a friend template in a class template.
3001 * pt.c (tsubst_friend_function): Look through it.
3002 (push_template_decl_real): A friend member template is
3005 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3008 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3011 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3014 * pt.c (instantiate_template_1): Check for error_mark_node the second
3017 2014-01-29 Jason Merrill <jason@redhat.com>
3020 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3021 cdtor_returns_this case.
3024 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3026 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3029 * semantics.c (finish_omp_reduction_clause): Check type for
3032 2014-01-28 Jason Merrill <jason@redhat.com>
3035 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3036 (tsubst_copy): Use it if lookup fails.
3039 * pt.c (tsubst_function_type): Make sure we keep the same function
3043 * semantics.c (build_anon_member_initialization): Stop walking
3044 when we run out of COMPONENT_REFs.
3047 * decl.c (lookup_and_check_tag): Ignore template parameters if
3048 scope == ts_current.
3049 * pt.c (check_template_shadow): Don't complain about the injected
3052 * decl.c (duplicate_decls): Tweak.
3055 * mangle.c (write_unqualified_name): Handle operator auto.
3057 2014-01-27 Jason Merrill <jason@redhat.com>
3061 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3062 list-initialization. A conversion to rvalue ref that involves
3063 an lvalue-rvalue conversion is bad.
3064 (convert_like_real): Give helpful error message.
3067 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3070 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3074 * pt.c (template_parm_to_arg): Call convert_from_reference.
3075 (tsubst_template_arg): Don't strip reference refs.
3078 * call.c (build_aggr_conv): Reject value-initialization of reference.
3082 * call.c (convert_like_real): Give helpful error about excess braces
3083 for ck_rvalue of scalar type.
3086 * call.c (reference_binding): Only elide braces if the single
3087 element is reference-related.
3090 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3094 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3098 * decl.c (compute_array_index_type): Don't call
3099 maybe_constant_value for a non-integral expression.
3101 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3103 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3105 * cp-gimplify.c (cp_genericize): Likewise.
3106 * decl.c (grokfndecl): Likewise.
3107 * parser.c (cp_parser_postfix_expression): Likewise.
3108 (cp_parser_postfix_open_square_expression): Likewise.
3109 (cp_parser_direct_declarator): Likewise.
3110 (is_cilkplus_vector_p): Likewise.
3111 (cp_parser_omp_clause_name): Likewise.
3112 (cp_parser_omp_all_clauses): Likewise.
3113 * pt.c (apply_late_template_attributes): Likewise.
3114 * typeck.c (cp_build_array_ref): Likewise.
3115 (cp_build_compound_expr): Likewise.
3116 (check_return_expr): Likewise.
3118 2014-01-24 Jason Merrill <jason@redhat.com>
3121 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3126 * typeck2.c (process_init_constructor_array): Don't create
3129 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3131 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3132 handling for RANGE_ARRAY case.
3134 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3137 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3139 2014-01-23 Marek Polacek <polacek@redhat.com>
3142 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3144 2014-01-23 Marek Polacek <polacek@redhat.com>
3147 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3150 2014-01-23 Jason Merrill <jason@redhat.com>
3153 * cp-tree.h (struct language_function): Add infinite_loop and
3155 (current_function_infinite_loop): New.
3156 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3157 (break_maybe_infinite_loop): New.
3158 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3159 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3160 (begin_range_for_stmt): Use them.
3161 * decl.c (finish_function): Don't warn about missing return
3162 if current_function_infinite_loop.
3163 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3164 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3166 * call.c (build_op_delete_call): Use make_tree_vector and
3167 release_tree_vector.
3169 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3172 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3173 nested_name_specifier.
3175 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3177 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3178 see if there is an attribute after function decl. If so, then
3180 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3181 enabled function late parsing.
3182 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3183 attribute for a SIMD-enabled function.
3184 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3185 the function is used by SIMD-enabled function (indicated by NULL
3186 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3187 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3188 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3189 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3190 vectorlength clause. Added a new bool parameter to differentiate
3192 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3193 (is_cilkplus_vector_p): Likewise.
3194 (cp_parser_late_parsing_elem_fn_info): Likewise.
3195 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3196 and "vectorlength" clauses when Cilk Plus is enabled.
3197 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3198 and emit a sorry message when step size is a parameter.
3199 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3200 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3202 * pt.c (apply_late_template_attributes): Likewise.
3204 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3207 * semantics.c (finish_omp_reduction_clause): Reject
3208 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3210 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3213 * parser.c (cp_parser_class_head): Push the class before parsing
3214 the base-clause, pop after it.
3216 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3218 * decl2.c (cpp_check): Revert prototype change.
3220 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3224 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3227 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3230 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3231 only when errorcount == 0.
3233 2014-01-17 Marek Polacek <polacek@redhat.com>
3236 * cvt.c (ocp_convert): Don't segfault on non-existing
3237 ENUM_UNDERLYING_TYPE.
3239 2014-01-16 Jason Merrill <jason@redhat.com>
3242 * tree.c (bot_manip): Update the location of builtin_LINE and
3245 2014-01-14 Jason Merrill <jason@redhat.com>
3248 * typeck2.c (massage_init_elt): New.
3249 (process_init_constructor_record)
3250 (process_init_constructor_union): Use it.
3251 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3252 (split_nonconstant_init_1): Handle it.
3253 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3255 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3258 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3259 and replaced an existing if-statement with else-if statement.
3260 Changed an existing error message wording to match the one from the C
3263 2014-01-08 Jason Merrill <jason@redhat.com>
3266 * class.c (abi_tag_data): Add tags field.
3267 (check_abi_tags): Initialize it.
3268 (find_abi_tags_r): Support collecting missing tags.
3269 (mark_type_abi_tags): Don't look at template args.
3270 (inherit_targ_abi_tags): New.
3271 (check_bases_and_members): Use it.
3272 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3273 * mangle.c (write_abi_tags): Check it.
3275 2014-01-07 Jason Merrill <jason@redhat.com>
3278 * pt.c (num_innermost_template_parms): New.
3279 (get_underlying_template): Use it.
3282 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3284 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3286 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3287 the letter of 20.11.6 about Base and Derived naming the same
3288 class type modulo cv-qualifiers.
3290 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3293 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3294 function as unimplemented for generic lambdas with varargs.
3297 * parser.c (cp_parser_template_parameter): Early out with
3298 error_mark_node if parameter declaration was not parsed.
3301 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3302 auto_is_implicit_function_template_parm_p around lambda body.
3305 * parser.c (cp_parser_init_declarator): Undo fully implicit
3306 template parameter list when declarator is not a function.
3308 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3311 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3313 2014-01-03 Tobias Burnus <burnus@net-b.de>
3316 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3318 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3322 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3323 as include_std to perform_koenig_lookup.
3324 (cp_parser_postfix_expression): Adjust.
3325 * pt.c (tsubst_copy_and_build): Likewise.
3326 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3327 (omp_reduction_lookup): Adjust.
3328 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3329 (lookup_arg_dependent): Likewise.
3330 (lookup_function_nonclass): Adjust.
3331 * name-lookup.h: Adjust declaration.
3332 * cp-tree.h: Likewise.
3334 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3337 * parser.c (cp_parser_userdef_numeric_literal): Mention
3338 -fext-numeric-literals in the message.
3340 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3343 * call.c (build_conditional_expr_1): Check the return value of
3346 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3348 * call.c (convert_like_real): Check complain.
3350 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3353 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3356 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3358 Update copyright years
3360 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3362 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3363 the standard form for the copyright notice.
3365 Copyright (C) 2014 Free Software Foundation, Inc.
3367 Copying and distribution of this file, with or without modification,
3368 are permitted in any medium without royalty provided the copyright
3369 notice and this notice are preserved.