1 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
4 * call.c (standard_conversion): Do not require expr to be non-null
5 when NULLPTR_TYPE_P (from) is true.
7 2014-11-26 Jason Merrill <jason@redhat.com>
9 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
12 * constexpr.c (cxx_eval_call_expression): Don't talk about
13 flowing off the end if we're already non-constant.
15 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
17 Diagnose string constant conversion to char* in c++11 and above
18 as forbidden, not deprecated.
19 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
20 change the diagnostic for the Wwrite-strings case for c++11 and above.
22 2014-11-24 Jason Merrill <jason@redhat.com>
24 * pt.c (lookup_template_variable): Always unknown_type_node.
26 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
29 * parser.c (cp_parser_label_for_labeled_statement): Check the case
30 with check_for_bare_parameter_packs.
32 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
33 Paolo Carlini <paolo.carlini@oracle.com>
36 * decl.c (initialize_local_var): Add -Winit-self warning for
37 references initialized with themselves.
39 2014-11-24 Jason Merrill <jason@redhat.com>
42 * mangle.c (mangle_decl): If we aren't going to create a symbol
43 alias, don't build the alias DECL either.
45 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
48 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
50 2014-11-21 Jason Merrill <jason@redhat.com>
54 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
55 if the temporary has a non-trivial destructor.
56 * decl.c (poplevel): Don't look through references.
59 * name-lookup.c (supplement_binding_1): Override a mangling alias.
60 * mangle.c (maybe_remove_implicit_alias): New.
61 (mangle_decl): Always avoid creating conflicting alias.
65 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
68 * pt.c (uses_template_parms): Handle null argument.
70 2014-11-21 Jakub Jelinek <jakub@redhat.com>
73 * typeck.c (cp_build_array_ref): Adjust
74 convert_vector_to_pointer_for_subscript caller. If it returns true,
75 call non_lvalue_loc on the result.
77 2014-11-20 Jason Merrill <jason@redhat.com>
80 * pt.c (convert_nontype_argument): Call convert_from_reference.
81 (check_instantiated_arg): Don't be confused by reference refs.
82 (unify): Look through reference refs on the arg, too.
83 * mangle.c (write_template_arg): Look through reference refs.
85 * error.c (dump_expr): Avoid printing (*&i) for references.
87 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
90 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
92 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
94 * cp-objcp-common.c: Use hash_table instead of htab.
96 2014-11-19 Jason Merrill <jason@redhat.com>
99 * cp-tree.h (struct processing_template_decl_sentinel): New.
100 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
101 (instantiate_non_dependent_expr_sfinae): Here.
102 (convert_nontype_argument): Use them.
103 * constexpr.c (fold_non_dependent_expr): Use them.
106 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
107 complain yet about a reference.
108 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
109 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
110 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
111 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
114 * init.c (decl_really_constant_value): Rename from
115 integral_constant_value.
116 (scalar_constant_value): Similar but limited to scalar results.
117 (decl_constant_value_safe): Remove.
118 (constant_value_1): Respect return_aggregate_cst_ok_p.
119 * typeck.c (decay_conversion): Use scalar_constant_value.
120 * call.c (convert_like_real): Likewise.
121 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
122 * typeck.c (decay_conversion): Or ARRAY_TYPE.
123 * constexpr.c (struct constexpr_ctx): Add strict field.
124 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
125 decl_constant_value and decl_really_constant_value.
126 (cxx_eval_outermost_constant_expr): Add strict parm.
127 (maybe_constant_init): Not strict.
128 (potential_constant_expression_1): Add strict parm.
129 Shorten most internal calls with RECUR macro.
130 * cp-tree.h, pt.c, semantics.c: Adjust.
132 2014-11-19 Jason Merrill <jason@redhat.com>
135 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
137 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
140 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
141 and __PRETTY_FUNCTION__.
143 2014-11-18 Jason Merrill <jason@redhat.com>
146 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
147 from a variable of empty class type is constant.
149 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
150 (potential_constant_expression_1): Handle STMT_EXPR.
152 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
154 (lots): Omit NULL jump_target arguments.
156 * constexpr.c (struct constexpr_ctx): Add quiet field.
157 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
158 (lots): Replace allow_non_constant parameter with ctx->quiet.
161 * constexpr.c (cxx_eval_binary_expression): Don't assume the
162 expression was already folded.
163 (cxx_eval_unary_expression): Likewise.
165 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
168 * rtti.c (emit_support_tinfos): Handle __float128.
170 2014-11-18 Jason Merrill <jason@redhat.com>
173 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
176 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
177 rather than VOID_TYPE_P.
179 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
182 * typeck2.c (store_init_value): Set it.
183 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
184 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
186 2014-11-17 Jason Merrill <jason@redhat.com>
189 * call.c (build_call_a): Don't warn_deprecated_use here.
190 (build_over_call): Or here.
191 * decl2.c (mark_used): Do it here.
192 (is_late_template_attribute): Attribute deprecated is not deferred.
193 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
194 * parser.c (cp_parser_template_name): Warn about deprecated template.
195 (cp_parser_template_argument): Likewise.
198 * decl.c (cp_finish_decl): Don't try to process a non-dependent
199 constant initializer for a reference.
200 * pt.c (value_dependent_expression_p): A reference is always
202 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
205 Handle C++14 constexpr flow control.
206 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
207 (cxx_eval_statement_list): New.
208 (cxx_eval_constant_expression): Handle LABEL_EXPR,
209 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
210 semantics of RETURN_EXPR.
211 (many functions): Add jump_target parameter.
212 (returns, breaks, continues, switches, label_matches): New.
213 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
214 * cp-gimplify.c (begin_bc_block): Set them.
216 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
217 (genericize_for_stmt): Handle null statement-list.
219 * constexpr.c (use_new_call): Always use new call handling.
221 C++14 constexpr support (minus loops and multiple returns)
222 * constexpr.c (use_new_call): New macro.
223 (build_data_member_initialization): Ignore non-mem-inits.
224 (check_constexpr_bind_expr_vars): Remove C++14 checks.
225 (constexpr_fn_retval): Likewise.
226 (check_constexpr_ctor_body): Do nothing in C++14.
227 (massage_constexpr_body): In C++14 only collect mem-inits.
228 (get_function_named_in_call): Handle null CALL_EXPR_FN.
229 (cxx_bind_parameters_in_call): Build bindings in same order as
230 parameters. Don't treat iniviref parms specially in new call mode.
231 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
232 based on DECL_SAVED_TREE rather than the massaged constexpr body.
233 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
234 (is_sub_constant_expr): Don't mess with ctx.ctor here.
235 (cxx_eval_component_reference): A null element means we're mid-
237 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
238 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
239 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
240 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
241 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
242 constexpr functions. In new-call mode find parms in the values table.
243 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
244 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
245 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
246 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
247 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
248 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
249 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
250 SWITCH_STMT, ASM_EXPR.
251 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
252 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
253 caller wants an lvalue.
254 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
255 (maybe_constant_init): Look through INIT_EXPR.
256 (ensure_literal_type_for_constexpr_object): Set
257 cp_function_chain->invalid_constexpr.
258 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
259 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
260 (check_for_uninitialized_const_var): Likewise.
261 (maybe_save_function_definition): Check it.
262 * parser.c (cp_parser_jump_statement): Set
263 cp_function_chain->invalid_constexpr.
264 (cp_parser_asm_definition): Likewise.
267 * decl.c (build_ptrmemfunc_type): Don't build a different
268 RECORD_TYPE for a qualified PMF.
269 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
270 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
271 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
272 * tree.c (cp_walk_subtrees): Likewise.
273 (cp_build_qualified_type_real): Remove special PMF handling.
275 2014-11-15 Jason Merrill <jason@redhat.com>
277 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
280 * constexpr.c (cxx_eval_builtin_function_call): Use
281 fold_builtin_call_array.
283 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
285 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
287 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
288 * parser.c (cp_parser_omp_clause_collapse): Likewise.
289 (cp_parser_enumerator_definition): Don't call
290 instantiate_non_dependent_expr...
291 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
292 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
293 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
294 the final gcc_assert.
296 * constexpr.c (fold_non_dependent_expr): Add.
297 * cp-tree.h (fold_non_dependent_expr): Declare it.
298 * call.c (null_ptr_cst_p): Use it.
299 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
300 * semantics.c (begin_maybe_infinite_loop): Likewise.
301 * typeck.c (cp_build_binary_op): Likewise.
302 * typeck2.c (check_narrowing): Likewise.
304 * pt.c (fold_non_dependent_expr): Rename to
305 instantiate_non_dependent_expr.
306 (fold_non_dependent_expr_sfinae): Rename to
307 instantiate_non_dependent_expr_sfinae.
308 (convert_nontype_argument, build_non_dependent_expr): Adjust.
309 * decl.c (compute_array_index_type): Likewise.
310 * parser.c (cp_parser_parenthesized_expression_list,
311 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
313 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
315 * typeck.c (cxx_alignas_expr): Likewise.
316 * typeck2.c (store_init_value, massage_init_elt): Likewise.
317 * call.c: Adjust comments.
319 * constexpr.c: Likewise.
323 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
325 * mangle.c (find_substitution): Look for abi_tag on class templates.
327 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
328 Thomas Schwinge <thomas@codesourcery.com>
329 Ilya Verbin <ilya.verbin@intel.com>
330 Andrey Turetskiy <andrey.turetskiy@intel.com>
332 * Make-lang.in (c++.install-common): Do not install for the offload
335 2014-11-13 Kai Tietz <ktietz@redhat.com>
337 * cp-tree.h (cp_build_function_call): Remove prototype.
338 (cp_build_addr_expr_strict): Likewise.
339 (build_typed_address): Likewise.
340 * typeck.c (build_typed_address): Removed.
341 (cp_build_addr_expr_strict): Make static.
342 (cp_build_function_call): Likewise.
344 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
348 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
349 * decl.c (grokdeclarator): Use it.
350 * parser.c (cp_parser_simple_type_specifier): Likewise.
351 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
353 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
356 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
357 constant the condition.
359 2014-11-10 Andi Kleen <ak@linux.intel.com>
361 * semantics.c (finish_goto_stmt): Call check_no_cilk.
362 (finish_while_stmt_cond): Dito.
363 (finish_do_stmt): Dito.
364 (finish_for_cond): Dito.
365 (finish_switch_cond): Dito.
367 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
369 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
370 OPT_Wshift_count_overflow in the warnings.
372 2014-11-09 Jason Merrill <jason@redhat.com>
375 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
376 same scalar type is an rvalue.
379 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
381 2014-11-07 Jason Merrill <jason@redhat.com>
384 * pt.c (dependent_alias_template_spec_p): New.
385 (dependent_type_p_r): Handle dependent alias template specialization.
386 (template_args_equal): A dependent alias template specializations
387 is not equal to its underlying type as a template argument.
388 * tree.c (strip_typedefs): Don't strip a dependent alias
391 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
392 (cp_parser_primary_expression): Not here.
394 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
397 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
399 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
401 * constexpr.c: Remove redundant enum from machine_mode.
403 2014-10-28 Jason Merrill <jason@redhat.com>
405 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
407 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
409 * call.c: Adjust include files.
418 * semantics.c: Ditto.
420 * vtable-class-hierarchy.c: Ditto.
422 2014-10-24 Jason Merrill <jason@redhat.com>
424 Implement N3653 (Member initializers and aggregates) and fix
425 references to 'this' in constexpr constructors.
426 * class.c (check_field_decls): In C++14 an NSDMI does not make the
428 * constexpr.c (struct constexpr_ctx): New.
429 (cxx_bind_parameters_in_call): Handle 'this'.
430 (cxx_eval_call_expression): Create new constexpr_ctx.
431 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
432 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
433 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
434 (cxx_eval_vec_init_1): Likewise.
435 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
436 [TARGET_EXPR]: Build new constexpr_ctx.
437 [PLACEHOLDER_EXPR]: New.
438 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
440 (is_sub_constant_expr): Build new constexpr_ctx.
441 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
443 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
444 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
445 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
446 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
447 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
448 (build_ctor_subob_ref, replace_placeholders): New.
449 * typeck2.c (store_init_value): Use replace_placeholders.
450 (process_init_constructor_record): Make zero-init before NSDMI
453 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
455 * cp-gimplify.c: Adjust include files.
457 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
460 * cp-objcp-common.c: Do not include new.
461 (cxx_initialize_diagnostics): Move from here to ...
462 * error.c (cxx_initialize_diagnostics): : ... here. Move
463 diagnostics initialization here from init_error.
464 (cxx_pp): Use a real pointer not a macro.
465 (init_error): Just initialize cxx_pp.
466 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
467 not set maximum line length.
469 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
472 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
474 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
476 * parser.c (cp_parser_unary_expression): Add default arguments.
477 (cp_parser_cast_expression, cp_parser_sizeof_operand,
478 cp_parser_omp_atomic): Adjust.
480 2014-10-20 Jason Merrill <jason@redhat.com>
483 * lambda.c (current_nonlambda_function): New.
484 * semantics.c (finish_this_expr): Use it.
485 * cp-tree.h: Declare it.
487 2014-10-17 Alan Modra <amodra@gmail.com>
490 * decl.c (merge_decls): Don't merge section name, comdat group or
491 tls model to newdecl symtab node, instead merge to olddecl.
492 Override existing olddecl section name. Set tls_model for all
493 thread-local vars, not just OMP thread-private ones. Remove
496 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
498 * cp-tree.h: Adjust include files.
500 2014-10-15 Jason Merrill <jason@redhat.com>
503 * pt.c (lookup_template_variable): Call coerce_template_parms.
505 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
507 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
508 ensure_literal_type_for_constexpr_object,
509 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
510 retrieve_constexpr_fundef, is_valid_constexpr_fn,
511 build_anon_member_initialization, build_data_member_initialization,
512 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
513 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
514 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
515 massage_constexpr_body, cx_check_missing_mem_inits,
516 register_constexpr_fundef, explain_invalid_constexpr_fn,
517 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
518 maybe_initialize_constexpr_call_table, get_function_named_in_call,
519 get_nth_callarg, lookup_parameter_binding,
520 cxx_eval_builtin_function_call, adjust_temp_type,
521 cxx_bind_parameters_in_call, push_cx_call_context,
522 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
523 reduced_constant_expression_p, verify_constant,
524 cxx_eval_unary_expression, cxx_eval_binary_expression,
525 cxx_eval_conditional_expression, cxx_eval_array_reference,
526 cxx_eval_component_reference, cxx_eval_bit_field_ref,
527 cxx_eval_logical_expression, base_field_constructor_elt,
528 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
529 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
530 cxx_eval_trinary_expression, var_in_constexpr_fn,
531 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
532 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
533 maybe_constant_init, potential_constant_expression_1,
534 potential_constant_expression, potential_rvalue_constant_expression,
535 require_potential_constant_expression,
536 require_potential_rvalue_constant_expression): Moved definitions...
537 * constexpr.c: ... here, new file.
538 * Make-lang.in: Update.
539 * config-lang.in: Likewise.
541 2014-10-14 Jason Merrill <jason@redhat.com>
544 * parser.c (struct saved_token_sentinel): New.
545 (cp_parser_statement): Use it.
546 (cp_parser_start_tentative_firewall): New.
547 (cp_parser_end_tentative_firewall): New.
548 (cp_parser_lambda_expression): Use them.
549 (cp_parser_statement_expr): New.
550 (cp_parser_primary_expression): Use it.
552 2014-10-14 DJ Delorie <dj@redhat.com>
554 * typeck.c (cp_common_type): Check for all __intN types, not just
556 * decl.c (grokdeclarator): Likewise.
557 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
559 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
560 for all __intN types, not just __int128.
561 (cp_parser_simple_type_specifier): Likewise.
562 * mangle.c (integer_type_codes): Remove int128-specific codes.
563 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
564 __intN was specified.
565 * lex.c (init_reswords): Reserve all __intN keywords.
567 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
569 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
571 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
573 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
575 (print_template_statistics): Cast size and elements to long.
577 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
579 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
580 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
583 2014-10-10 Jason Merrill <jason@redhat.com>
586 * class.c (build_base_path): Preserve rvalueness.
587 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
588 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
591 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
593 * method.c (implicitly_declare_fn): Handle deleted lambda default
594 ctor and copy assop here.
595 * class.c (check_bases_and_members): Not here.
596 (add_implicitly_declared_members): And don't set
597 CLASSTYPE_LAZY_MOVE_ASSIGN.
599 * semantics.c (finish_id_expression): Check for error_mark_node.
601 2014-10-09 Jason Merrill <jason@redhat.com>
604 * semantics.c (outer_var_p): Non-static.
605 (process_outer_var_ref): Split out from finish_id_expression.
606 * pt.c (tsubst_copy_and_build): Call them.
607 * cp-tree.h: Declare them.
609 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
611 * semantics.c (check_constexpr_ctor_body_1): New.
612 (check_constexpr_ctor_body): Use it; add bool parameter.
613 (build_data_member_initialization): Handle BIND_EXPR and
614 USING_STMT in the main conditional.
615 (build_constexpr_constructor_member_initializers): Do not
616 handle BIND_EXPR here.
617 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
618 (massage_constexpr_body): Don't do it here.
619 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
620 Adjust check_constexpr_ctor_body call.
621 (cp_parser_compound_statement): Do not pedwarn for compound-statement
622 in constexpr function in C++14 mode.
623 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
625 2014-10-09 Jason Merrill <jason@redhat.com>
628 * parser.c (cp_parser_class_head): push_template_decl for members
632 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
633 (iterative_hash_template_arg): Likewise.
636 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
637 * semantics.c (force_paren_expr): And set it.
638 * typeck.c (check_return_expr): And handle it.
640 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
642 * decl.c (grokdeclarator): constexpr only implies const in C++11.
644 2014-10-08 Jason Merrill <jason@redhat.com>
647 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
650 * tree.c (build_cplus_array_type): Look for a type with no
651 typedef-name or attributes.
653 * call.c (call_copy_ctor): New.
654 (build_over_call): Use it to avoid infinite recursion on invalid code.
656 2014-10-07 Jason Merrill <jason@redhat.com>
658 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
660 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
662 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
664 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
667 * semantics.c (check_constexpr_bind_expr_vars): New.
668 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
669 (build_constexpr_constructor_member_initializers): Handle
670 BIND_EXPR in the main conditional.
672 2014-10-02 Mark Wielaard <mjw@redhat.com>
675 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
676 (cp_function_decl_deleted_p): New prototype.
677 * cp-objcp-common.c (cp_function_deleted_p): New function.
679 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
684 * typeck.c (cp_build_binary_op): save_expr after convert to save
685 redundant operations.
686 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
687 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
689 2014-10-03 Jason Merrill <jason@redhat.com>
691 * decl.c (start_decl): Complain about static/thread_local vars
692 in constexpr function.
693 (check_for_uninitialized_const_var): Also uninitialized vars.
694 * parser.c (cp_parser_jump_statement): And gotos.
695 (cp_parser_asm_operand_list): And asm.
696 (cp_parser_try_block): And try.
697 * semantics.c (ensure_literal_type_for_constexpr_object): And
700 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
701 (var_in_constexpr_fn): New.
702 (cxx_eval_constant_expression): Look into DECL_INITIAL.
703 (potential_constant_expression_1): Allow constexpr-local vars.
706 * tree.c (strip_typedefs): Handle TREE_LIST.
708 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
710 * parser.c (cp_parser_assignment_expression,
711 cp_parser_constant_expression): Add default arguments.
712 (cp_parser_primary_expression,
713 cp_parser_postfix_open_square_expression,
714 cp_parser_parenthesized_expression_list,
715 cp_parser_question_colon_clause,
716 cp_parser_expression, cp_parser_constant_expression,
717 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
718 cp_parser_template_argument, cp_parser_enumerator_definition,
719 cp_parser_member_declaration, cp_parser_constant_initializer,
720 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
721 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
722 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
723 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
724 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
725 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
726 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
728 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
731 * cp-tree.h (struct saved_scope): Add noexcept_operand.
732 (cp_noexcept_operand): Define.
733 * call.c (build_over_call): Use it.
734 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
735 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
737 2014-10-01 Jason Merrill <jason@redhat.com>
740 * method.c (constructible_expr): Handle value-init of non-class.
741 * parser.c (cp_parser_trait_expr): Allow pack expansion.
742 * pt.c (tsubst_copy_and_build): Handle pack expansion.
745 * class.c (type_has_non_user_provided_default_constructor): Rename
746 from type_has_user_provided_default_constructor, reverse sense.
747 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
748 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
749 * call.c (build_new_method_call_1): Adjust.
751 * decl.c (grok_special_member_properties): Don't set
752 TYPE_HAS_COMPLEX_DFLT.
753 * init.c (build_value_init_noctor): Don't use
754 type_has_user_provided_default_constructor.
756 2014-09-30 Jason Merrill <jason@redhat.com>
758 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
759 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
760 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
761 * parser.c (cp_parser_primary_expression): Likewise.
762 (cp_parser_trait_expr): Likewise. Handle variadic trait.
763 * semantics.c (trait_expr_value): Likewise.
764 (finish_trait_expr): Likewise.
765 (check_trait_type): Handle variadic trait. Return bool.
766 * method.c (build_stub_object): Add rvalue reference here.
767 (locate_fn_flags): Not here.
768 (check_nontriv, assignable_expr, constructible_expr): New.
769 (is_trivially_xible): New.
771 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
772 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
773 * parser.c (cp_parser_primary_expression): Likewise.
774 (cp_parser_trait_expr): Likewise.
775 * semantics.c (trait_expr_value): Likewise.
776 (finish_trait_expr): Likewise.
778 * method.c (build_stub_object): Use CONVERT_EXPR.
779 * tree.c (build_dummy_object): Likewise.
780 (is_dummy_object): Adjust.
782 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
783 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
784 * semantics.c (trait_expr_value): Likewise.
785 (finish_trait_expr): Likewise.
786 * parser.c (cp_parser_primary_expression): Likewise.
787 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
789 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
792 * error.c (print_instantiation_context): Delete.
793 * typeck2.c (build_x_arrow): Record location when pushing
794 template instantiation.
795 * pt.c (push_tinst_level): Make it a wrapper around ...
796 (push_tinst_level_loc): ... this. New function. Make excessive
797 template instantiation depth a fatal error. Record location. Use
799 (instantiate_pending_templates): Make excessive
800 template instantiation depth a fatal error.
801 (problematic_instantiation_changed): Use bool as return type.
802 * cp-tree.h (print_instantiation_context): Delete.
803 (push_tinst_level): Update declaration.
804 (problematic_instantiation_changed): Likewise.
805 (push_tinst_level_loc): New.
807 2014-09-29 Richard Biener <rguenther@suse.de>
809 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
812 2014-09-26 Jason Merrill <jason@redhat.com>
814 * mangle.c (find_substitution): Use write_abi_tags.
816 2014-09-25 Marek Polacek <polacek@redhat.com>
819 * class.c (warn_hidden): Check for FUNCTION_DECL.
821 2014-09-25 Jakub Jelinek <jakub@redhat.com>
824 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
825 on low_bound and length.
827 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
829 * class.c, decl.c, optimize.c: Rename all instances of
830 DECL_ABSTRACT to DECL_ABSTRACT_P.
832 2014-09-24 Marek Polacek <polacek@redhat.com>
836 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
837 * tree.c (bot_manip): Add default case.
838 * parser.c (cp_parser_primary_expression): Cast the controlling
839 expression of a switch to an int.
840 (cp_parser_unqualified_id): Likewise.
842 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
845 * parser.c (cp_parser_skip_to_closing_square_bracket,
846 cp_parser_array_designator_p): New.
847 (cp_parser_initializer_list): Use the latter.
849 2014-09-22 Jason Merrill <jason@redhat.com>
851 * semantics.c (finish_non_static_data_member): In diagnostic, give
852 error at point of use and note at point of declaration.
857 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
860 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
863 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
865 2014-09-22 Jason Merrill <jason@redhat.com>
867 * decl.c (poplevel): Don't warn about unused vars in template scope.
868 * error.c (dump_decl): Handle variable templates.
870 2014-09-20 Jason Merrill <jason@redhat.com>
873 * decl.c (begin_destructor_body): Only clobber the as-base part of
876 2014-09-19 Jason Merrill <jason@redhat.com>
879 * mangle.c (write_expression): Use unresolved-name mangling for
883 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
884 after pulling out an element from a CONSTRUCTOR.
886 2014-09-18 Jakub Jelinek <jakub@redhat.com>
889 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
890 on type of type dependent expressions, and don't call it if
891 handle_omp_array_sections has kept TREE_LIST because something
893 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
894 Use keep_next_level, begin_omp_structured_block and
895 finish_omp_structured_block instead of push_stmt_list and
898 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
901 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
902 for final class types.
904 2014-09-15 Jason Merrill <jason@redhat.com>
906 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
907 necessary. Call inherit_targ_abi_tags here.
908 * class.c (check_bases_and_members): Not here.
909 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
910 * cp-tree.h: Declare inherit_targ_abi_tags.
912 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
914 Do not diagnose lambda default arguments in c++14 modes.
915 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
918 2014-09-15 Jakub Jelinek <jakub@redhat.com>
920 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
923 2014-09-13 Marek Polacek <polacek@redhat.com>
926 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
927 location of a call expression.
929 2014-09-11 Jason Merrill <jason@redhat.com>
932 * decl.c (start_decl): Handle specialization of member variable
934 * pt.c (check_explicit_specialization): Adjust error.
936 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
939 * typeck2.c (process_init_constructor_record): Do not warn about
940 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
942 2014-09-11 Jason Merrill <jason@redhat.com>
945 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
946 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
948 2014-09-10 Jason Merrill <jason@redhat.com>
951 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
952 (duplicate_decls, start_decl): Likewise.
953 * pt.c (check_explicit_specialization): Likewise.
954 (push_template_decl_real): Or static templates.
956 2014-09-08 Jason Merrill <jason@redhat.com>
958 * typeck.c (build_class_member_access_expr): Move
959 -Winvalid-offsetof code...
960 * semantics.c (finish_offsetof): ...here.
961 * parser.c (cp_parser_builtin_offsetof): Remember the location of
963 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
966 * pt.c (instantiate_decl): Handle recursive instantiation of
969 2014-09-05 Jason Merrill <jason@redhat.com>
972 * semantics.c (potential_constant_expression_1): Handle un-folded
973 pointer to member constants.
975 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
978 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
979 newdecl, not olddecl.
981 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
984 * class.c (check_field_decls): A class of literal type cannot have
985 volatile non-static data members and base classes.
986 (explain_non_literal_class): Update.
988 2014-09-02 Jakub Jelinek <jakub@redhat.com>
989 Balaji V. Iyer <balaji.v.iyer@intel.com>
990 Igor Zamyatin <igor.zamyatin@intel.com>
992 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
994 * parser.c (cp_parser_cilk_for): New function.
995 (cp_parser_cilk_grainsize): Likewise.
996 (cp_parser_statement): Added RID_CILK_FOR case.
997 (cp_parser_omp_for_cond): Added CILK_FOR check.
998 (cp_parser_omp_for_loop_init): Change function argument to accept
999 tree_code instead just a bool flag; change the check to use that
1000 tree_code; check for initialization declaration in case of Cilk_for.
1001 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1002 changed call to cp_parser_omp_for_loop_init according new arguments'
1004 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1005 * pt.c (tsubst_expr): Added CILK_FOR case.
1006 * semantics.c: Include convert.h.
1007 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1008 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1009 (handle_omp_for_class_iterator): New argument lastp and its usage;
1011 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1012 according new arguments' list; in case of Cilk_for save very first
1013 decl and create empty stmt_list block; use block to build correct
1016 2014-08-31 Jason Merrill <jason@redhat.com>
1019 * optimize.c (cdtor_comdat_group): Just look at the
1020 DECL_ASSEMBLER_NAME of the 'tors.
1022 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1025 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1026 result of cxx_eval_constant_expression.
1028 2014-08-26 Jason Merrill <jason@redhat.com>
1031 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1032 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1033 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1036 2014-08-25 Jason Merrill <jason@redhat.com>
1038 * pt.c (check_explicit_specialization): Don't complain about
1039 non-template variable.
1040 (template_for_substitution): Allow variable templates.
1041 (check_template_variable): Fix logic for member var template.
1042 * decl.c (start_decl): Don't complain about extra template header
1045 * decl.c (start_decl): Look through member variable template.
1046 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1047 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1050 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1053 * cp-tree.h (TFF_POINTER): Add.
1054 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1056 * error.c (dump_type_suffix): Actually print the const and noreturn
1057 attribute when appropriate.
1059 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1061 * decl.c (compute_array_index_type, grokdeclarator,
1062 undeduced_auto_decl): Change from cxx1y to cxx14.
1063 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1064 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1065 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1066 cp_parser_decltype, cp_parser_conversion_type_id,
1067 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1068 cp_parser_template_type_arg, cp_parser_std_attribute,
1069 cp_parser_template_declaration_after_export): Ditto.
1070 * pt.c (tsubst): Ditto.
1071 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1072 * tree.c: Change comment.
1073 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1074 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1076 2014-08-23 Jason Merrill <jason@redhat.com>
1078 Allow non-constexpr variable templates.
1079 * decl2.c (note_variable_template_instantiation): New.
1080 * cp-tree.h: Declare it.
1081 * pt.c (instantiate_decl): Call it.
1082 (push_template_decl_real): Allow non-constexpr variable templates.
1083 * semantics.c (finish_id_expression): Mark the variable template
1084 instantiation as used.
1085 * mangle.c (write_mangled_name): Variable template instantiations
1087 * parser.c (cp_parser_init_declarator): Complain about
1088 non-function implicit templates.
1090 2014-08-22 Marek Polacek <polacek@redhat.com>
1093 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1094 preceded with logical not. Adjust call to
1095 warn_logical_not_parentheses.
1097 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1100 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1101 declaration shadows a function declaration, unless the former
1102 declares a function, pointer to function or pointer to member
1103 function, because this is a common and valid case in real-world
1105 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1106 Improve description.
1108 2014-08-22 Jason Merrill <jason@redhat.com>
1111 * class.c (outermost_open_class): Fix logic.
1112 * decl.c (complete_vars): Fix logic.
1114 2014-08-22 Jason Merrill <jason@redhat.com>
1117 * class.c (outermost_open_class): New.
1118 * cp-tree.h: Declare it.
1119 * decl.c (maybe_register_incomplete_var): Use it.
1120 (complete_vars): Handle any constant variable.
1121 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1123 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1126 * cp-array-notation.c (build_array_notation_ref): Added correct
1127 handling of case with incorrect array.
1129 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1132 * error.c (cp_diagnostic_finalizer): Delete.
1133 (init_error): Do not set diagnostic_finalizer here.
1135 2014-08-19 Marek Polacek <polacek@redhat.com>
1138 * call.c (build_new_op_1): Remember the type of arguments for
1139 a comparison. If either operand of a comparison is a boolean
1140 expression, call maybe_warn_bool_compare.
1142 2014-08-19 Jason Merrill <jason@redhat.com>
1144 PR tree-optimization/62091
1145 * decl2.c (decl_needed_p): Return true for virtual functions when
1150 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1153 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1155 * class.c (contains_empty_class_p): Remove.
1157 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1159 * parser.c (cp_parser_expression): Add default arguments.
1160 (cp_parser_primary_expression, cp_parser_postfix_expression,
1161 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1162 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1163 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1164 cp_parser_lambda_body, cp_parser_expression_statement,
1165 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1166 cp_parser_iteration_statement, cp_parser_jump_statement,
1167 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1168 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1169 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1170 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1171 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1172 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1173 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1174 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1175 cp_parser_transaction_expression): Adjust.
1177 2014-08-15 Jason Merrill <jason@redhat.com>
1180 * pt.c (lookup_template_class_1): Revert recent change.
1181 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1184 * pt.c (instantiate_class_template_1): Ignore lambda on
1185 CLASSTYPE_DECL_LIST.
1186 (push_template_decl_real): A lambda is not primary.
1187 (lookup_template_class_1): Don't look for a lambda partial
1189 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1190 currently in a function and the lambda living in a function.
1191 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1193 2014-08-15 Richard Biener <rguenther@suse.de>
1194 Jason Merrill <jason@redhat.com>
1197 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1198 (build_cplus_array_type): ...from here. Only call build_array_type
1201 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1205 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1209 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1210 cv-qualifiers of function types.
1212 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1214 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1216 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1218 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1219 cp_build_array_ref, cp_build_function_call_vec): When a
1220 pedwarn is suppressed under SFINAE, return error_mark_node.
1222 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1223 tf_warning_or_error, where complain is a bool, glitch.
1225 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1228 * decl.c (grokdeclarator): Move the check for friend initializers..
1229 * decl2.c (grokfield) ..here. Postpone early return for friends
1230 until after the initializer check.
1232 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1235 * pt.c (coerce_template_parms): Improve error message vs default
1238 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1240 * parser.c (cp_parser_init_declarator): Remove redundant check of
1241 decl_specifiers->type.
1243 2014-08-13 Jason Merrill <jason@redhat.com>
1245 * call.c (build_x_va_arg): Support passing non-POD through ....
1246 (convert_arg_to_ellipsis): Likewise.
1248 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1250 * pt.c (lookup_template_variable): Make dependent variable templates
1253 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1255 * parser.c (cp_parser_elaborated_type_specifier): Handle
1256 specially cp_parser_template_id returning a BASELINK.
1258 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1260 * parser.c (cp_parser_diagnose_invalid_type_name,
1261 cp_parser_make_typename_type): Remove scope parameter.
1262 (cp_parser_parse_and_diagnose_invalid_type_name,
1263 cp_parser_elaborated_type_specifier): Adjust calls.
1265 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1267 Reject virt-specifiers on friends and member templates
1268 * friend.c (do_friend): Diagnose virt-specifiers.
1269 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1271 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1273 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1274 return type to bool; in C++11 for constants give errors, not pedwarns.
1275 * cp-tree.h (check_narrowing): Adjust declaration.
1276 * call.c (convert_like_real): Update calls.
1277 * semantics.c (finish_compound_literal): Likewise.
1279 2014-08-08 Jason Merrill <jason@redhat.com>
1281 * pt.c (lookup_template_class_1): Copy abi_tag.
1283 2014-08-08 Kai Tietz <ktietz@redhat.com>
1285 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1286 that we operate on a true inline.
1288 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1290 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1291 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1293 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1296 * decl.c (build_enumerator): Handle class types with conversion
1297 operators via perform_implicit_conversion_flags and
1298 build_expr_type_conversion.
1300 * cvt.c (build_expr_type_conversion): Replace pair of errors
1301 with error + inform.
1303 2014-08-07 Jason Merrill <jason@redhat.com>
1306 * parser.c (c_parse_file): Change sorry to fatal_error.
1309 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1311 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1313 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1315 2014-08-06 Jason Merrill <jason@redhat.com>
1317 * init.c (build_vec_init): Fix constant initialization of
1319 (build_value_init_noctor): Call maybe_constant_init.
1320 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1324 * init.c (build_vec_init): Reorganize earlier change a bit.
1327 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1328 if we're just returning an INIT_EXPR.
1330 2014-08-06 Jason Merrill <jason@redhat.com>
1331 Braden Obrzut <admin@maniacsvault.net>
1333 * pt.c (check_explicit_specialization): Don't test
1334 DECL_DECLARED_INLINE_P for a variable template.
1336 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1339 * typeck.c (cp_build_binary_op): Extend to more cases the
1342 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1344 Implement constexpr variable templates
1345 * decl.c (grokvardecl): Handle specializations of variable templates.
1346 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1347 return from grokvardecl.
1348 * decl2.c (check_member_template): Allow declaration of template member
1350 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1352 * pt.c (check_template_variable): Accept variable temploids at
1354 (push_template_decl_real): The current instantiation of a template
1356 (determine_specialization): Accept variable templates.
1357 (check_explicit_specialization): Handle and check for malformed
1358 variable template specializations.
1359 (lookup_template_variable): New.
1360 (tsubst_decl): Handle variable template specializations.
1361 (do_decl_instantiation): Handle template variables.
1362 (instantiate_decl): Handle template variables.
1363 * semantics.c (finish_template_variable): New.
1364 (finish_id_expression): Instantiate variable templates.
1365 * cp-tree.h (variable_template_p): New.
1367 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1370 * decl.c (check_redeclaration_no_default_args): New.
1371 (duplicate_decls): Use it, handle default arguments
1372 in redeclarations of function templates.
1374 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1376 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1378 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1380 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1381 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1382 instead of pointer_set.
1384 2014-08-01 Jason Merrill <jason@redhat.com>
1387 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1388 init-list for trailing elements.
1389 * typeck2.c (process_init_constructor_array): Likewise.
1391 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1394 * decl.c (duplicate_decls): Handle static member functions too.
1396 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1398 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1401 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1404 * parser.c (cp_parser_array_notation): Added check for array_type.
1406 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1409 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1410 DECL_EXPR improved. Changed handling for INIT_EXPR.
1412 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1414 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1416 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1418 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1419 -fsanitize=alignment call ubsan_maybe_instrument_reference
1420 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1421 for calls to member functions.
1423 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1426 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1427 whether it is returning the address of a local variable.
1428 (check_return_expr): Return 0 instead of the address of a local
1431 2014-07-30 Jason Merrill <jason@redhat.com>
1435 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1437 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1440 * pt.c (unify_arity): Add boolean parameter.
1441 (unify_too_few_arguments): Likewise.
1442 (type_unification_real): Diagnose correctly insufficient
1443 arguments in the presence of trailing variadic parameters;
1444 deducing multiple trailing packs as empty is fine.
1446 2014-07-30 Jason Merrill <jason@redhat.com>
1451 * decl2.c (mark_all_virtuals): New variable.
1452 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1453 (cp_write_global_declarations): Set it and give helpful diagnostic
1454 if it introduces errors.
1455 * class.c (finish_struct_1): Check it.
1459 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1460 (check_explicit_specialization): Clear it on specializations.
1461 * decl.c (duplicate_decls, start_decl): Likewise.
1462 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1463 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1464 linkage after setting the appropriate flags.
1465 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1466 * decl2.c (mark_needed): Mark clones.
1467 (import_export_decl): Not here.
1469 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1471 Implement N4051 - Allow typename in a template template parameter
1472 * parser.c (cp_parser_type_parameter_key): New funtion;
1473 (cp_parser_token_is_type_parameter_key): Ditto;
1474 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1475 but pedwarn for less than cxx1z.
1477 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1480 * call.c (standard_conversion): Use resolve_nondeduced_context
1481 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1483 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1486 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1489 2014-07-15 Jason Merrill <jason@redhat.com>
1492 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1496 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1497 * class.c (finish_struct): Reject invalid definition of
1498 std::initializer_list.
1500 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1502 * call.c (convert_like_real): Call print_z_candidate and inform only
1503 if permerror returns true.
1505 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1507 * class.c (build_clone): Do not clear assembler names of
1509 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1510 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1511 as a special case return sizeof (struct tree_decl_non_common)
1513 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1514 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1515 * cp/cp-tree.h (tree_template_decl): New structure.
1516 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1517 (union cp_lang_tree_node): Add template_decl.
1518 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1520 2014-07-14 Jason Merrill <jason@redhat.com>
1524 * pt.c (instantiate_decl): Don't check defer_ok for local class
1527 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1530 * cp-tree.h (LITERAL_ZERO_P): Define.
1531 * parser.c (cp_parser_parenthesized_expression_list): Add
1532 want_literal_zero_p argument, if true, for literal zeros
1533 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1534 (cp_parser_postfix_expression): Adjust
1535 cp_parser_parenthesized_expression_list caller, handle
1536 -Wmemset-transposed-args.
1537 (literal_zeros): New variable.
1539 2014-07-13 Jason Merrill <jason@redhat.com>
1542 * semantics.c (is_instantiation_of_constexpr): Return true for
1543 defaulted functions, too.
1544 (explain_invalid_constexpr_fn): Only use
1545 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1546 * method.c (explain_implicit_non_constexpr): Pass
1547 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1550 * decl.c (check_initializer): Don't finish_compound_literal
1551 on erroneous constexpr init.
1554 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1557 * decl.c (create_array_type_for_decl): Only check for auto once.
1560 * call.c (build_list_conv): Don't try to build a list of references.
1562 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1564 PR C++/60209 - Declaration of user-defined literal operator cause error
1565 * parser.c (cp_parser_operator): Fold treatment of strings
1566 and user-defined string literals. Use the full string parser.
1567 (cp_parser_string_literal): Add flag to not look for literal operator.
1569 2014-07-11 Jason Merrill <jason@redhat.com>
1573 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1575 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1578 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1580 * decl.c (check_initializer): Don't call check_narrowing here,
1581 set LOOKUP_NO_NARROWING.
1582 * typeck2.c (digest_init_r): Likewise.
1584 2014-07-10 Jason Merrill <jason@redhat.com>
1587 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1591 * decl2.c (mark_all_virtuals): New variable.
1592 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1593 (cp_write_global_declarations): Set it and give helpful diagnostic
1594 if it introduces errors.
1595 * class.c (finish_struct_1): Check it.
1596 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1598 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1601 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1602 outside class declaration, in friend declaration, and neither on
1603 constructor nor conversion operator.
1605 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1609 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1610 cv-qualifiers of function types.
1612 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1613 Paolo Carlini <paolo.carlini@oracle.com>
1616 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1619 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1621 * class.c (check_for_override): Wrap the 'final' and 'override'
1622 keywords in %< and %>.
1624 2014-07-06 Marek Polacek <polacek@redhat.com>
1627 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1628 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1629 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1632 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1634 * pt.c (convert_template_argument): Use inform instead of error in
1637 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1642 * parser.c (cp_parser_userdef_string_literal): Take a tree
1644 (cp_parser_string_literal): Don't hack the token stream.
1646 2014-06-30 Jason Merrill <jason@redhat.com>
1650 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1652 * init.c (build_vtbl_address): Don't mark destructor.
1653 * class.c (finish_struct_1): Add all classes to keyed_classes
1657 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1660 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1662 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1663 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1664 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1665 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1666 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1667 * pt.c (unify): Also check whether the argument is a PMF.
1669 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1672 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1673 a '[' can also start a primary-expression.
1674 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1675 when cp_parser_tokens_start_cast_expression returns -1.
1677 2014-06-30 Jason Merrill <jason@redhat.com>
1680 * pt.c (unify_one_argument): Type/expression mismatch just causes
1683 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1686 2014-06-30 Marek Polacek <polacek@redhat.com>
1688 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1689 function has no_sanitize_undefined attribute.
1690 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1691 function has no_sanitize_undefined attribute.
1693 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1696 * cp-array-notation.c (expand_sec_reduce_builtin):
1697 Check that bultin argument is correct.
1698 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1700 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1704 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1705 types aren't the same.
1707 2014-06-27 Jason Merrill <jason@redhat.com>
1710 * error.c (dump_template_bindings): Don't tsubst in a clone.
1712 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1715 * semantics.c (finish_compound_literal): Revert r204228.
1717 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1719 * parser.c (cp_parser_compound_literal_p): New.
1720 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1722 2014-06-26 Jason Merrill <jason@redhat.com>
1724 * parser.c (cp_parser_for_init_statement): Change range-for error
1727 N3994 Ranged-based for-loops: The Next Generation
1728 * parser.c (cp_lexer_nth_token_is): New.
1729 (cp_parser_for_init_statement): Allow "for (id : init)".
1731 2014-06-26 Teresa Johnson <tejohnson@google.com>
1733 * class.c (dump_class_hierarchy): Use saved dump files.
1734 (dump_vtable): Ditto.
1737 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1740 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1741 parameter lists outside of function parameter scope.
1743 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1747 * typeck2.c (process_init_constructor_record): Do not complain about
1748 uninitialized const members, because within aggregate-initialization,
1749 members without explicit initializers are value-initialized.
1751 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1753 * semantics.c (finish_omp_clauses): Make sure
1754 OMP_CLAUSE_LINEAR_STEP has correct type.
1756 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1758 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1759 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1760 FUNCTION_DECL check.
1761 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1762 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1763 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1764 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1766 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1769 * decl.c (grokdeclarator): Do not early check for operator-function-id
1772 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1774 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1777 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1779 * parser.c (cp_parser_omp_for_loop): For
1780 #pragma omp parallel for simd move lastprivate clause from parallel
1781 to for rather than simd.
1783 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1787 * decl.c (grokparms): Accept a single parameter of type 'void'.
1789 2014-06-20 Jason Merrill <jason@redhat.com>
1792 * call.c (add_function_candidate): Avoid special 'this' handling
1793 if we have a ref-qualifier.
1796 * call.c (build_over_call): Call build_this in template path.
1798 2014-06-19 Jason Merrill <jason@redhat.com>
1801 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1803 2014-06-18 Jason Merrill <jason@redhat.com>
1806 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1807 ref-qualifier handling.
1810 * pt.c (resolve_overloaded_unification): Preserve
1811 ARGUMENT_PACK_EXPLICIT_ARGS.
1813 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1815 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1817 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1819 2014-06-17 Jason Merrill <jason@redhat.com>
1822 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1824 2014-06-15 Jason Merrill <jason@redhat.com>
1827 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1830 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1832 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1834 * decl.c (grokvardecl): Fix pasto in previous patch.
1836 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1838 * decl.c (duplicate_decls): Use set_decl_tls_model.
1839 (grokdeclarator): Likewise.
1840 * semantics.c (finish_id_expression): Check TLS only for
1842 (finish_omp_threadprivate): Use decl_default_tls_model.
1843 * decl2.c (get_guard): Likewise.
1844 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1846 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1849 * decl.c (grokparms): Improve error message about void parameters.
1850 * error.c (type_to_string): Fix aka cut off code.
1852 2014-06-12 Jason Merrill <jason@redhat.com>
1854 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1855 * cvt.c (type_promotes_to): Likewise.
1856 * mangle.c (write_type, write_expression): Likewise.
1857 (write_name, write_template_arg): Likewise.
1858 (mangle_decl): Make alias based on flag_abi_compat_version.
1859 Emit -Wabi warning here.
1860 (finish_mangling_internal): Not here. Drop warn parm.
1861 (finish_mangling_get_identifier, finish_mangling): Adjust.
1862 (mangle_type_string, mangle_special_for_type): Adjust.
1863 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1864 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1865 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1867 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1868 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1869 (layout_nonempty_base_or_field, end_of_class): Likewise.
1870 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1871 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1872 (layout_virtual_bases): Likewise.
1873 * decl.c (compute_array_index_type): Likewise.
1874 * mangle.c (write_mangled_name, write_prefix): Likewise.
1875 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1876 (write_template_arg, write_array_type): Likewise.
1877 * method.c (lazily_declare_fn): Likewise.
1878 * rtti.c (get_pseudo_ti_index): Likewise.
1879 * typeck.c (comp_array_types): Likewise.
1881 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1883 * vtable-class-hierarchy.c: Update handling for section names
1884 that are no longer trees.
1885 * decl.c (duplicate_decls): Likewise.
1887 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1890 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1891 to cp_parser_declarator.
1893 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1896 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1897 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1900 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1903 * parser.c (cp_parser_declarator): Add bool parameter.
1904 (cp_parser_direct_declarator): Likewise, use it.
1905 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1906 (cp_parser_condition, cp_parser_explicit_instantiation,
1907 cp_parser_init_declarator, cp_parser_type_id_1,
1908 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1909 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1910 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1912 * decl.c (grokdeclarator): Fix handling of friend declared in
1913 namespace scope (g++.dg/parse/friend10.C).
1915 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1917 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1919 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1920 (maybe_clone_body): Move symbol across comdat groups.
1921 * method.c (use_thunk): Copy implicit section flag.
1923 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1926 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1928 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1930 * method.c (use_thunk): Use set_decl_section_name.
1931 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1932 * decl.c (duplicate_decls): Likewise.
1933 * vtable-class-hierarchy.c: Likewise.
1935 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1938 * class.c (check_field_decls): In C++11 mode do not reject
1939 static data members and reference-type members in unions.
1941 2014-06-05 Jason Merrill <jason@redhat.com>
1944 * decl.c (check_initializer): Collapse a TREE_LIST here.
1945 * typeck2.c (store_init_value): Not here.
1947 2014-06-05 Richard Biener <rguenther@suse.de>
1948 Paolo Carlini <paolo.carlini@oracle.com>
1951 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1952 handling of empty classes.
1954 2014-06-04 Jason Merrill <jason@redhat.com>
1956 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1957 for noexcept and thread_local, too.
1960 * decl.c (check_initializer): Maybe clear
1961 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1963 2014-06-05 Richard Biener <rguenther@suse.de>
1966 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1967 warnings for accessing empty classes.
1969 2014-06-05 Marek Polacek <polacek@redhat.com>
1972 * parser.c (cp_parser_binary_expression): Warn when logical not is
1973 used on the left hand side operand of a comparison.
1975 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1978 * typeck.c (cp_build_modify_expr): Handle array of characters
1979 initialized by a string literal.
1980 * decl.c (check_initializer): Handle parenthesized string literal
1982 * typeck2.c (store_init_value): Remove redundant check.
1984 2014-06-04 Jason Merrill <jason@redhat.com>
1988 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1989 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1991 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1994 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1997 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2001 * call.c (standard_conversion): Convert nullptr to bool only
2002 in case of direct-initialization.
2003 (convert_like_real): Provide informative error message.
2005 2014-06-03 Marek Polacek <polacek@redhat.com>
2008 * semantics.c (finish_switch_cond): Warn if switch condition has
2011 2014-06-03 Jason Merrill <jason@redhat.com>
2014 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2015 variable to local_specializations.
2018 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2020 2014-06-02 Jason Merrill <jason@redhat.com>
2023 * decl.c (reshape_init_class): Handle un-folded
2024 constant-expressions.
2027 * pt.c (pack_deducible_p): Handle canonicalization.
2029 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2031 * pt.c (tsubst_function_type): Initialize arg_types.
2033 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2036 * class.c (handle_using_decl): Pass the correct scope to
2037 cp_emit_debug_info_for_using.
2039 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2043 * search.c (accessible_p): Use current_nonlambda_class_type.
2044 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2046 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2048 * decl.c: Include builtins.h.
2049 * semantics.c: Likewise.
2051 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2055 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2056 * pt.c (tsubst_function_type): Inject the this parameter; do the
2057 substitutions in the order mandated by the DR.
2058 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2059 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2060 (static_fn_type): Copy it.
2061 * decl2.c (build_memfn_type, change_return_type,
2062 cp_reconstruct_complex_type): Likewise.
2063 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2064 * tree.c (strip_typedefs): Likewise.
2065 * typeck.c (merge_types): Likewise.
2067 2014-05-30 Jason Merrill <jason@redhat.com>
2070 * pt.c (instantiate_decl): Check that defer_ok is not set for
2071 local class members.
2074 * pt.c (tsubst_init): Split out from...
2075 (tsubst_expr) [DECL_EXPR]: Here.
2076 (tsubst_copy) [VAR_DECL]: Use it.
2077 * semantics.c (finish_id_expression): Return the decl for static/const.
2079 2014-05-28 Jason Merrill <jason@redhat.com>
2082 * decl.c (cxx_comdat_group): Return a decl.
2083 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2085 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2089 * call.c (build_aggr_conv): Ignore passed in flags.
2090 (build_array_conv, build_complex_conv): Likewise.
2092 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2094 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2095 (maybe_clone_body): Likewise.
2096 * decl.c (duplicate_decls): Update code duplicating comdat group;
2097 do not copy symtab pointer; before freeing newdecl remove it
2099 * decl2.c (constrain_visibility): Use set_comdat_group.
2101 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2103 * rtti.c: Include tm_p.h
2104 (emit_tinfo_decl): Force RTTI data to be aligned to required
2107 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2109 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2110 ignoring other target adjustments.
2112 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2114 * semantics.c (finish_omp_clauses): Remove duplicated variable
2117 * parser.c (cp_parser_omp_target): Return bool values.
2119 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2122 * lambda.c (add_capture): Enforce that capture by value requires
2124 * typeck2.c (cxx_incomplete_type_inform): Early return if
2125 TYPE_MAIN_DECL is null.
2127 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2130 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2132 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2135 * lambda.c (build_capture_proxy, add_capture): Treat normal
2136 captures and init-captures identically.
2138 2014-05-21 Mark Wielaard <mjw@redhat.com>
2141 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2142 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2144 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2146 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2147 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2148 (expand_array_notation): Handle VOID_CST.
2149 * error.c (dump_expr): Likewise.
2150 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2151 (cxx_pretty_printer::expression): Likewise.
2152 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2153 * decl.c (register_dtor_fn): Likewise.
2154 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2155 (build_delete, push_base_cleanups): Likewise.
2156 * mangle.c (write_expression): Likewise.
2157 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2158 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2159 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2160 * tree.c (cp_tree_equal): Likewise.
2161 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2162 instead of void_zero_node.
2163 * typeck.c (check_return_expr): Likewise.
2164 * typeck2.c (build_functional_cast): Likewise.
2166 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2169 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2171 (cp_parser_statement): ...here. Make sure only semicolon can go after
2174 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2179 * typeck2.c (digest_nsdmi_init): New.
2180 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2181 * init.c (get_nsdmi): Likewise.
2182 * cp-tree.h (digest_nsdmi_init): Declare.
2184 2014-05-20 Jason Merrill <jason@redhat.com>
2186 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2187 up a virtual function in a dummy object.
2189 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2192 * decl.c (duplicate_decls): Replace pair of warning_at with
2193 warning_at + inform.
2194 (maybe_commonize_var): Likewise.
2196 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2199 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2200 (tsubst_copy_and_build): Perform recursive substitutions in a
2201 deterministic order.
2203 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2206 * typeck2.c (cxx_incomplete_type_inform): New.
2207 (cxx_incomplete_type_diagnostic): Use it.
2208 * decl.c (grokdeclarator): Check the element type of an
2209 incomplete array type; call the above.
2210 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2212 2014-05-19 Jason Merrill <jason@redhat.com>
2215 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2216 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2218 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2220 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2221 * parser.c (cp_parser_enum_specifier): Likewise.
2223 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2225 * class.c (sorted_fields_type_new): Adjust.
2226 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2227 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2228 * cp-tree.h: Remove usage of variable_size gty attribute.
2229 * decl.c (make_label_decl): Adjust.
2230 (check_goto): Likewise.
2231 (start_preparsed_function): Likewise.
2232 (save_function_data): Likewise.
2233 * lex.c (init_reswords): Likewise.
2234 (retrofit_lang_decl): Likewise.
2235 (cxx_dup_lang_specific_decl): Likewise.
2236 (copy_lang_type): Likewise.
2237 (cxx_make_type): Likewise.
2238 * name-lookup.c (binding_entry_make): Likewise.
2239 (binding_table_construct): Likewise.
2240 (binding_table_new): Likewise.
2241 (cxx_binding_make): Likewise.
2242 (pushdecl_maybe_friend_1): Likewise.
2243 (begin_scope): Likewise.
2244 (push_to_top_level): Likewise.
2245 * parser.c (cp_lexer_alloc): Likewise.
2246 (cp_lexer_new_from_tokens): Likewise.
2247 (cp_token_cache_new): Likewise.
2248 (cp_parser_context_new): Likewise.
2249 (cp_parser_new): Likewise.
2250 (cp_parser_nested_name_specifier_opt): Likewise.
2251 (cp_parser_template_id): Likewise.
2252 * pt.c (maybe_process_partial_specialization): Likewise.
2253 (register_specialization): Likewise.
2254 (add_pending_template): Likewise.
2255 (lookup_template_class_1): Likewise.
2256 (push_tinst_level): Likewise.
2257 * semantics.c (register_constexpr_fundef): Likewise.
2258 (cxx_eval_call_expression): Likewise.
2259 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2261 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2264 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2265 when cp_parser_lookup_name sets ambiguous_decls.
2267 2014-05-15 Jason Merrill <jason@redhat.com>
2269 * call.c (print_conversion_rejection): Use loc consistently.
2271 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2273 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2274 * call.c (convert_like_real, build_new_method_call_1): Use it.
2275 * decl2.c (grokfield): Likewise.
2276 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2277 build_new_1): Likewise.
2278 * mangle.c (write_expression): Likewise.
2279 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2281 2014-05-14 Jason Merrill <jason@redhat.com>
2285 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2286 dropped cv-quals as a bad conversion.
2287 (convert_like_real) [ck_ref_bind]: Explain them.
2288 (compare_ics): Check badness before stripping reference
2289 bindings. Handle comparing bad reference bindings.
2290 * typeck.c (comp_cv_qualification): Add overload that just takes
2292 * cp-tree.h: Declare it.
2294 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2295 (arg_conversion_rejection, bad_arg_conversion_rejection)
2296 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2297 (add_function_candidate): Pass actual argument, rather than type, to
2298 bad_arg_conversion_rejection.
2299 (print_conversion_rejection): Explain what's wrong with the conversion.
2300 (print_z_candidates): Say "candidate:" before each candidate.
2301 (splice_viable): Be strict if we see a viable or template candidate.
2302 (build_user_type_conversion_1): Pass false to strict parameter.
2303 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2304 (build_new_op_1, build_new_method_call_1): Likewise.
2305 (build_op_call_1): Pass true to strict parameter.
2307 2014-05-13 Jason Merrill <jason@redhat.com>
2309 * call.c (print_error_for_call_failure): Say "no match" rather
2310 than "ambiguous" if there were no strict matches.
2311 (build_new_method_call_1): Likewise.
2314 * semantics.c (is_this_parameter): Allow capture proxies too.
2316 2014-05-12 Jason Merrill <jason@redhat.com>
2318 * call.c (maybe_print_user_conv_context): New.
2319 (convert_like_real): Use it. Print call context for bad
2320 user-defined conversion.
2321 (build_over_call): Print call context for bad 'this' conversion.
2323 * call.c (convert_like_real): Use inform for identifying the
2326 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2328 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2329 complain & tf_error is false.
2331 * decl.c (make_unbound_class_template): Prefer inform for
2332 "declared here"-type message.
2334 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2338 * lambda.c (lambda_expr_this_capture): Add new parameter
2339 add_capture_p controlling whether the functions will try to
2340 capture 'this' via the default capture.
2341 (maybe_resolve_dummy): Likewise.
2342 * cp-tree.h: Adjust prototypes.
2343 * call.c, semantics.c: Change callers of these functions.
2344 * call.c (build_new_method_call_1): Use the actual 'this' that
2345 would be potentially captured for the overload resolution, instead
2346 of the dummy object.
2348 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2350 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2352 (convert_nontype_argument): Adjust calls.
2353 (coerce_template_parameter_pack): Add missing complain & tf_error
2356 2014-05-09 Jason Merrill <jason@redhat.com>
2360 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2361 non-class lvalues and xvalues that differ only in cv-qualifiers.
2365 * call.c (build_user_type_conversion_1): The copy-init temporary
2369 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2372 * call.c (build_conditional_expr_1): If overload resolution finds
2373 no match, just say "different types".
2376 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2379 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2380 if we didn't find a conversion.
2381 Don't accept a bad conversion too early.
2383 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2386 * typeck.c (convert_for_assignment): Provide an inform for pointers
2387 to incomplete class types.
2389 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2392 * pt.c (convert_nontype_argument): Protect all the error calls
2393 with complain & tf_error.
2395 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2398 * pt.c (instantiate_decl): Avoid generating the body of a
2401 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2404 * pt.c (maybe_begin_member_template_processing): Use
2405 uses_template_parms.
2407 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2408 Mike Stump <mikestump@comcast.net>
2409 Richard Sandiford <rdsandiford@googlemail.com>
2411 * call.c: Include wide-int.h.
2412 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2413 (convert_for_arg_passing): Likewise.
2414 * class.c: Include wide-int.h.
2415 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2416 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2417 (include_empty_classes): Likewise
2418 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2419 * cvt.c: Include wide-int.h.
2420 (ignore_overflows): Use wide_int_to_tree.
2421 * decl.c: Include wide-int.h.
2422 (check_array_designated_initializer): Use wide-int interfaces.
2423 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2424 (finish_enum_value_list): Use signop.
2425 (build_enumerator): Use wide-int interfaces.
2426 * init.c: Include wide-int.h.
2427 (build_new_1): Use wide-int interfaces.
2428 * mangle.c: Include wide-int.h.
2429 (write_integer_cst): Use wide-int interfaces.
2430 (write_array_type): Likewise.
2431 * tree.c: Include wide-int.h.
2432 (cp_tree_equal): Use tree_int_cst_equal.
2433 * typeck2.c: Include wide-int.h.
2434 (process_init_constructor_array): Use wide-int interfaces.
2436 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2439 * decl.c (grokfndecl): Check duplicate_decls return value for
2441 * pt.c (instantiate_decl): A deleted function is defined.
2443 2014-05-02 Jason Merrill <jason@redhat.com>
2445 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2448 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2450 (add_capture): Check for VLA before calling it.
2451 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2452 just the current one. Make non-static.
2453 * cp-tree.h: Declare it.
2454 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2455 the operand was static or constant.
2457 2014-05-02 Marek Polacek <polacek@redhat.com>
2459 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2462 2014-05-01 Marek Polacek <polacek@redhat.com>
2465 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2466 between label and variable when warning about returning local address.
2468 2014-04-30 Jason Merrill <jason@redhat.com>
2471 * init.c (build_value_init): Don't try to call an array constructor.
2474 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2476 2014-04-30 Marek Polacek <polacek@redhat.com>
2478 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2479 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2480 for non-integer types.
2482 2014-04-29 Jason Merrill <jason@redhat.com>
2485 Represent the unevaluated exception specification of an implicitly
2486 declared or deleted function with a simple placeholder, not a list
2488 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2489 * except.c (unevaluated_noexcept_spec): New.
2490 * class.c (deduce_noexcept_on_destructor): Use it.
2491 * decl.c (check_redeclaration_exception_specification): Call
2492 maybe_instantiate_noexcept.
2493 (duplicate_decls): Call it before merge_types.
2494 (start_preparsed_function): Call maybe_instantiate_noexcept.
2495 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2496 * init.c (get_nsdmi): Factor out of perform_member_init.
2497 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2498 (walk_field_subobs): Consider NSDMI for EH spec.
2499 (get_defaulted_eh_spec): New.
2500 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2501 (defaulted_late_check): Defer EH checking in non-template classes.
2502 (after_nsdmi_defaulted_late_checks): New.
2503 * parser.c (cp_parser_class_specifier_1): Use it.
2504 (unparsed_classes): New macro.
2505 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2506 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2507 Remove list-of-functions handling.
2508 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2509 handling and FN parameter.
2510 * typeck.c (merge_types): Adjust.
2512 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2515 * parser.c (cp_parser_alias_declaration): Check return value of
2518 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2520 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2521 atomic-clause, allow comma in between atomic-clause and
2524 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2527 * rtti.c (emit_support_tinfos): Do not iterate on
2528 registered_builtin_types (partial revert).
2530 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2533 * semantics.c (apply_deduced_return_type): Complete non-void type
2534 before estimating whether the type is aggregate.
2536 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2539 * rtti.c (emit_support_tinfo_1): New function, extracted from
2540 emit_support_tinfos.
2541 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2543 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2546 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2547 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2549 2014-04-18 Jason Merrill <jason@redhat.com>
2552 * call.c (reference_binding): Recurse on user-defined conversion.
2555 * call.c (standard_conversion): Don't try to apply restrict to void.
2557 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2559 * decl.c (reshape_init_r): Handle a single element of vector type.
2561 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2564 * decl2.c (cplus_decl_attributes): Handle
2565 pointer-to-member-function declarations.
2567 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2570 * call.c (build_user_type_coversion): Use build_dummy_object
2571 to create the placeholder object for a constructor method call.
2572 (build_special_member_call): Likewise.
2573 (build_over_call): Check for the placeholder object with
2575 (build_new_method_call_1): Likewise. Don't attempt to resolve
2576 a dummy object for a constructor method call.
2578 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2581 * friend.c (add_friend, make_friend_class): Move repeated friend
2582 warning under Wredundant_decls.
2584 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2586 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2587 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2588 (do_class_using_decl): Likewise.
2589 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2591 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2594 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2596 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2598 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2600 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2602 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2604 2014-04-11 Jason Merrill <jason@redhat.com>
2606 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2608 (cp_lexer_get_preprocessor_token): Always clear it.
2609 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2613 * decl.c (reshape_init_r): Handle a single element of class type.
2616 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2617 built-in operator new.
2619 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2622 * name-lookup.c (parse_using_directive): Return early if the
2623 attribs argument is error_mark_node; use get_attribute_name.
2625 2014-04-11 Jason Merrill <jason@redhat.com>
2629 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2630 * call.c (struct z_candidate): Add flags field.
2631 (add_candidate): Add flags parm.
2632 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2633 (add_template_candidate_real): Pass it.
2634 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2635 * tree.c (build_aggr_init_expr): Copy it.
2636 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2638 2014-04-10 Richard Biener <rguenther@suse.de>
2639 Jakub Jelinek <jakub@redhat.com>
2642 * error.c (dump_decl) <case FUNCTION_DECL>: If
2643 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2644 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2647 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2649 * pt.c (check_template_variable): Check for the return of pedwarn
2650 before emitting a note.
2651 * parser.c (cp_parser_lambda_introducer): Likewise.
2653 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2656 * pt.c (process_template_parm): For an invalid non-type parameter
2657 only set TREE_TYPE to error_mark_node.
2658 (push_inline_template_parms_recursive, comp_template_parms,
2659 redeclare_class_template, coerce_template_template_parm,
2660 coerce_template_template_parms, unify): Use error_operand_p.
2662 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2664 * class.c (check_bases_and_members): Warn about non-virtual dtors
2665 in public bases only. Check warn_ecpp before complaining about
2666 non-polymorphic bases.
2668 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2670 * decl.c (duplicate_decls): Check for the return of warning_at
2671 before emitting a note.
2672 (warn_misplaced_attr_for_class_type): Likewise.
2673 (check_tag_decl): Likewise.
2675 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2678 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2680 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2683 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2684 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2685 instantiating a variable-sized type.
2688 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2690 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2692 * class.c (find_abi_tags_r): Check for the return of warning
2693 before emitting a note.
2694 (one_inherited_ctor): Likewise.
2696 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2698 * decl.c (duplicate_decls): Check for the return of permerror
2699 before emitting a note.
2701 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2703 * class.c (accessible_nvdtor_p): New.
2704 (check_bases): Don't check base destructor here ...
2705 (check_bases_and_members): ... check them here. Trigger on
2706 Wnon-virtual-dtor flag.
2707 (finish_struct_1): Use accessible_nvdtor_p.
2709 2014-04-01 Jason Merrill <jason@redhat.com>
2711 * pt.c (process_partial_specialization): Say "not deducible"
2712 rather than "not used". Use inform.
2715 * pt.c (coerce_template_parms): Check that the pack expansion
2716 pattern works with the first matching parameter.
2718 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2720 * init.c (perform_member_init): Homogenize uninitialized
2723 2014-04-01 Jason Merrill <jason@redhat.com>
2726 * call.c (build_array_conv): Call complete_type.
2729 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2730 (picflag_from_initializer): Return it.
2731 (process_init_constructor): Handle it.
2734 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2735 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2736 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2737 (most_general_template): Handle more kinds of template.
2738 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2739 instantiations and specializations.
2741 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2744 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2745 COMPONENT_REFs and ARRAY_REFs sooner.
2747 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2750 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2751 usage in non-functions with pushed scope.
2753 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2756 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2757 to indicate whether a scope is in the process of defining a class.
2758 * semantics.c (begin_class_definition): Set defining_class_p.
2759 * name-lookup.c (leave_scope): Reset defining_class_p.
2760 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2761 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2762 unwinding to class-defining scope to handle the erroneous definition of
2763 a generic function of an arbitrarily nested class within an enclosing
2766 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2769 * method.c (walk_field_subobs): Improve the diagnostic
2770 locations for both REFERENCE_TYPEs and non-static const members.
2771 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2772 instead of %qD to be consistent with the c++11 diagnostic.
2774 2014-03-25 Jason Merrill <jason@redhat.com>
2778 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2779 * search.c (get_pure_virtuals): Not here.
2782 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2783 a lambda in unevaluated context.
2786 * decl.c (create_array_type_for_decl): Complain about array of auto.
2788 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2791 * semantics.c (potential_constant_expression_1): Handle
2794 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2797 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2798 introducing an implicit function template parameter within an explicit
2801 2014-03-22 Jason Merrill <jason@redhat.com>
2804 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2807 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2810 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2811 on the name argument.
2813 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2816 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2819 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2822 * call.c (build_new_method_call_1): Handle pure virtuals called by
2825 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2828 * parser.c (cp_parser_member_declaration): Don't allow
2829 finish_fully_implicit_template to consider friend declarations to be
2830 class member templates.
2831 (synthesize_implicit_template_parm): Handling winding back through class
2832 scope to the class being defined in order to inject a template argument
2836 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2837 function scope as per cp_parser_skip_to_end_of_statement.
2839 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2842 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2844 2014-03-14 Jason Merrill <jason@redhat.com>
2848 * search.c (get_pure_virtuals): Handle abstract dtor here.
2849 (dfs_get_pure_virtuals): Not here.
2852 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2853 abstract class as pure.
2855 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2858 * pt.c (maybe_process_partial_specialization): Check return value
2859 of check_specialization_namespace.
2861 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2864 * semantics.c (finish_static_assert): Call cxx_constant_value only
2865 if require_potential_rvalue_constant_expression returns true.
2867 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2870 * method.c (get_inherited_ctor): New.
2871 * cp-tree.h (get_inherited_ctor): Declare it.
2872 * semantics.c (is_valid_constexpr_fn): Use it.
2874 2014-03-10 Jason Merrill <jason@redhat.com>
2877 * call.c (convert_default_arg): Remove special handling for
2881 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2882 when deciding whether to call push_template_decl for a member class.
2883 * pt.c (push_template_decl_real): Return after wrong levels error.
2885 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2888 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2889 lambda, remove the lambda's own template argument list prior to fetching
2893 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2894 function template unwinding on error into a more general location, ...
2895 (cp_parser_skip_to_end_of_statement): ... here.
2897 2014-03-07 Jason Merrill <jason@redhat.com>
2899 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2901 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2902 we're in a trailing return type.
2904 * typeck.c (comp_template_parms_position): 'auto' and
2905 'decltype(auto)' are different from real template parms.
2907 * parser.c (cp_parser_using_declaration): Consume the semicolon
2908 after bare parameter pack error.
2910 * cp-tree.h (REF_PARENTHESIZED_P): New.
2911 * semantics.c (force_paren_expr): Set it.
2912 * pt.c (do_auto_deduction): Check it.
2913 (tsubst) [COMPONENT_REF]: Copy it.
2914 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2916 * decl.c (create_array_type_for_decl): Only warn about invalid
2917 C++1y VLA if flag_iso or warn_vla>0.
2918 (grokdeclarator): Likewise.
2919 * pt.c (tsubst): Likewise.
2920 * semantics.c (finish_decltype_type): Likewise.
2921 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2922 (cp_build_addr_expr_1): Likewise.
2923 * init.c (build_new_1): Improve diagnostics.
2925 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2928 * decl.c (check_initializer): Return NULL_TREE after error;
2929 consistently use inform.
2931 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2933 * decl.c (check_initializer): Remove dead code.
2935 2014-03-06 Marek Polacek <polacek@redhat.com>
2938 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2939 of checking tree code.
2941 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2943 * parser.c (cp_lexer_set_source_position): New.
2944 (cp_parser_mem_initializer): Use it.
2945 (cp_parser_postfix_open_square_expression): Likewise.
2946 (cp_parser_parenthesized_expression_list): Likewise.
2947 (cp_parser_new_initializer): Likewise.
2948 (cp_parser_jump_statement): Likewise.
2949 (cp_parser_initializer): Likewise.
2950 (cp_parser_functional_cast): Likewise.
2952 2014-03-05 Jason Merrill <jason@redhat.com>
2955 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2956 dependent expression.
2959 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2960 if re-parsing might succeed.
2961 * semantics.c (finish_id_expression): Use of a parameter outside
2962 the function body is a parse error.
2964 * parser.c (cp_parser_mem_initializer): Set input_location
2965 properly for init-list warning.
2966 (cp_parser_postfix_open_square_expression): Likewise.
2967 (cp_parser_parenthesized_expression_list): Likewise.
2968 (cp_parser_new_initializer): Likewise.
2969 (cp_parser_jump_statement): Likewise.
2970 (cp_parser_initializer): Likewise.
2971 (cp_parser_functional_cast): Likewise.
2973 2014-03-04 Jason Merrill <jason@redhat.com>
2976 * typeck2.c (process_init_constructor_record): Set
2977 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2981 * parser.c (cp_parser_direct_declarator): Set declarator to
2982 cp_error_declarator on invalid qualified-id.
2984 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2987 * parser.c (cp_parser_using_declaration): Early return when
2988 cp_parser_nested_name_specifier errors out.
2990 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2993 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2994 function scope on parse error in function parameter list.
2996 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2998 * method.c (implicitly_declare_fn): Remove redundant
2999 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3000 * semantics.c (is_instantiation_of_constexpr): Likewise.
3001 * error.c (dump_function_decl): Likewise.
3003 2014-03-01 Jason Merrill <jason@redhat.com>
3006 * semantics.c (begin_maybe_infinite_loop): Use
3007 fold_non_dependent_expr_sfinae.
3009 2014-02-28 Jason Merrill <jason@redhat.com>
3012 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3014 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3017 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3018 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3019 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3021 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3024 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3027 2014-02-27 Jason Merrill <jason@redhat.com>
3031 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3032 are not yet defined.
3034 2014-02-26 Jason Merrill <jason@redhat.com>
3038 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3039 * init.c (build_vtbl_address): Do it here.
3045 * pt.c (struct warning_sentinel): New.
3046 (tsubst_copy_and_build): Use it instead of
3047 c_inhibit_evaluation_warnings.
3048 * typeck.c (maybe_warn_about_useless_cast): Remove
3049 c_inhibit_evaluation_warnings check.
3052 * pt.c (get_template_parm_index): New.
3053 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3054 (process_template_parm): Allow bare packs in template template
3055 parm template parms.
3056 (coerce_template_parameter_pack): Handle fixed template template
3057 parm packs and fixed packs not at the end of the parm list.
3058 (coerce_template_parms): Handle template parm packs not at the end
3060 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3063 * pt.c (unify): Ignore alias templates when deducing a template
3069 * call.c (reference_binding): Recurse on user-defined conversion.
3070 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3072 2014-02-25 Jason Merrill <jason@redhat.com>
3075 * call.c (reference_binding): Recurse on user-defined conversion.
3076 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3078 * call.c (print_conversion_rejection): Handle n_arg of -2.
3079 (build_user_type_conversion_1): Pass it.
3082 * decl2.c (no_linkage_error): Handle C++98 semantics.
3083 (reset_type_linkage): Move from decl.c.
3084 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3085 (bt_reset_linkage_2, reset_decl_linkage): New.
3086 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3087 (cp_write_global_declarations): Move condition into no_linkage_error.
3088 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3089 * semantics.c (expand_or_defer_fn_1): Factor out
3090 tentative_decl_linkage.
3091 * cp-tree.h: Adjust.
3093 * decl2.c (finish_static_data_member_decl): Diagnose static data
3094 member in unnamed class.
3095 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3098 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3099 defaulted virtual dtor.
3103 * pt.c (get_underlying_template): Fix equivalence calculation.
3105 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3108 * parser.c (function_being_declared_is_template_p): Return false when
3109 processing a template parameter list.
3110 (cp_parser_parameter_declaration_clause): Don't set
3111 auto_is_implicit_function_template_parm_p when processing a
3112 template parameter list.
3114 * parser.c (synthesize_implicit_template_parm): Inject new template
3115 argument list appropriately when a generic member function
3116 of a class template is declared out-of-line.
3119 * parser.c (cp_parser_direct_declarator): Don't save and
3120 restore num_template_parameter_lists around call to
3121 cp_parser_parameter_declaration_list.
3122 (function_being_declared_is_template_p): New predicate.
3123 (cp_parser_parameter_declaration_list): Use
3124 function_being_declared_is_template_p as predicate for
3125 inspecting current function template parameter list length
3126 rather than num_template_parameter_lists.
3128 2014-02-24 Jason Merrill <jason@redhat.com>
3131 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3132 DECL_EXPR initialize a non-class iterator.
3135 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3137 2014-02-21 Jason Merrill <jason@redhat.com>
3140 * parser.c (cp_parser_type_name): Always check dependency.
3141 (cp_parser_type_specifier_seq): Call
3142 cp_parser_parse_and_diagnose_invalid_type_name.
3145 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3148 * parser.c (cp_parser_default_argument): Clear
3149 current_class_ptr/current_class_ref like tsubst_default_argument.
3152 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3153 than current_binding_level.
3156 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3159 * parser.c (cp_parser_enum_specifier): Call
3160 check_for_bare_parameter_packs.
3163 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3167 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3168 of the partial instantiation, not the most general template.
3169 (maybe_process_partial_specialization): Reassign everything on
3173 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3174 (check_explicit_specialization): Don't clone.
3177 * pt.c (coerce_template_parms): Bail if argument packing fails.
3180 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3181 Don't get confused by a CONSTRUCTOR that already has a type.
3184 * call.c (build_array_conv): Don't crash on VLA.
3187 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3190 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3191 in declaration context.
3195 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3198 * parser.c (cp_parser_direct_declarator): Don't wrap a
3199 type-dependent expression in a NOP_EXPR.
3202 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3207 * parser.c (cp_parser_template_argument): Restore dereference.
3208 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3209 (process_partial_specialization): Handle deref.
3212 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3216 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3217 implicit_template_scope upon leaving an out-of-line generic member
3218 function definition.
3220 2014-02-20 Kai Tietz <ktietz@redhat.com>
3223 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3224 valued type argument as error_mark_node.
3227 * semantics.c (finish_fname): Handle error_mark_node.
3229 2014-02-19 Jason Merrill <jason@redhat.com>
3232 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3233 spec from template context.
3235 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3238 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3239 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3242 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3244 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3247 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3250 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3253 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3254 During error recovery allow_non_constant may be false.
3256 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3259 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3260 scope whenever a template parameter list has been started, independent
3261 of whether the function call operator was well-formed or not.
3264 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3265 scope for generic friend declarations as well as for non-friends.
3267 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3270 * method.c (implicitly_declare_fn): A constructor of a class with
3271 virtual base classes isn't constexpr (7.1.5p4).
3273 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3275 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3277 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3280 * parser.c (cp_parser_omp_declare_reduction): Save and free
3283 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3287 * tree.c (handle_init_priority_attribute): Call default_conversion on
3288 the attribute argument.
3290 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3293 * method.c (synthesized_method_walk): If vbases is non-null but
3294 is_empty is true, likewise don't worry about the virtual bases.
3296 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3299 * typeck2.c (process_init_constructor_record): Just skip unnamed
3302 2014-01-31 Jason Merrill <jason@redhat.com>
3305 * pt.c (mark_decl_instantiated): Call mark_needed.
3308 * decl2.c (handle_tls_init): Handle null init fn.
3311 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3313 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3316 * class.c (build_vfield_ref): Early return error_mark_node if
3317 TYPE_VFIELD (type) is null.
3318 (build_base_path): Check return value of build_vfield_ref.
3320 2014-01-31 Jason Merrill <jason@redhat.com>
3323 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3324 [ck_list]: Check for error_mark_node.
3325 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3328 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3329 during partial ordering.
3331 2014-01-31 Marek Polacek <polacek@redhat.com>
3334 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3336 2014-01-30 Jason Merrill <jason@redhat.com>
3339 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3340 (local_specializations): New macro.
3341 * pt.c (local_specializations): Remove variable.
3343 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3346 * parser.c (make_string_pack): Use double_int::from_buffer.
3348 2014-01-30 Marek Polacek <polacek@redhat.com>
3351 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3353 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3354 with input_location.
3355 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3358 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3361 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3363 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3366 * pt.c (lookup_template_class_1): Check start_enum return value
3367 for error_mark_node.
3369 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3371 * decl.c (duplicate_decls, typename_hash, typename_compare):
3372 Use TYPE_IDENTIFIER.
3373 * error.c (dump_type): Likewise.
3374 * mangle.c (dump_substitution_candidates): Likewise.
3376 2014-01-30 Jason Merrill <jason@redhat.com>
3379 * decl2.c (attributes_naming_typedef_ok): New.
3380 * cp-tree.h: Declare it.
3381 * decl.c (grokdeclarator): Check it.
3382 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3384 2014-01-29 Jason Merrill <jason@redhat.com>
3387 * call.c (add_builtin_candidate): Catch dependent types.
3390 * pt.c (expand_template_argument_pack): Correct
3391 non_default_args_count calculation.
3394 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3397 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3398 have a friend template in a class template.
3399 * pt.c (tsubst_friend_function): Look through it.
3400 (push_template_decl_real): A friend member template is
3403 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3406 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3409 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3412 * pt.c (instantiate_template_1): Check for error_mark_node the second
3415 2014-01-29 Jason Merrill <jason@redhat.com>
3418 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3419 cdtor_returns_this case.
3422 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3424 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3427 * semantics.c (finish_omp_reduction_clause): Check type for
3430 2014-01-28 Jason Merrill <jason@redhat.com>
3433 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3434 (tsubst_copy): Use it if lookup fails.
3437 * pt.c (tsubst_function_type): Make sure we keep the same function
3441 * semantics.c (build_anon_member_initialization): Stop walking
3442 when we run out of COMPONENT_REFs.
3445 * decl.c (lookup_and_check_tag): Ignore template parameters if
3446 scope == ts_current.
3447 * pt.c (check_template_shadow): Don't complain about the injected
3450 * decl.c (duplicate_decls): Tweak.
3453 * mangle.c (write_unqualified_name): Handle operator auto.
3455 2014-01-27 Jason Merrill <jason@redhat.com>
3459 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3460 list-initialization. A conversion to rvalue ref that involves
3461 an lvalue-rvalue conversion is bad.
3462 (convert_like_real): Give helpful error message.
3465 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3468 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3472 * pt.c (template_parm_to_arg): Call convert_from_reference.
3473 (tsubst_template_arg): Don't strip reference refs.
3476 * call.c (build_aggr_conv): Reject value-initialization of reference.
3480 * call.c (convert_like_real): Give helpful error about excess braces
3481 for ck_rvalue of scalar type.
3484 * call.c (reference_binding): Only elide braces if the single
3485 element is reference-related.
3488 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3492 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3496 * decl.c (compute_array_index_type): Don't call
3497 maybe_constant_value for a non-integral expression.
3499 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3501 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3503 * cp-gimplify.c (cp_genericize): Likewise.
3504 * decl.c (grokfndecl): Likewise.
3505 * parser.c (cp_parser_postfix_expression): Likewise.
3506 (cp_parser_postfix_open_square_expression): Likewise.
3507 (cp_parser_direct_declarator): Likewise.
3508 (is_cilkplus_vector_p): Likewise.
3509 (cp_parser_omp_clause_name): Likewise.
3510 (cp_parser_omp_all_clauses): Likewise.
3511 * pt.c (apply_late_template_attributes): Likewise.
3512 * typeck.c (cp_build_array_ref): Likewise.
3513 (cp_build_compound_expr): Likewise.
3514 (check_return_expr): Likewise.
3516 2014-01-24 Jason Merrill <jason@redhat.com>
3519 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3524 * typeck2.c (process_init_constructor_array): Don't create
3527 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3529 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3530 handling for RANGE_ARRAY case.
3532 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3535 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3537 2014-01-23 Marek Polacek <polacek@redhat.com>
3540 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3542 2014-01-23 Marek Polacek <polacek@redhat.com>
3545 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3548 2014-01-23 Jason Merrill <jason@redhat.com>
3551 * cp-tree.h (struct language_function): Add infinite_loop and
3553 (current_function_infinite_loop): New.
3554 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3555 (break_maybe_infinite_loop): New.
3556 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3557 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3558 (begin_range_for_stmt): Use them.
3559 * decl.c (finish_function): Don't warn about missing return
3560 if current_function_infinite_loop.
3561 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3562 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3564 * call.c (build_op_delete_call): Use make_tree_vector and
3565 release_tree_vector.
3567 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3570 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3571 nested_name_specifier.
3573 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3575 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3576 see if there is an attribute after function decl. If so, then
3578 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3579 enabled function late parsing.
3580 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3581 attribute for a SIMD-enabled function.
3582 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3583 the function is used by SIMD-enabled function (indicated by NULL
3584 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3585 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3586 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3587 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3588 vectorlength clause. Added a new bool parameter to differentiate
3590 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3591 (is_cilkplus_vector_p): Likewise.
3592 (cp_parser_late_parsing_elem_fn_info): Likewise.
3593 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3594 and "vectorlength" clauses when Cilk Plus is enabled.
3595 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3596 and emit a sorry message when step size is a parameter.
3597 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3598 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3600 * pt.c (apply_late_template_attributes): Likewise.
3602 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3605 * semantics.c (finish_omp_reduction_clause): Reject
3606 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3608 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3611 * parser.c (cp_parser_class_head): Push the class before parsing
3612 the base-clause, pop after it.
3614 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3616 * decl2.c (cpp_check): Revert prototype change.
3618 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3622 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3625 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3628 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3629 only when errorcount == 0.
3631 2014-01-17 Marek Polacek <polacek@redhat.com>
3634 * cvt.c (ocp_convert): Don't segfault on non-existing
3635 ENUM_UNDERLYING_TYPE.
3637 2014-01-16 Jason Merrill <jason@redhat.com>
3640 * tree.c (bot_manip): Update the location of builtin_LINE and
3643 2014-01-14 Jason Merrill <jason@redhat.com>
3646 * typeck2.c (massage_init_elt): New.
3647 (process_init_constructor_record)
3648 (process_init_constructor_union): Use it.
3649 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3650 (split_nonconstant_init_1): Handle it.
3651 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3653 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3656 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3657 and replaced an existing if-statement with else-if statement.
3658 Changed an existing error message wording to match the one from the C
3661 2014-01-08 Jason Merrill <jason@redhat.com>
3664 * class.c (abi_tag_data): Add tags field.
3665 (check_abi_tags): Initialize it.
3666 (find_abi_tags_r): Support collecting missing tags.
3667 (mark_type_abi_tags): Don't look at template args.
3668 (inherit_targ_abi_tags): New.
3669 (check_bases_and_members): Use it.
3670 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3671 * mangle.c (write_abi_tags): Check it.
3673 2014-01-07 Jason Merrill <jason@redhat.com>
3676 * pt.c (num_innermost_template_parms): New.
3677 (get_underlying_template): Use it.
3680 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3682 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3684 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3685 the letter of 20.11.6 about Base and Derived naming the same
3686 class type modulo cv-qualifiers.
3688 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3691 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3692 function as unimplemented for generic lambdas with varargs.
3695 * parser.c (cp_parser_template_parameter): Early out with
3696 error_mark_node if parameter declaration was not parsed.
3699 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3700 auto_is_implicit_function_template_parm_p around lambda body.
3703 * parser.c (cp_parser_init_declarator): Undo fully implicit
3704 template parameter list when declarator is not a function.
3706 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3709 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3711 2014-01-03 Tobias Burnus <burnus@net-b.de>
3714 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3716 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3720 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3721 as include_std to perform_koenig_lookup.
3722 (cp_parser_postfix_expression): Adjust.
3723 * pt.c (tsubst_copy_and_build): Likewise.
3724 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3725 (omp_reduction_lookup): Adjust.
3726 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3727 (lookup_arg_dependent): Likewise.
3728 (lookup_function_nonclass): Adjust.
3729 * name-lookup.h: Adjust declaration.
3730 * cp-tree.h: Likewise.
3732 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3735 * parser.c (cp_parser_userdef_numeric_literal): Mention
3736 -fext-numeric-literals in the message.
3738 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3741 * call.c (build_conditional_expr_1): Check the return value of
3744 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3746 * call.c (convert_like_real): Check complain.
3748 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3751 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3754 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3756 Update copyright years
3758 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3760 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3761 the standard form for the copyright notice.
3763 Copyright (C) 2014 Free Software Foundation, Inc.
3765 Copying and distribution of this file, with or without modification,
3766 are permitted in any medium without royalty provided the copyright
3767 notice and this notice are preserved.