1 2014-10-10 Jason Merrill <jason@redhat.com>
3 * method.c (implicitly_declare_fn): Handle deleted lambda default
4 ctor and copy assop here.
5 * class.c (check_bases_and_members): Not here.
6 (add_implicitly_declared_members): And don't set
7 CLASSTYPE_LAZY_MOVE_ASSIGN.
9 * semantics.c (finish_id_expression): Check for error_mark_node.
11 2014-10-09 Jason Merrill <jason@redhat.com>
14 * semantics.c (outer_var_p): Non-static.
15 (process_outer_var_ref): Split out from finish_id_expression.
16 * pt.c (tsubst_copy_and_build): Call them.
17 * cp-tree.h: Declare them.
19 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
21 * semantics.c (check_constexpr_ctor_body_1): New.
22 (check_constexpr_ctor_body): Use it; add bool parameter.
23 (build_data_member_initialization): Handle BIND_EXPR and
24 USING_STMT in the main conditional.
25 (build_constexpr_constructor_member_initializers): Do not
26 handle BIND_EXPR here.
27 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
28 (massage_constexpr_body): Don't do it here.
29 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
30 Adjust check_constexpr_ctor_body call.
31 (cp_parser_compound_statement): Do not pedwarn for compound-statement
32 in constexpr function in C++14 mode.
33 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
35 2014-10-09 Jason Merrill <jason@redhat.com>
38 * parser.c (cp_parser_class_head): push_template_decl for members
42 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
43 (iterative_hash_template_arg): Likewise.
46 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
47 * semantics.c (force_paren_expr): And set it.
48 * typeck.c (check_return_expr): And handle it.
50 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
52 * decl.c (grokdeclarator): constexpr only implies const in C++11.
54 2014-10-08 Jason Merrill <jason@redhat.com>
57 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
60 * tree.c (build_cplus_array_type): Look for a type with no
61 typedef-name or attributes.
63 * call.c (call_copy_ctor): New.
64 (build_over_call): Use it to avoid infinite recursion on invalid code.
66 2014-10-07 Jason Merrill <jason@redhat.com>
68 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
70 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
72 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
74 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
77 * semantics.c (check_constexpr_bind_expr_vars): New.
78 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
79 (build_constexpr_constructor_member_initializers): Handle
80 BIND_EXPR in the main conditional.
82 2014-10-02 Mark Wielaard <mjw@redhat.com>
85 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
86 (cp_function_decl_deleted_p): New prototype.
87 * cp-objcp-common.c (cp_function_deleted_p): New function.
89 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
94 * typeck.c (cp_build_binary_op): save_expr after convert to save
96 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
97 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
99 2014-10-03 Jason Merrill <jason@redhat.com>
101 * decl.c (start_decl): Complain about static/thread_local vars
102 in constexpr function.
103 (check_for_uninitialized_const_var): Also uninitialized vars.
104 * parser.c (cp_parser_jump_statement): And gotos.
105 (cp_parser_asm_operand_list): And asm.
106 (cp_parser_try_block): And try.
107 * semantics.c (ensure_literal_type_for_constexpr_object): And
110 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
111 (var_in_constexpr_fn): New.
112 (cxx_eval_constant_expression): Look into DECL_INITIAL.
113 (potential_constant_expression_1): Allow constexpr-local vars.
116 * tree.c (strip_typedefs): Handle TREE_LIST.
118 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
120 * parser.c (cp_parser_assignment_expression,
121 cp_parser_constant_expression): Add default arguments.
122 (cp_parser_primary_expression,
123 cp_parser_postfix_open_square_expression,
124 cp_parser_parenthesized_expression_list,
125 cp_parser_question_colon_clause,
126 cp_parser_expression, cp_parser_constant_expression,
127 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
128 cp_parser_template_argument, cp_parser_enumerator_definition,
129 cp_parser_member_declaration, cp_parser_constant_initializer,
130 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
131 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
132 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
133 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
134 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
135 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
136 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
138 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
141 * cp-tree.h (struct saved_scope): Add noexcept_operand.
142 (cp_noexcept_operand): Define.
143 * call.c (build_over_call): Use it.
144 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
145 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
147 2014-10-01 Jason Merrill <jason@redhat.com>
150 * method.c (constructible_expr): Handle value-init of non-class.
151 * parser.c (cp_parser_trait_expr): Allow pack expansion.
152 * pt.c (tsubst_copy_and_build): Handle pack expansion.
155 * class.c (type_has_non_user_provided_default_constructor): Rename
156 from type_has_user_provided_default_constructor, reverse sense.
157 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
158 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
159 * call.c (build_new_method_call_1): Adjust.
161 * decl.c (grok_special_member_properties): Don't set
162 TYPE_HAS_COMPLEX_DFLT.
163 * init.c (build_value_init_noctor): Don't use
164 type_has_user_provided_default_constructor.
166 2014-09-30 Jason Merrill <jason@redhat.com>
168 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
169 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
170 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
171 * parser.c (cp_parser_primary_expression): Likewise.
172 (cp_parser_trait_expr): Likewise. Handle variadic trait.
173 * semantics.c (trait_expr_value): Likewise.
174 (finish_trait_expr): Likewise.
175 (check_trait_type): Handle variadic trait. Return bool.
176 * method.c (build_stub_object): Add rvalue reference here.
177 (locate_fn_flags): Not here.
178 (check_nontriv, assignable_expr, constructible_expr): New.
179 (is_trivially_xible): New.
181 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
182 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
183 * parser.c (cp_parser_primary_expression): Likewise.
184 (cp_parser_trait_expr): Likewise.
185 * semantics.c (trait_expr_value): Likewise.
186 (finish_trait_expr): Likewise.
188 * method.c (build_stub_object): Use CONVERT_EXPR.
189 * tree.c (build_dummy_object): Likewise.
190 (is_dummy_object): Adjust.
192 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
193 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
194 * semantics.c (trait_expr_value): Likewise.
195 (finish_trait_expr): Likewise.
196 * parser.c (cp_parser_primary_expression): Likewise.
197 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
199 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
202 * error.c (print_instantiation_context): Delete.
203 * typeck2.c (build_x_arrow): Record location when pushing
204 template instantiation.
205 * pt.c (push_tinst_level): Make it a wrapper around ...
206 (push_tinst_level_loc): ... this. New function. Make excessive
207 template instantiation depth a fatal error. Record location. Use
209 (instantiate_pending_templates): Make excessive
210 template instantiation depth a fatal error.
211 (problematic_instantiation_changed): Use bool as return type.
212 * cp-tree.h (print_instantiation_context): Delete.
213 (push_tinst_level): Update declaration.
214 (problematic_instantiation_changed): Likewise.
215 (push_tinst_level_loc): New.
217 2014-09-29 Richard Biener <rguenther@suse.de>
219 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
222 2014-09-26 Jason Merrill <jason@redhat.com>
224 * mangle.c (find_substitution): Use write_abi_tags.
226 2014-09-25 Marek Polacek <polacek@redhat.com>
229 * class.c (warn_hidden): Check for FUNCTION_DECL.
231 2014-09-25 Jakub Jelinek <jakub@redhat.com>
234 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
235 on low_bound and length.
237 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
239 * class.c, decl.c, optimize.c: Rename all instances of
240 DECL_ABSTRACT to DECL_ABSTRACT_P.
242 2014-09-24 Marek Polacek <polacek@redhat.com>
246 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
247 * tree.c (bot_manip): Add default case.
248 * parser.c (cp_parser_primary_expression): Cast the controlling
249 expression of a switch to an int.
250 (cp_parser_unqualified_id): Likewise.
252 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
255 * parser.c (cp_parser_skip_to_closing_square_bracket,
256 cp_parser_array_designator_p): New.
257 (cp_parser_initializer_list): Use the latter.
259 2014-09-22 Jason Merrill <jason@redhat.com>
261 * semantics.c (finish_non_static_data_member): In diagnostic, give
262 error at point of use and note at point of declaration.
267 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
270 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
273 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
275 2014-09-22 Jason Merrill <jason@redhat.com>
277 * decl.c (poplevel): Don't warn about unused vars in template scope.
278 * error.c (dump_decl): Handle variable templates.
280 2014-09-20 Jason Merrill <jason@redhat.com>
283 * decl.c (begin_destructor_body): Only clobber the as-base part of
286 2014-09-19 Jason Merrill <jason@redhat.com>
289 * mangle.c (write_expression): Use unresolved-name mangling for
293 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
294 after pulling out an element from a CONSTRUCTOR.
296 2014-09-18 Jakub Jelinek <jakub@redhat.com>
299 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
300 on type of type dependent expressions, and don't call it if
301 handle_omp_array_sections has kept TREE_LIST because something
303 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
304 Use keep_next_level, begin_omp_structured_block and
305 finish_omp_structured_block instead of push_stmt_list and
308 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
311 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
312 for final class types.
314 2014-09-15 Jason Merrill <jason@redhat.com>
316 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
317 necessary. Call inherit_targ_abi_tags here.
318 * class.c (check_bases_and_members): Not here.
319 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
320 * cp-tree.h: Declare inherit_targ_abi_tags.
322 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
324 Do not diagnose lambda default arguments in c++14 modes.
325 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
328 2014-09-15 Jakub Jelinek <jakub@redhat.com>
330 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
333 2014-09-13 Marek Polacek <polacek@redhat.com>
336 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
337 location of a call expression.
339 2014-09-11 Jason Merrill <jason@redhat.com>
342 * decl.c (start_decl): Handle specialization of member variable
344 * pt.c (check_explicit_specialization): Adjust error.
346 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
349 * typeck2.c (process_init_constructor_record): Do not warn about
350 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
352 2014-09-11 Jason Merrill <jason@redhat.com>
355 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
356 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
358 2014-09-10 Jason Merrill <jason@redhat.com>
361 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
362 (duplicate_decls, start_decl): Likewise.
363 * pt.c (check_explicit_specialization): Likewise.
364 (push_template_decl_real): Or static templates.
366 2014-09-08 Jason Merrill <jason@redhat.com>
368 * typeck.c (build_class_member_access_expr): Move
369 -Winvalid-offsetof code...
370 * semantics.c (finish_offsetof): ...here.
371 * parser.c (cp_parser_builtin_offsetof): Remember the location of
373 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
376 * pt.c (instantiate_decl): Handle recursive instantiation of
379 2014-09-05 Jason Merrill <jason@redhat.com>
382 * semantics.c (potential_constant_expression_1): Handle un-folded
383 pointer to member constants.
385 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
388 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
389 newdecl, not olddecl.
391 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
394 * class.c (check_field_decls): A class of literal type cannot have
395 volatile non-static data members and base classes.
396 (explain_non_literal_class): Update.
398 2014-09-02 Jakub Jelinek <jakub@redhat.com>
399 Balaji V. Iyer <balaji.v.iyer@intel.com>
400 Igor Zamyatin <igor.zamyatin@intel.com>
402 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
404 * parser.c (cp_parser_cilk_for): New function.
405 (cp_parser_cilk_grainsize): Likewise.
406 (cp_parser_statement): Added RID_CILK_FOR case.
407 (cp_parser_omp_for_cond): Added CILK_FOR check.
408 (cp_parser_omp_for_loop_init): Change function argument to accept
409 tree_code instead just a bool flag; change the check to use that
410 tree_code; check for initialization declaration in case of Cilk_for.
411 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
412 changed call to cp_parser_omp_for_loop_init according new arguments'
414 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
415 * pt.c (tsubst_expr): Added CILK_FOR case.
416 * semantics.c: Include convert.h.
417 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
418 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
419 (handle_omp_for_class_iterator): New argument lastp and its usage;
421 (finish_omp_for): Changed call to handle_omp_for_class_iterator
422 according new arguments' list; in case of Cilk_for save very first
423 decl and create empty stmt_list block; use block to build correct
426 2014-08-31 Jason Merrill <jason@redhat.com>
429 * optimize.c (cdtor_comdat_group): Just look at the
430 DECL_ASSEMBLER_NAME of the 'tors.
432 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
435 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
436 result of cxx_eval_constant_expression.
438 2014-08-26 Jason Merrill <jason@redhat.com>
441 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
442 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
443 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
446 2014-08-25 Jason Merrill <jason@redhat.com>
448 * pt.c (check_explicit_specialization): Don't complain about
449 non-template variable.
450 (template_for_substitution): Allow variable templates.
451 (check_template_variable): Fix logic for member var template.
452 * decl.c (start_decl): Don't complain about extra template header
455 * decl.c (start_decl): Look through member variable template.
456 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
457 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
460 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
463 * cp-tree.h (TFF_POINTER): Add.
464 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
466 * error.c (dump_type_suffix): Actually print the const and noreturn
467 attribute when appropriate.
469 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
471 * decl.c (compute_array_index_type, grokdeclarator,
472 undeduced_auto_decl): Change from cxx1y to cxx14.
473 *lambda.c(add_capture()): Change error message from C++1y to C++14.
474 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
475 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
476 cp_parser_decltype, cp_parser_conversion_type_id,
477 cp_parser_simple_type_specifier, cp_parser_type_id_1,
478 cp_parser_template_type_arg, cp_parser_std_attribute,
479 cp_parser_template_declaration_after_export): Ditto.
480 * pt.c (tsubst): Ditto.
481 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
482 * tree.c: Change comment.
483 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
484 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
486 2014-08-23 Jason Merrill <jason@redhat.com>
488 Allow non-constexpr variable templates.
489 * decl2.c (note_variable_template_instantiation): New.
490 * cp-tree.h: Declare it.
491 * pt.c (instantiate_decl): Call it.
492 (push_template_decl_real): Allow non-constexpr variable templates.
493 * semantics.c (finish_id_expression): Mark the variable template
494 instantiation as used.
495 * mangle.c (write_mangled_name): Variable template instantiations
497 * parser.c (cp_parser_init_declarator): Complain about
498 non-function implicit templates.
500 2014-08-22 Marek Polacek <polacek@redhat.com>
503 * parser.c (cp_parser_binary_expression): Check each LHS if it's
504 preceded with logical not. Adjust call to
505 warn_logical_not_parentheses.
507 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
510 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
511 declaration shadows a function declaration, unless the former
512 declares a function, pointer to function or pointer to member
513 function, because this is a common and valid case in real-world
515 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
518 2014-08-22 Jason Merrill <jason@redhat.com>
521 * class.c (outermost_open_class): Fix logic.
522 * decl.c (complete_vars): Fix logic.
524 2014-08-22 Jason Merrill <jason@redhat.com>
527 * class.c (outermost_open_class): New.
528 * cp-tree.h: Declare it.
529 * decl.c (maybe_register_incomplete_var): Use it.
530 (complete_vars): Handle any constant variable.
531 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
533 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
536 * cp-array-notation.c (build_array_notation_ref): Added correct
537 handling of case with incorrect array.
539 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
542 * error.c (cp_diagnostic_finalizer): Delete.
543 (init_error): Do not set diagnostic_finalizer here.
545 2014-08-19 Marek Polacek <polacek@redhat.com>
548 * call.c (build_new_op_1): Remember the type of arguments for
549 a comparison. If either operand of a comparison is a boolean
550 expression, call maybe_warn_bool_compare.
552 2014-08-19 Jason Merrill <jason@redhat.com>
554 PR tree-optimization/62091
555 * decl2.c (decl_needed_p): Return true for virtual functions when
560 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
563 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
565 * class.c (contains_empty_class_p): Remove.
567 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
569 * parser.c (cp_parser_expression): Add default arguments.
570 (cp_parser_primary_expression, cp_parser_postfix_expression,
571 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
572 cp_parser_unary_expression, cp_parser_direct_new_declarator,
573 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
574 cp_parser_lambda_body, cp_parser_expression_statement,
575 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
576 cp_parser_iteration_statement, cp_parser_jump_statement,
577 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
578 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
579 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
580 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
581 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
582 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
583 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
584 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
585 cp_parser_transaction_expression): Adjust.
587 2014-08-15 Jason Merrill <jason@redhat.com>
590 * pt.c (lookup_template_class_1): Revert recent change.
591 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
594 * pt.c (instantiate_class_template_1): Ignore lambda on
596 (push_template_decl_real): A lambda is not primary.
597 (lookup_template_class_1): Don't look for a lambda partial
599 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
600 currently in a function and the lambda living in a function.
601 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
603 2014-08-15 Richard Biener <rguenther@suse.de>
604 Jason Merrill <jason@redhat.com>
607 * tree.c (build_min_array_type, set_array_type_canon): Split out...
608 (build_cplus_array_type): ...from here. Only call build_array_type
611 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
615 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
619 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
620 cv-qualifiers of function types.
622 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
624 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
626 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
628 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
629 cp_build_array_ref, cp_build_function_call_vec): When a
630 pedwarn is suppressed under SFINAE, return error_mark_node.
632 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
633 tf_warning_or_error, where complain is a bool, glitch.
635 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
638 * decl.c (grokdeclarator): Move the check for friend initializers..
639 * decl2.c (grokfield) ..here. Postpone early return for friends
640 until after the initializer check.
642 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
645 * pt.c (coerce_template_parms): Improve error message vs default
648 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
650 * parser.c (cp_parser_init_declarator): Remove redundant check of
651 decl_specifiers->type.
653 2014-08-13 Jason Merrill <jason@redhat.com>
655 * call.c (build_x_va_arg): Support passing non-POD through ....
656 (convert_arg_to_ellipsis): Likewise.
658 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
660 * pt.c (lookup_template_variable): Make dependent variable templates
663 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
665 * parser.c (cp_parser_elaborated_type_specifier): Handle
666 specially cp_parser_template_id returning a BASELINK.
668 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
670 * parser.c (cp_parser_diagnose_invalid_type_name,
671 cp_parser_make_typename_type): Remove scope parameter.
672 (cp_parser_parse_and_diagnose_invalid_type_name,
673 cp_parser_elaborated_type_specifier): Adjust calls.
675 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
677 Reject virt-specifiers on friends and member templates
678 * friend.c (do_friend): Diagnose virt-specifiers.
679 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
681 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
683 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
684 return type to bool; in C++11 for constants give errors, not pedwarns.
685 * cp-tree.h (check_narrowing): Adjust declaration.
686 * call.c (convert_like_real): Update calls.
687 * semantics.c (finish_compound_literal): Likewise.
689 2014-08-08 Jason Merrill <jason@redhat.com>
691 * pt.c (lookup_template_class_1): Copy abi_tag.
693 2014-08-08 Kai Tietz <ktietz@redhat.com>
695 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
696 that we operate on a true inline.
698 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
700 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
701 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
703 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
706 * decl.c (build_enumerator): Handle class types with conversion
707 operators via perform_implicit_conversion_flags and
708 build_expr_type_conversion.
710 * cvt.c (build_expr_type_conversion): Replace pair of errors
713 2014-08-07 Jason Merrill <jason@redhat.com>
716 * parser.c (c_parse_file): Change sorry to fatal_error.
719 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
721 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
723 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
725 2014-08-06 Jason Merrill <jason@redhat.com>
727 * init.c (build_vec_init): Fix constant initialization of
729 (build_value_init_noctor): Call maybe_constant_init.
730 * semantics.c (maybe_constant_init): See through EXPR_STMT and
734 * init.c (build_vec_init): Reorganize earlier change a bit.
737 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
738 if we're just returning an INIT_EXPR.
740 2014-08-06 Jason Merrill <jason@redhat.com>
741 Braden Obrzut <admin@maniacsvault.net>
743 * pt.c (check_explicit_specialization): Don't test
744 DECL_DECLARED_INLINE_P for a variable template.
746 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
749 * typeck.c (cp_build_binary_op): Extend to more cases the
752 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
754 Implement constexpr variable templates
755 * decl.c (grokvardecl): Handle specializations of variable templates.
756 (grokdeclarator): Handle variable template id expressions and NULL_TREE
757 return from grokvardecl.
758 * decl2.c (check_member_template): Allow declaration of template member
760 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
762 * pt.c (check_template_variable): Accept variable temploids at
764 (push_template_decl_real): The current instantiation of a template
766 (determine_specialization): Accept variable templates.
767 (check_explicit_specialization): Handle and check for malformed
768 variable template specializations.
769 (lookup_template_variable): New.
770 (tsubst_decl): Handle variable template specializations.
771 (do_decl_instantiation): Handle template variables.
772 (instantiate_decl): Handle template variables.
773 * semantics.c (finish_template_variable): New.
774 (finish_id_expression): Instantiate variable templates.
775 * cp-tree.h (variable_template_p): New.
777 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
780 * decl.c (check_redeclaration_no_default_args): New.
781 (duplicate_decls): Use it, handle default arguments
782 in redeclarations of function templates.
784 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
786 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
788 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
790 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
791 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
792 instead of pointer_set.
794 2014-08-01 Jason Merrill <jason@redhat.com>
797 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
798 init-list for trailing elements.
799 * typeck2.c (process_init_constructor_array): Likewise.
801 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
804 * decl.c (duplicate_decls): Handle static member functions too.
806 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
808 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
811 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
814 * parser.c (cp_parser_array_notation): Added check for array_type.
816 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
819 * cp-array-notation.c (expand_array_notation_exprs): Handling of
820 DECL_EXPR improved. Changed handling for INIT_EXPR.
822 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
824 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
826 2014-08-01 Jakub Jelinek <jakub@redhat.com>
828 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
829 -fsanitize=alignment call ubsan_maybe_instrument_reference
830 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
831 for calls to member functions.
833 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
836 * typeck.c (maybe_warn_about_returning_address_of_local): Return
837 whether it is returning the address of a local variable.
838 (check_return_expr): Return 0 instead of the address of a local
841 2014-07-30 Jason Merrill <jason@redhat.com>
845 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
847 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
850 * pt.c (unify_arity): Add boolean parameter.
851 (unify_too_few_arguments): Likewise.
852 (type_unification_real): Diagnose correctly insufficient
853 arguments in the presence of trailing variadic parameters;
854 deducing multiple trailing packs as empty is fine.
856 2014-07-30 Jason Merrill <jason@redhat.com>
861 * decl2.c (mark_all_virtuals): New variable.
862 (maybe_emit_vtables): Check it instead of flag_devirtualize.
863 (cp_write_global_declarations): Set it and give helpful diagnostic
864 if it introduces errors.
865 * class.c (finish_struct_1): Check it.
869 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
870 (check_explicit_specialization): Clear it on specializations.
871 * decl.c (duplicate_decls, start_decl): Likewise.
872 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
873 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
874 linkage after setting the appropriate flags.
875 * tree.c (decl_linkage): Don't check DECL_COMDAT.
876 * decl2.c (mark_needed): Mark clones.
877 (import_export_decl): Not here.
879 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
881 Implement N4051 - Allow typename in a template template parameter
882 * parser.c (cp_parser_type_parameter_key): New funtion;
883 (cp_parser_token_is_type_parameter_key): Ditto;
884 (cp_parser_type_parameter): Look for type-parameter-key for all versions
885 but pedwarn for less than cxx1z.
887 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
890 * call.c (standard_conversion): Use resolve_nondeduced_context
891 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
893 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
896 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
899 2014-07-15 Jason Merrill <jason@redhat.com>
902 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
906 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
907 * class.c (finish_struct): Reject invalid definition of
908 std::initializer_list.
910 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
912 * call.c (convert_like_real): Call print_z_candidate and inform only
913 if permerror returns true.
915 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
917 * class.c (build_clone): Do not clear assembler names of
919 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
920 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
921 as a special case return sizeof (struct tree_decl_non_common)
923 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
924 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
925 * cp/cp-tree.h (tree_template_decl): New structure.
926 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
927 (union cp_lang_tree_node): Add template_decl.
928 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
930 2014-07-14 Jason Merrill <jason@redhat.com>
934 * pt.c (instantiate_decl): Don't check defer_ok for local class
937 2014-07-14 Jakub Jelinek <jakub@redhat.com>
940 * cp-tree.h (LITERAL_ZERO_P): Define.
941 * parser.c (cp_parser_parenthesized_expression_list): Add
942 want_literal_zero_p argument, if true, for literal zeros
943 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
944 (cp_parser_postfix_expression): Adjust
945 cp_parser_parenthesized_expression_list caller, handle
946 -Wmemset-transposed-args.
947 (literal_zeros): New variable.
949 2014-07-13 Jason Merrill <jason@redhat.com>
952 * semantics.c (is_instantiation_of_constexpr): Return true for
953 defaulted functions, too.
954 (explain_invalid_constexpr_fn): Only use
955 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
956 * method.c (explain_implicit_non_constexpr): Pass
957 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
960 * decl.c (check_initializer): Don't finish_compound_literal
961 on erroneous constexpr init.
964 * tree.c (bot_replace): Only replace a dummy 'this' parm.
967 * decl.c (create_array_type_for_decl): Only check for auto once.
970 * call.c (build_list_conv): Don't try to build a list of references.
972 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
974 PR C++/60209 - Declaration of user-defined literal operator cause error
975 * parser.c (cp_parser_operator): Fold treatment of strings
976 and user-defined string literals. Use the full string parser.
977 (cp_parser_string_literal): Add flag to not look for literal operator.
979 2014-07-11 Jason Merrill <jason@redhat.com>
983 * call.c (build_conditional_expr_1): Avoid reading freed memory.
985 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
988 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
990 * decl.c (check_initializer): Don't call check_narrowing here,
991 set LOOKUP_NO_NARROWING.
992 * typeck2.c (digest_init_r): Likewise.
994 2014-07-10 Jason Merrill <jason@redhat.com>
997 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1001 * decl2.c (mark_all_virtuals): New variable.
1002 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1003 (cp_write_global_declarations): Set it and give helpful diagnostic
1004 if it introduces errors.
1005 * class.c (finish_struct_1): Check it.
1006 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1008 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1011 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1012 outside class declaration, in friend declaration, and neither on
1013 constructor nor conversion operator.
1015 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1019 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1020 cv-qualifiers of function types.
1022 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1023 Paolo Carlini <paolo.carlini@oracle.com>
1026 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1029 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1031 * class.c (check_for_override): Wrap the 'final' and 'override'
1032 keywords in %< and %>.
1034 2014-07-06 Marek Polacek <polacek@redhat.com>
1037 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1038 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1039 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1042 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1044 * pt.c (convert_template_argument): Use inform instead of error in
1047 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1052 * parser.c (cp_parser_userdef_string_literal): Take a tree
1054 (cp_parser_string_literal): Don't hack the token stream.
1056 2014-06-30 Jason Merrill <jason@redhat.com>
1060 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1062 * init.c (build_vtbl_address): Don't mark destructor.
1063 * class.c (finish_struct_1): Add all classes to keyed_classes
1067 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1070 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1072 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1073 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1074 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1075 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1076 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1077 * pt.c (unify): Also check whether the argument is a PMF.
1079 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1082 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1083 a '[' can also start a primary-expression.
1084 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1085 when cp_parser_tokens_start_cast_expression returns -1.
1087 2014-06-30 Jason Merrill <jason@redhat.com>
1090 * pt.c (unify_one_argument): Type/expression mismatch just causes
1093 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1096 2014-06-30 Marek Polacek <polacek@redhat.com>
1098 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1099 function has no_sanitize_undefined attribute.
1100 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1101 function has no_sanitize_undefined attribute.
1103 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1106 * cp-array-notation.c (expand_sec_reduce_builtin):
1107 Check that bultin argument is correct.
1108 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1110 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1114 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1115 types aren't the same.
1117 2014-06-27 Jason Merrill <jason@redhat.com>
1120 * error.c (dump_template_bindings): Don't tsubst in a clone.
1122 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1125 * semantics.c (finish_compound_literal): Revert r204228.
1127 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1129 * parser.c (cp_parser_compound_literal_p): New.
1130 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1132 2014-06-26 Jason Merrill <jason@redhat.com>
1134 * parser.c (cp_parser_for_init_statement): Change range-for error
1137 N3994 Ranged-based for-loops: The Next Generation
1138 * parser.c (cp_lexer_nth_token_is): New.
1139 (cp_parser_for_init_statement): Allow "for (id : init)".
1141 2014-06-26 Teresa Johnson <tejohnson@google.com>
1143 * class.c (dump_class_hierarchy): Use saved dump files.
1144 (dump_vtable): Ditto.
1147 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1150 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1151 parameter lists outside of function parameter scope.
1153 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1157 * typeck2.c (process_init_constructor_record): Do not complain about
1158 uninitialized const members, because within aggregate-initialization,
1159 members without explicit initializers are value-initialized.
1161 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1163 * semantics.c (finish_omp_clauses): Make sure
1164 OMP_CLAUSE_LINEAR_STEP has correct type.
1166 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1168 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1169 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1170 FUNCTION_DECL check.
1171 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1172 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1173 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1174 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1176 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1179 * decl.c (grokdeclarator): Do not early check for operator-function-id
1182 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1184 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1187 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1189 * parser.c (cp_parser_omp_for_loop): For
1190 #pragma omp parallel for simd move lastprivate clause from parallel
1191 to for rather than simd.
1193 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1197 * decl.c (grokparms): Accept a single parameter of type 'void'.
1199 2014-06-20 Jason Merrill <jason@redhat.com>
1202 * call.c (add_function_candidate): Avoid special 'this' handling
1203 if we have a ref-qualifier.
1206 * call.c (build_over_call): Call build_this in template path.
1208 2014-06-19 Jason Merrill <jason@redhat.com>
1211 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1213 2014-06-18 Jason Merrill <jason@redhat.com>
1216 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1217 ref-qualifier handling.
1220 * pt.c (resolve_overloaded_unification): Preserve
1221 ARGUMENT_PACK_EXPLICIT_ARGS.
1223 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1225 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1227 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1229 2014-06-17 Jason Merrill <jason@redhat.com>
1232 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1234 2014-06-15 Jason Merrill <jason@redhat.com>
1237 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1240 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1242 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1244 * decl.c (grokvardecl): Fix pasto in previous patch.
1246 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1248 * decl.c (duplicate_decls): Use set_decl_tls_model.
1249 (grokdeclarator): Likewise.
1250 * semantics.c (finish_id_expression): Check TLS only for
1252 (finish_omp_threadprivate): Use decl_default_tls_model.
1253 * decl2.c (get_guard): Likewise.
1254 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1256 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1259 * decl.c (grokparms): Improve error message about void parameters.
1260 * error.c (type_to_string): Fix aka cut off code.
1262 2014-06-12 Jason Merrill <jason@redhat.com>
1264 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1265 * cvt.c (type_promotes_to): Likewise.
1266 * mangle.c (write_type, write_expression): Likewise.
1267 (write_name, write_template_arg): Likewise.
1268 (mangle_decl): Make alias based on flag_abi_compat_version.
1269 Emit -Wabi warning here.
1270 (finish_mangling_internal): Not here. Drop warn parm.
1271 (finish_mangling_get_identifier, finish_mangling): Adjust.
1272 (mangle_type_string, mangle_special_for_type): Adjust.
1273 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1274 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1275 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1277 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1278 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1279 (layout_nonempty_base_or_field, end_of_class): Likewise.
1280 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1281 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1282 (layout_virtual_bases): Likewise.
1283 * decl.c (compute_array_index_type): Likewise.
1284 * mangle.c (write_mangled_name, write_prefix): Likewise.
1285 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1286 (write_template_arg, write_array_type): Likewise.
1287 * method.c (lazily_declare_fn): Likewise.
1288 * rtti.c (get_pseudo_ti_index): Likewise.
1289 * typeck.c (comp_array_types): Likewise.
1291 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1293 * vtable-class-hierarchy.c: Update handling for section names
1294 that are no longer trees.
1295 * decl.c (duplicate_decls): Likewise.
1297 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1300 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1301 to cp_parser_declarator.
1303 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1306 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1307 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1310 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1313 * parser.c (cp_parser_declarator): Add bool parameter.
1314 (cp_parser_direct_declarator): Likewise, use it.
1315 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1316 (cp_parser_condition, cp_parser_explicit_instantiation,
1317 cp_parser_init_declarator, cp_parser_type_id_1,
1318 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1319 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1320 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1322 * decl.c (grokdeclarator): Fix handling of friend declared in
1323 namespace scope (g++.dg/parse/friend10.C).
1325 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1327 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1329 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1330 (maybe_clone_body): Move symbol across comdat groups.
1331 * method.c (use_thunk): Copy implicit section flag.
1333 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1336 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1338 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1340 * method.c (use_thunk): Use set_decl_section_name.
1341 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1342 * decl.c (duplicate_decls): Likewise.
1343 * vtable-class-hierarchy.c: Likewise.
1345 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1348 * class.c (check_field_decls): In C++11 mode do not reject
1349 static data members and reference-type members in unions.
1351 2014-06-05 Jason Merrill <jason@redhat.com>
1354 * decl.c (check_initializer): Collapse a TREE_LIST here.
1355 * typeck2.c (store_init_value): Not here.
1357 2014-06-05 Richard Biener <rguenther@suse.de>
1358 Paolo Carlini <paolo.carlini@oracle.com>
1361 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1362 handling of empty classes.
1364 2014-06-04 Jason Merrill <jason@redhat.com>
1366 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1367 for noexcept and thread_local, too.
1370 * decl.c (check_initializer): Maybe clear
1371 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1373 2014-06-05 Richard Biener <rguenther@suse.de>
1376 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1377 warnings for accessing empty classes.
1379 2014-06-05 Marek Polacek <polacek@redhat.com>
1382 * parser.c (cp_parser_binary_expression): Warn when logical not is
1383 used on the left hand side operand of a comparison.
1385 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1388 * typeck.c (cp_build_modify_expr): Handle array of characters
1389 initialized by a string literal.
1390 * decl.c (check_initializer): Handle parenthesized string literal
1392 * typeck2.c (store_init_value): Remove redundant check.
1394 2014-06-04 Jason Merrill <jason@redhat.com>
1398 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1399 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1401 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1404 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1407 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1411 * call.c (standard_conversion): Convert nullptr to bool only
1412 in case of direct-initialization.
1413 (convert_like_real): Provide informative error message.
1415 2014-06-03 Marek Polacek <polacek@redhat.com>
1418 * semantics.c (finish_switch_cond): Warn if switch condition has
1421 2014-06-03 Jason Merrill <jason@redhat.com>
1424 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1425 variable to local_specializations.
1428 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1430 2014-06-02 Jason Merrill <jason@redhat.com>
1433 * decl.c (reshape_init_class): Handle un-folded
1434 constant-expressions.
1437 * pt.c (pack_deducible_p): Handle canonicalization.
1439 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1441 * pt.c (tsubst_function_type): Initialize arg_types.
1443 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1446 * class.c (handle_using_decl): Pass the correct scope to
1447 cp_emit_debug_info_for_using.
1449 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1453 * search.c (accessible_p): Use current_nonlambda_class_type.
1454 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1456 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1458 * decl.c: Include builtins.h.
1459 * semantics.c: Likewise.
1461 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1465 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1466 * pt.c (tsubst_function_type): Inject the this parameter; do the
1467 substitutions in the order mandated by the DR.
1468 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1469 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1470 (static_fn_type): Copy it.
1471 * decl2.c (build_memfn_type, change_return_type,
1472 cp_reconstruct_complex_type): Likewise.
1473 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1474 * tree.c (strip_typedefs): Likewise.
1475 * typeck.c (merge_types): Likewise.
1477 2014-05-30 Jason Merrill <jason@redhat.com>
1480 * pt.c (instantiate_decl): Check that defer_ok is not set for
1481 local class members.
1484 * pt.c (tsubst_init): Split out from...
1485 (tsubst_expr) [DECL_EXPR]: Here.
1486 (tsubst_copy) [VAR_DECL]: Use it.
1487 * semantics.c (finish_id_expression): Return the decl for static/const.
1489 2014-05-28 Jason Merrill <jason@redhat.com>
1492 * decl.c (cxx_comdat_group): Return a decl.
1493 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1495 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1499 * call.c (build_aggr_conv): Ignore passed in flags.
1500 (build_array_conv, build_complex_conv): Likewise.
1502 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1504 * optimize.c (maybe_thunk_body): Use set_comdat_group.
1505 (maybe_clone_body): Likewise.
1506 * decl.c (duplicate_decls): Update code duplicating comdat group;
1507 do not copy symtab pointer; before freeing newdecl remove it
1509 * decl2.c (constrain_visibility): Use set_comdat_group.
1511 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1513 * rtti.c: Include tm_p.h
1514 (emit_tinfo_decl): Force RTTI data to be aligned to required
1517 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1519 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1520 ignoring other target adjustments.
1522 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1524 * semantics.c (finish_omp_clauses): Remove duplicated variable
1527 * parser.c (cp_parser_omp_target): Return bool values.
1529 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1532 * lambda.c (add_capture): Enforce that capture by value requires
1534 * typeck2.c (cxx_incomplete_type_inform): Early return if
1535 TYPE_MAIN_DECL is null.
1537 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
1540 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1542 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1545 * lambda.c (build_capture_proxy, add_capture): Treat normal
1546 captures and init-captures identically.
1548 2014-05-21 Mark Wielaard <mjw@redhat.com>
1551 * cp-lang.c (cxx_enum_underlying_base_type): New function.
1552 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1554 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1556 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1557 * cp-array-notation.c (replace_invariant_exprs): Likewise.
1558 (expand_array_notation): Handle VOID_CST.
1559 * error.c (dump_expr): Likewise.
1560 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1561 (cxx_pretty_printer::expression): Likewise.
1562 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1563 * decl.c (register_dtor_fn): Likewise.
1564 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1565 (build_delete, push_base_cleanups): Likewise.
1566 * mangle.c (write_expression): Likewise.
1567 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1568 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1569 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1570 * tree.c (cp_tree_equal): Likewise.
1571 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1572 instead of void_zero_node.
1573 * typeck.c (check_return_expr): Likewise.
1574 * typeck2.c (build_functional_cast): Likewise.
1576 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
1579 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1581 (cp_parser_statement): ...here. Make sure only semicolon can go after
1584 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1589 * typeck2.c (digest_nsdmi_init): New.
1590 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1591 * init.c (get_nsdmi): Likewise.
1592 * cp-tree.h (digest_nsdmi_init): Declare.
1594 2014-05-20 Jason Merrill <jason@redhat.com>
1596 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1597 up a virtual function in a dummy object.
1599 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1602 * decl.c (duplicate_decls): Replace pair of warning_at with
1603 warning_at + inform.
1604 (maybe_commonize_var): Likewise.
1606 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1609 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1610 (tsubst_copy_and_build): Perform recursive substitutions in a
1611 deterministic order.
1613 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1616 * typeck2.c (cxx_incomplete_type_inform): New.
1617 (cxx_incomplete_type_diagnostic): Use it.
1618 * decl.c (grokdeclarator): Check the element type of an
1619 incomplete array type; call the above.
1620 * cp-tree.h (cxx_incomplete_type_inform): Declare.
1622 2014-05-19 Jason Merrill <jason@redhat.com>
1625 * pt.c (tsubst_copy): Don't check at_function_scope_p.
1626 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1628 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
1630 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1631 * parser.c (cp_parser_enum_specifier): Likewise.
1633 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1635 * class.c (sorted_fields_type_new): Adjust.
1636 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1637 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1638 * cp-tree.h: Remove usage of variable_size gty attribute.
1639 * decl.c (make_label_decl): Adjust.
1640 (check_goto): Likewise.
1641 (start_preparsed_function): Likewise.
1642 (save_function_data): Likewise.
1643 * lex.c (init_reswords): Likewise.
1644 (retrofit_lang_decl): Likewise.
1645 (cxx_dup_lang_specific_decl): Likewise.
1646 (copy_lang_type): Likewise.
1647 (cxx_make_type): Likewise.
1648 * name-lookup.c (binding_entry_make): Likewise.
1649 (binding_table_construct): Likewise.
1650 (binding_table_new): Likewise.
1651 (cxx_binding_make): Likewise.
1652 (pushdecl_maybe_friend_1): Likewise.
1653 (begin_scope): Likewise.
1654 (push_to_top_level): Likewise.
1655 * parser.c (cp_lexer_alloc): Likewise.
1656 (cp_lexer_new_from_tokens): Likewise.
1657 (cp_token_cache_new): Likewise.
1658 (cp_parser_context_new): Likewise.
1659 (cp_parser_new): Likewise.
1660 (cp_parser_nested_name_specifier_opt): Likewise.
1661 (cp_parser_template_id): Likewise.
1662 * pt.c (maybe_process_partial_specialization): Likewise.
1663 (register_specialization): Likewise.
1664 (add_pending_template): Likewise.
1665 (lookup_template_class_1): Likewise.
1666 (push_tinst_level): Likewise.
1667 * semantics.c (register_constexpr_fundef): Likewise.
1668 (cxx_eval_call_expression): Likewise.
1669 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1671 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
1674 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1675 when cp_parser_lookup_name sets ambiguous_decls.
1677 2014-05-15 Jason Merrill <jason@redhat.com>
1679 * call.c (print_conversion_rejection): Use loc consistently.
1681 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1683 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1684 * call.c (convert_like_real, build_new_method_call_1): Use it.
1685 * decl2.c (grokfield): Likewise.
1686 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1687 build_new_1): Likewise.
1688 * mangle.c (write_expression): Likewise.
1689 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1691 2014-05-14 Jason Merrill <jason@redhat.com>
1695 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1696 dropped cv-quals as a bad conversion.
1697 (convert_like_real) [ck_ref_bind]: Explain them.
1698 (compare_ics): Check badness before stripping reference
1699 bindings. Handle comparing bad reference bindings.
1700 * typeck.c (comp_cv_qualification): Add overload that just takes
1702 * cp-tree.h: Declare it.
1704 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1705 (arg_conversion_rejection, bad_arg_conversion_rejection)
1706 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1707 (add_function_candidate): Pass actual argument, rather than type, to
1708 bad_arg_conversion_rejection.
1709 (print_conversion_rejection): Explain what's wrong with the conversion.
1710 (print_z_candidates): Say "candidate:" before each candidate.
1711 (splice_viable): Be strict if we see a viable or template candidate.
1712 (build_user_type_conversion_1): Pass false to strict parameter.
1713 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1714 (build_new_op_1, build_new_method_call_1): Likewise.
1715 (build_op_call_1): Pass true to strict parameter.
1717 2014-05-13 Jason Merrill <jason@redhat.com>
1719 * call.c (print_error_for_call_failure): Say "no match" rather
1720 than "ambiguous" if there were no strict matches.
1721 (build_new_method_call_1): Likewise.
1724 * semantics.c (is_this_parameter): Allow capture proxies too.
1726 2014-05-12 Jason Merrill <jason@redhat.com>
1728 * call.c (maybe_print_user_conv_context): New.
1729 (convert_like_real): Use it. Print call context for bad
1730 user-defined conversion.
1731 (build_over_call): Print call context for bad 'this' conversion.
1733 * call.c (convert_like_real): Use inform for identifying the
1736 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1738 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1739 complain & tf_error is false.
1741 * decl.c (make_unbound_class_template): Prefer inform for
1742 "declared here"-type message.
1744 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1748 * lambda.c (lambda_expr_this_capture): Add new parameter
1749 add_capture_p controlling whether the functions will try to
1750 capture 'this' via the default capture.
1751 (maybe_resolve_dummy): Likewise.
1752 * cp-tree.h: Adjust prototypes.
1753 * call.c, semantics.c: Change callers of these functions.
1754 * call.c (build_new_method_call_1): Use the actual 'this' that
1755 would be potentially captured for the overload resolution, instead
1756 of the dummy object.
1758 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1760 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1762 (convert_nontype_argument): Adjust calls.
1763 (coerce_template_parameter_pack): Add missing complain & tf_error
1766 2014-05-09 Jason Merrill <jason@redhat.com>
1770 * call.c (build_conditional_expr_1, conditional_conversion): Handle
1771 non-class lvalues and xvalues that differ only in cv-qualifiers.
1775 * call.c (build_user_type_conversion_1): The copy-init temporary
1779 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1782 * call.c (build_conditional_expr_1): If overload resolution finds
1783 no match, just say "different types".
1786 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1789 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1790 if we didn't find a conversion.
1791 Don't accept a bad conversion too early.
1793 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1796 * typeck.c (convert_for_assignment): Provide an inform for pointers
1797 to incomplete class types.
1799 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1802 * pt.c (convert_nontype_argument): Protect all the error calls
1803 with complain & tf_error.
1805 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1808 * pt.c (instantiate_decl): Avoid generating the body of a
1811 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1814 * pt.c (maybe_begin_member_template_processing): Use
1815 uses_template_parms.
1817 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1818 Mike Stump <mikestump@comcast.net>
1819 Richard Sandiford <rdsandiford@googlemail.com>
1821 * call.c: Include wide-int.h.
1822 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1823 (convert_for_arg_passing): Likewise.
1824 * class.c: Include wide-int.h.
1825 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
1826 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1827 (include_empty_classes): Likewise
1828 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
1829 * cvt.c: Include wide-int.h.
1830 (ignore_overflows): Use wide_int_to_tree.
1831 * decl.c: Include wide-int.h.
1832 (check_array_designated_initializer): Use wide-int interfaces.
1833 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
1834 (finish_enum_value_list): Use signop.
1835 (build_enumerator): Use wide-int interfaces.
1836 * init.c: Include wide-int.h.
1837 (build_new_1): Use wide-int interfaces.
1838 * mangle.c: Include wide-int.h.
1839 (write_integer_cst): Use wide-int interfaces.
1840 (write_array_type): Likewise.
1841 * tree.c: Include wide-int.h.
1842 (cp_tree_equal): Use tree_int_cst_equal.
1843 * typeck2.c: Include wide-int.h.
1844 (process_init_constructor_array): Use wide-int interfaces.
1846 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1849 * decl.c (grokfndecl): Check duplicate_decls return value for
1851 * pt.c (instantiate_decl): A deleted function is defined.
1853 2014-05-02 Jason Merrill <jason@redhat.com>
1855 * decl2.c (vague_linkage_p): Local statics have vague linkage.
1858 * lambda.c (lambda_capture_field_type): Wrap anything dependent
1860 (add_capture): Check for VLA before calling it.
1861 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
1862 just the current one. Make non-static.
1863 * cp-tree.h: Declare it.
1864 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
1865 the operand was static or constant.
1867 2014-05-02 Marek Polacek <polacek@redhat.com>
1869 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
1872 2014-05-01 Marek Polacek <polacek@redhat.com>
1875 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
1876 between label and variable when warning about returning local address.
1878 2014-04-30 Jason Merrill <jason@redhat.com>
1881 * init.c (build_value_init): Don't try to call an array constructor.
1884 * typeck2.c (massage_init_elt): Use maybe_constant_init.
1886 2014-04-30 Marek Polacek <polacek@redhat.com>
1888 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
1889 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
1890 for non-integer types.
1892 2014-04-29 Jason Merrill <jason@redhat.com>
1895 Represent the unevaluated exception specification of an implicitly
1896 declared or deleted function with a simple placeholder, not a list
1898 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
1899 * except.c (unevaluated_noexcept_spec): New.
1900 * class.c (deduce_noexcept_on_destructor): Use it.
1901 * decl.c (check_redeclaration_exception_specification): Call
1902 maybe_instantiate_noexcept.
1903 (duplicate_decls): Call it before merge_types.
1904 (start_preparsed_function): Call maybe_instantiate_noexcept.
1905 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
1906 * init.c (get_nsdmi): Factor out of perform_member_init.
1907 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
1908 (walk_field_subobs): Consider NSDMI for EH spec.
1909 (get_defaulted_eh_spec): New.
1910 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
1911 (defaulted_late_check): Defer EH checking in non-template classes.
1912 (after_nsdmi_defaulted_late_checks): New.
1913 * parser.c (cp_parser_class_specifier_1): Use it.
1914 (unparsed_classes): New macro.
1915 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
1916 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
1917 Remove list-of-functions handling.
1918 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
1919 handling and FN parameter.
1920 * typeck.c (merge_types): Adjust.
1922 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
1925 * parser.c (cp_parser_alias_declaration): Check return value of
1928 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1930 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
1931 atomic-clause, allow comma in between atomic-clause and
1934 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
1937 * rtti.c (emit_support_tinfos): Do not iterate on
1938 registered_builtin_types (partial revert).
1940 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
1943 * semantics.c (apply_deduced_return_type): Complete non-void type
1944 before estimating whether the type is aggregate.
1946 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
1949 * rtti.c (emit_support_tinfo_1): New function, extracted from
1950 emit_support_tinfos.
1951 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
1953 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1956 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
1957 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1959 2014-04-18 Jason Merrill <jason@redhat.com>
1962 * call.c (reference_binding): Recurse on user-defined conversion.
1965 * call.c (standard_conversion): Don't try to apply restrict to void.
1967 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
1969 * decl.c (reshape_init_r): Handle a single element of vector type.
1971 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1974 * decl2.c (cplus_decl_attributes): Handle
1975 pointer-to-member-function declarations.
1977 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1980 * call.c (build_user_type_coversion): Use build_dummy_object
1981 to create the placeholder object for a constructor method call.
1982 (build_special_member_call): Likewise.
1983 (build_over_call): Check for the placeholder object with
1985 (build_new_method_call_1): Likewise. Don't attempt to resolve
1986 a dummy object for a constructor method call.
1988 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
1991 * friend.c (add_friend, make_friend_class): Move repeated friend
1992 warning under Wredundant_decls.
1994 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1996 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
1997 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1998 (do_class_using_decl): Likewise.
1999 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2001 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2004 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2006 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2008 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2010 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2012 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2014 2014-04-11 Jason Merrill <jason@redhat.com>
2016 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2018 (cp_lexer_get_preprocessor_token): Always clear it.
2019 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2023 * decl.c (reshape_init_r): Handle a single element of class type.
2026 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2027 built-in operator new.
2029 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2032 * name-lookup.c (parse_using_directive): Return early if the
2033 attribs argument is error_mark_node; use get_attribute_name.
2035 2014-04-11 Jason Merrill <jason@redhat.com>
2039 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2040 * call.c (struct z_candidate): Add flags field.
2041 (add_candidate): Add flags parm.
2042 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2043 (add_template_candidate_real): Pass it.
2044 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2045 * tree.c (build_aggr_init_expr): Copy it.
2046 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2048 2014-04-10 Richard Biener <rguenther@suse.de>
2049 Jakub Jelinek <jakub@redhat.com>
2052 * error.c (dump_decl) <case FUNCTION_DECL>: If
2053 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2054 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2057 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2059 * pt.c (check_template_variable): Check for the return of pedwarn
2060 before emitting a note.
2061 * parser.c (cp_parser_lambda_introducer): Likewise.
2063 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2066 * pt.c (process_template_parm): For an invalid non-type parameter
2067 only set TREE_TYPE to error_mark_node.
2068 (push_inline_template_parms_recursive, comp_template_parms,
2069 redeclare_class_template, coerce_template_template_parm,
2070 coerce_template_template_parms, unify): Use error_operand_p.
2072 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2074 * class.c (check_bases_and_members): Warn about non-virtual dtors
2075 in public bases only. Check warn_ecpp before complaining about
2076 non-polymorphic bases.
2078 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2080 * decl.c (duplicate_decls): Check for the return of warning_at
2081 before emitting a note.
2082 (warn_misplaced_attr_for_class_type): Likewise.
2083 (check_tag_decl): Likewise.
2085 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2088 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2090 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2093 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2094 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2095 instantiating a variable-sized type.
2098 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2100 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2102 * class.c (find_abi_tags_r): Check for the return of warning
2103 before emitting a note.
2104 (one_inherited_ctor): Likewise.
2106 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2108 * decl.c (duplicate_decls): Check for the return of permerror
2109 before emitting a note.
2111 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2113 * class.c (accessible_nvdtor_p): New.
2114 (check_bases): Don't check base destructor here ...
2115 (check_bases_and_members): ... check them here. Trigger on
2116 Wnon-virtual-dtor flag.
2117 (finish_struct_1): Use accessible_nvdtor_p.
2119 2014-04-01 Jason Merrill <jason@redhat.com>
2121 * pt.c (process_partial_specialization): Say "not deducible"
2122 rather than "not used". Use inform.
2125 * pt.c (coerce_template_parms): Check that the pack expansion
2126 pattern works with the first matching parameter.
2128 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2130 * init.c (perform_member_init): Homogenize uninitialized
2133 2014-04-01 Jason Merrill <jason@redhat.com>
2136 * call.c (build_array_conv): Call complete_type.
2139 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2140 (picflag_from_initializer): Return it.
2141 (process_init_constructor): Handle it.
2144 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2145 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2146 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2147 (most_general_template): Handle more kinds of template.
2148 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2149 instantiations and specializations.
2151 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2154 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2155 COMPONENT_REFs and ARRAY_REFs sooner.
2157 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2160 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2161 usage in non-functions with pushed scope.
2163 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2166 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2167 to indicate whether a scope is in the process of defining a class.
2168 * semantics.c (begin_class_definition): Set defining_class_p.
2169 * name-lookup.c (leave_scope): Reset defining_class_p.
2170 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2171 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2172 unwinding to class-defining scope to handle the erroneous definition of
2173 a generic function of an arbitrarily nested class within an enclosing
2176 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2179 * method.c (walk_field_subobs): Improve the diagnostic
2180 locations for both REFERENCE_TYPEs and non-static const members.
2181 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2182 instead of %qD to be consistent with the c++11 diagnostic.
2184 2014-03-25 Jason Merrill <jason@redhat.com>
2188 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2189 * search.c (get_pure_virtuals): Not here.
2192 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2193 a lambda in unevaluated context.
2196 * decl.c (create_array_type_for_decl): Complain about array of auto.
2198 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2201 * semantics.c (potential_constant_expression_1): Handle
2204 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2207 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2208 introducing an implicit function template parameter within an explicit
2211 2014-03-22 Jason Merrill <jason@redhat.com>
2214 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2217 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2220 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2221 on the name argument.
2223 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2226 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2229 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2232 * call.c (build_new_method_call_1): Handle pure virtuals called by
2235 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2238 * parser.c (cp_parser_member_declaration): Don't allow
2239 finish_fully_implicit_template to consider friend declarations to be
2240 class member templates.
2241 (synthesize_implicit_template_parm): Handling winding back through class
2242 scope to the class being defined in order to inject a template argument
2246 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2247 function scope as per cp_parser_skip_to_end_of_statement.
2249 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2252 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2254 2014-03-14 Jason Merrill <jason@redhat.com>
2258 * search.c (get_pure_virtuals): Handle abstract dtor here.
2259 (dfs_get_pure_virtuals): Not here.
2262 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2263 abstract class as pure.
2265 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2268 * pt.c (maybe_process_partial_specialization): Check return value
2269 of check_specialization_namespace.
2271 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2274 * semantics.c (finish_static_assert): Call cxx_constant_value only
2275 if require_potential_rvalue_constant_expression returns true.
2277 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2280 * method.c (get_inherited_ctor): New.
2281 * cp-tree.h (get_inherited_ctor): Declare it.
2282 * semantics.c (is_valid_constexpr_fn): Use it.
2284 2014-03-10 Jason Merrill <jason@redhat.com>
2287 * call.c (convert_default_arg): Remove special handling for
2291 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2292 when deciding whether to call push_template_decl for a member class.
2293 * pt.c (push_template_decl_real): Return after wrong levels error.
2295 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2298 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2299 lambda, remove the lambda's own template argument list prior to fetching
2303 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2304 function template unwinding on error into a more general location, ...
2305 (cp_parser_skip_to_end_of_statement): ... here.
2307 2014-03-07 Jason Merrill <jason@redhat.com>
2309 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2311 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2312 we're in a trailing return type.
2314 * typeck.c (comp_template_parms_position): 'auto' and
2315 'decltype(auto)' are different from real template parms.
2317 * parser.c (cp_parser_using_declaration): Consume the semicolon
2318 after bare parameter pack error.
2320 * cp-tree.h (REF_PARENTHESIZED_P): New.
2321 * semantics.c (force_paren_expr): Set it.
2322 * pt.c (do_auto_deduction): Check it.
2323 (tsubst) [COMPONENT_REF]: Copy it.
2324 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2326 * decl.c (create_array_type_for_decl): Only warn about invalid
2327 C++1y VLA if flag_iso or warn_vla>0.
2328 (grokdeclarator): Likewise.
2329 * pt.c (tsubst): Likewise.
2330 * semantics.c (finish_decltype_type): Likewise.
2331 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2332 (cp_build_addr_expr_1): Likewise.
2333 * init.c (build_new_1): Improve diagnostics.
2335 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2338 * decl.c (check_initializer): Return NULL_TREE after error;
2339 consistently use inform.
2341 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2343 * decl.c (check_initializer): Remove dead code.
2345 2014-03-06 Marek Polacek <polacek@redhat.com>
2348 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2349 of checking tree code.
2351 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2353 * parser.c (cp_lexer_set_source_position): New.
2354 (cp_parser_mem_initializer): Use it.
2355 (cp_parser_postfix_open_square_expression): Likewise.
2356 (cp_parser_parenthesized_expression_list): Likewise.
2357 (cp_parser_new_initializer): Likewise.
2358 (cp_parser_jump_statement): Likewise.
2359 (cp_parser_initializer): Likewise.
2360 (cp_parser_functional_cast): Likewise.
2362 2014-03-05 Jason Merrill <jason@redhat.com>
2365 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2366 dependent expression.
2369 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2370 if re-parsing might succeed.
2371 * semantics.c (finish_id_expression): Use of a parameter outside
2372 the function body is a parse error.
2374 * parser.c (cp_parser_mem_initializer): Set input_location
2375 properly for init-list warning.
2376 (cp_parser_postfix_open_square_expression): Likewise.
2377 (cp_parser_parenthesized_expression_list): Likewise.
2378 (cp_parser_new_initializer): Likewise.
2379 (cp_parser_jump_statement): Likewise.
2380 (cp_parser_initializer): Likewise.
2381 (cp_parser_functional_cast): Likewise.
2383 2014-03-04 Jason Merrill <jason@redhat.com>
2386 * typeck2.c (process_init_constructor_record): Set
2387 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2391 * parser.c (cp_parser_direct_declarator): Set declarator to
2392 cp_error_declarator on invalid qualified-id.
2394 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2397 * parser.c (cp_parser_using_declaration): Early return when
2398 cp_parser_nested_name_specifier errors out.
2400 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2403 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2404 function scope on parse error in function parameter list.
2406 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2408 * method.c (implicitly_declare_fn): Remove redundant
2409 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2410 * semantics.c (is_instantiation_of_constexpr): Likewise.
2411 * error.c (dump_function_decl): Likewise.
2413 2014-03-01 Jason Merrill <jason@redhat.com>
2416 * semantics.c (begin_maybe_infinite_loop): Use
2417 fold_non_dependent_expr_sfinae.
2419 2014-02-28 Jason Merrill <jason@redhat.com>
2422 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2424 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2427 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2428 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2429 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2431 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2434 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2437 2014-02-27 Jason Merrill <jason@redhat.com>
2441 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2442 are not yet defined.
2444 2014-02-26 Jason Merrill <jason@redhat.com>
2448 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2449 * init.c (build_vtbl_address): Do it here.
2455 * pt.c (struct warning_sentinel): New.
2456 (tsubst_copy_and_build): Use it instead of
2457 c_inhibit_evaluation_warnings.
2458 * typeck.c (maybe_warn_about_useless_cast): Remove
2459 c_inhibit_evaluation_warnings check.
2462 * pt.c (get_template_parm_index): New.
2463 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2464 (process_template_parm): Allow bare packs in template template
2465 parm template parms.
2466 (coerce_template_parameter_pack): Handle fixed template template
2467 parm packs and fixed packs not at the end of the parm list.
2468 (coerce_template_parms): Handle template parm packs not at the end
2470 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2473 * pt.c (unify): Ignore alias templates when deducing a template
2479 * call.c (reference_binding): Recurse on user-defined conversion.
2480 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2482 2014-02-25 Jason Merrill <jason@redhat.com>
2485 * call.c (reference_binding): Recurse on user-defined conversion.
2486 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2488 * call.c (print_conversion_rejection): Handle n_arg of -2.
2489 (build_user_type_conversion_1): Pass it.
2492 * decl2.c (no_linkage_error): Handle C++98 semantics.
2493 (reset_type_linkage): Move from decl.c.
2494 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2495 (bt_reset_linkage_2, reset_decl_linkage): New.
2496 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2497 (cp_write_global_declarations): Move condition into no_linkage_error.
2498 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2499 * semantics.c (expand_or_defer_fn_1): Factor out
2500 tentative_decl_linkage.
2501 * cp-tree.h: Adjust.
2503 * decl2.c (finish_static_data_member_decl): Diagnose static data
2504 member in unnamed class.
2505 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2508 * class.c (clone_function_decl): Call note_vague_linkage_fn for
2509 defaulted virtual dtor.
2513 * pt.c (get_underlying_template): Fix equivalence calculation.
2515 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
2518 * parser.c (function_being_declared_is_template_p): Return false when
2519 processing a template parameter list.
2520 (cp_parser_parameter_declaration_clause): Don't set
2521 auto_is_implicit_function_template_parm_p when processing a
2522 template parameter list.
2524 * parser.c (synthesize_implicit_template_parm): Inject new template
2525 argument list appropriately when a generic member function
2526 of a class template is declared out-of-line.
2529 * parser.c (cp_parser_direct_declarator): Don't save and
2530 restore num_template_parameter_lists around call to
2531 cp_parser_parameter_declaration_list.
2532 (function_being_declared_is_template_p): New predicate.
2533 (cp_parser_parameter_declaration_list): Use
2534 function_being_declared_is_template_p as predicate for
2535 inspecting current function template parameter list length
2536 rather than num_template_parameter_lists.
2538 2014-02-24 Jason Merrill <jason@redhat.com>
2541 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2542 DECL_EXPR initialize a non-class iterator.
2545 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2547 2014-02-21 Jason Merrill <jason@redhat.com>
2550 * parser.c (cp_parser_type_name): Always check dependency.
2551 (cp_parser_type_specifier_seq): Call
2552 cp_parser_parse_and_diagnose_invalid_type_name.
2555 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2558 * parser.c (cp_parser_default_argument): Clear
2559 current_class_ptr/current_class_ref like tsubst_default_argument.
2562 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2563 than current_binding_level.
2566 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2569 * parser.c (cp_parser_enum_specifier): Call
2570 check_for_bare_parameter_packs.
2573 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2577 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2578 of the partial instantiation, not the most general template.
2579 (maybe_process_partial_specialization): Reassign everything on
2583 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2584 (check_explicit_specialization): Don't clone.
2587 * pt.c (coerce_template_parms): Bail if argument packing fails.
2590 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2591 Don't get confused by a CONSTRUCTOR that already has a type.
2594 * call.c (build_array_conv): Don't crash on VLA.
2597 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2600 * lambda.c (maybe_resolve_dummy): Don't try to capture this
2601 in declaration context.
2605 * pt.c (unify): Only unify if deducible. Handle 0-length list.
2608 * parser.c (cp_parser_direct_declarator): Don't wrap a
2609 type-dependent expression in a NOP_EXPR.
2612 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2617 * parser.c (cp_parser_template_argument): Restore dereference.
2618 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2619 (process_partial_specialization): Handle deref.
2622 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
2626 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2627 implicit_template_scope upon leaving an out-of-line generic member
2628 function definition.
2630 2014-02-20 Kai Tietz <ktietz@redhat.com>
2633 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2634 valued type argument as error_mark_node.
2637 * semantics.c (finish_fname): Handle error_mark_node.
2639 2014-02-19 Jason Merrill <jason@redhat.com>
2642 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2643 spec from template context.
2645 2014-02-19 Jakub Jelinek <jakub@redhat.com>
2648 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2649 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2652 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2654 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2657 * semantics.c (ensure_literal_type_for_constexpr_object): Use
2660 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2663 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2664 During error recovery allow_non_constant may be false.
2666 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
2669 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2670 scope whenever a template parameter list has been started, independent
2671 of whether the function call operator was well-formed or not.
2674 * parser.c (cp_parser_member_declaration): Pop fully implicit template
2675 scope for generic friend declarations as well as for non-friends.
2677 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
2680 * method.c (implicitly_declare_fn): A constructor of a class with
2681 virtual base classes isn't constexpr (7.1.5p4).
2683 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2685 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2687 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2690 * parser.c (cp_parser_omp_declare_reduction): Save and free
2693 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2697 * tree.c (handle_init_priority_attribute): Call default_conversion on
2698 the attribute argument.
2700 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2703 * method.c (synthesized_method_walk): If vbases is non-null but
2704 is_empty is true, likewise don't worry about the virtual bases.
2706 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2709 * typeck2.c (process_init_constructor_record): Just skip unnamed
2712 2014-01-31 Jason Merrill <jason@redhat.com>
2715 * pt.c (mark_decl_instantiated): Call mark_needed.
2718 * decl2.c (handle_tls_init): Handle null init fn.
2721 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2723 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2726 * class.c (build_vfield_ref): Early return error_mark_node if
2727 TYPE_VFIELD (type) is null.
2728 (build_base_path): Check return value of build_vfield_ref.
2730 2014-01-31 Jason Merrill <jason@redhat.com>
2733 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2734 [ck_list]: Check for error_mark_node.
2735 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2738 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2739 during partial ordering.
2741 2014-01-31 Marek Polacek <polacek@redhat.com>
2744 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2746 2014-01-30 Jason Merrill <jason@redhat.com>
2749 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2750 (local_specializations): New macro.
2751 * pt.c (local_specializations): Remove variable.
2753 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2756 * parser.c (make_string_pack): Use double_int::from_buffer.
2758 2014-01-30 Marek Polacek <polacek@redhat.com>
2761 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2763 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2764 with input_location.
2765 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2768 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2771 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2773 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2776 * pt.c (lookup_template_class_1): Check start_enum return value
2777 for error_mark_node.
2779 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2781 * decl.c (duplicate_decls, typename_hash, typename_compare):
2782 Use TYPE_IDENTIFIER.
2783 * error.c (dump_type): Likewise.
2784 * mangle.c (dump_substitution_candidates): Likewise.
2786 2014-01-30 Jason Merrill <jason@redhat.com>
2789 * decl2.c (attributes_naming_typedef_ok): New.
2790 * cp-tree.h: Declare it.
2791 * decl.c (grokdeclarator): Check it.
2792 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2794 2014-01-29 Jason Merrill <jason@redhat.com>
2797 * call.c (add_builtin_candidate): Catch dependent types.
2800 * pt.c (expand_template_argument_pack): Correct
2801 non_default_args_count calculation.
2804 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2807 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
2808 have a friend template in a class template.
2809 * pt.c (tsubst_friend_function): Look through it.
2810 (push_template_decl_real): A friend member template is
2813 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2816 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
2819 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2822 * pt.c (instantiate_template_1): Check for error_mark_node the second
2825 2014-01-29 Jason Merrill <jason@redhat.com>
2828 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
2829 cdtor_returns_this case.
2832 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
2834 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2837 * semantics.c (finish_omp_reduction_clause): Check type for
2840 2014-01-28 Jason Merrill <jason@redhat.com>
2843 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
2844 (tsubst_copy): Use it if lookup fails.
2847 * pt.c (tsubst_function_type): Make sure we keep the same function
2851 * semantics.c (build_anon_member_initialization): Stop walking
2852 when we run out of COMPONENT_REFs.
2855 * decl.c (lookup_and_check_tag): Ignore template parameters if
2856 scope == ts_current.
2857 * pt.c (check_template_shadow): Don't complain about the injected
2860 * decl.c (duplicate_decls): Tweak.
2863 * mangle.c (write_unqualified_name): Handle operator auto.
2865 2014-01-27 Jason Merrill <jason@redhat.com>
2869 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
2870 list-initialization. A conversion to rvalue ref that involves
2871 an lvalue-rvalue conversion is bad.
2872 (convert_like_real): Give helpful error message.
2875 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
2878 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
2882 * pt.c (template_parm_to_arg): Call convert_from_reference.
2883 (tsubst_template_arg): Don't strip reference refs.
2886 * call.c (build_aggr_conv): Reject value-initialization of reference.
2890 * call.c (convert_like_real): Give helpful error about excess braces
2891 for ck_rvalue of scalar type.
2894 * call.c (reference_binding): Only elide braces if the single
2895 element is reference-related.
2898 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
2902 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
2906 * decl.c (compute_array_index_type): Don't call
2907 maybe_constant_value for a non-integral expression.
2909 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2911 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
2913 * cp-gimplify.c (cp_genericize): Likewise.
2914 * decl.c (grokfndecl): Likewise.
2915 * parser.c (cp_parser_postfix_expression): Likewise.
2916 (cp_parser_postfix_open_square_expression): Likewise.
2917 (cp_parser_direct_declarator): Likewise.
2918 (is_cilkplus_vector_p): Likewise.
2919 (cp_parser_omp_clause_name): Likewise.
2920 (cp_parser_omp_all_clauses): Likewise.
2921 * pt.c (apply_late_template_attributes): Likewise.
2922 * typeck.c (cp_build_array_ref): Likewise.
2923 (cp_build_compound_expr): Likewise.
2924 (check_return_expr): Likewise.
2926 2014-01-24 Jason Merrill <jason@redhat.com>
2929 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
2934 * typeck2.c (process_init_constructor_array): Don't create
2937 2014-01-24 Jakub Jelinek <jakub@redhat.com>
2939 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
2940 handling for RANGE_ARRAY case.
2942 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2945 * name-lookup.c (push_using_directive): Use timevar_cond_start.
2947 2014-01-23 Marek Polacek <polacek@redhat.com>
2950 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
2952 2014-01-23 Marek Polacek <polacek@redhat.com>
2955 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2958 2014-01-23 Jason Merrill <jason@redhat.com>
2961 * cp-tree.h (struct language_function): Add infinite_loop and
2963 (current_function_infinite_loop): New.
2964 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
2965 (break_maybe_infinite_loop): New.
2966 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
2967 (finish_do_stmt, finish_for_cond, finish_for_stmt)
2968 (begin_range_for_stmt): Use them.
2969 * decl.c (finish_function): Don't warn about missing return
2970 if current_function_infinite_loop.
2971 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
2972 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
2974 * call.c (build_op_delete_call): Use make_tree_vector and
2975 release_tree_vector.
2977 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2980 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
2981 nested_name_specifier.
2983 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2985 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
2986 see if there is an attribute after function decl. If so, then
2988 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
2989 enabled function late parsing.
2990 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
2991 attribute for a SIMD-enabled function.
2992 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
2993 the function is used by SIMD-enabled function (indicated by NULL
2994 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
2995 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
2996 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
2997 vectorlength clause in SIMD-enabled function and #pragma SIMD's
2998 vectorlength clause. Added a new bool parameter to differentiate
3000 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3001 (is_cilkplus_vector_p): Likewise.
3002 (cp_parser_late_parsing_elem_fn_info): Likewise.
3003 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3004 and "vectorlength" clauses when Cilk Plus is enabled.
3005 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3006 and emit a sorry message when step size is a parameter.
3007 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3008 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3010 * pt.c (apply_late_template_attributes): Likewise.
3012 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3015 * semantics.c (finish_omp_reduction_clause): Reject
3016 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3018 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3021 * parser.c (cp_parser_class_head): Push the class before parsing
3022 the base-clause, pop after it.
3024 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3026 * decl2.c (cpp_check): Revert prototype change.
3028 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3032 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3035 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3038 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3039 only when errorcount == 0.
3041 2014-01-17 Marek Polacek <polacek@redhat.com>
3044 * cvt.c (ocp_convert): Don't segfault on non-existing
3045 ENUM_UNDERLYING_TYPE.
3047 2014-01-16 Jason Merrill <jason@redhat.com>
3050 * tree.c (bot_manip): Update the location of builtin_LINE and
3053 2014-01-14 Jason Merrill <jason@redhat.com>
3056 * typeck2.c (massage_init_elt): New.
3057 (process_init_constructor_record)
3058 (process_init_constructor_union): Use it.
3059 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3060 (split_nonconstant_init_1): Handle it.
3061 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3063 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3066 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3067 and replaced an existing if-statement with else-if statement.
3068 Changed an existing error message wording to match the one from the C
3071 2014-01-08 Jason Merrill <jason@redhat.com>
3074 * class.c (abi_tag_data): Add tags field.
3075 (check_abi_tags): Initialize it.
3076 (find_abi_tags_r): Support collecting missing tags.
3077 (mark_type_abi_tags): Don't look at template args.
3078 (inherit_targ_abi_tags): New.
3079 (check_bases_and_members): Use it.
3080 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3081 * mangle.c (write_abi_tags): Check it.
3083 2014-01-07 Jason Merrill <jason@redhat.com>
3086 * pt.c (num_innermost_template_parms): New.
3087 (get_underlying_template): Use it.
3090 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3092 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3094 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3095 the letter of 20.11.6 about Base and Derived naming the same
3096 class type modulo cv-qualifiers.
3098 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3101 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3102 function as unimplemented for generic lambdas with varargs.
3105 * parser.c (cp_parser_template_parameter): Early out with
3106 error_mark_node if parameter declaration was not parsed.
3109 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3110 auto_is_implicit_function_template_parm_p around lambda body.
3113 * parser.c (cp_parser_init_declarator): Undo fully implicit
3114 template parameter list when declarator is not a function.
3116 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3119 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3121 2014-01-03 Tobias Burnus <burnus@net-b.de>
3124 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3126 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3130 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3131 as include_std to perform_koenig_lookup.
3132 (cp_parser_postfix_expression): Adjust.
3133 * pt.c (tsubst_copy_and_build): Likewise.
3134 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3135 (omp_reduction_lookup): Adjust.
3136 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3137 (lookup_arg_dependent): Likewise.
3138 (lookup_function_nonclass): Adjust.
3139 * name-lookup.h: Adjust declaration.
3140 * cp-tree.h: Likewise.
3142 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3145 * parser.c (cp_parser_userdef_numeric_literal): Mention
3146 -fext-numeric-literals in the message.
3148 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3151 * call.c (build_conditional_expr_1): Check the return value of
3154 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3156 * call.c (convert_like_real): Check complain.
3158 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3161 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3164 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3166 Update copyright years
3168 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3170 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3171 the standard form for the copyright notice.
3173 Copyright (C) 2014 Free Software Foundation, Inc.
3175 Copying and distribution of this file, with or without modification,
3176 are permitted in any medium without royalty provided the copyright
3177 notice and this notice are preserved.