9420908683d09396f926fe5153b1916952765b45
[gcc.git] / gcc / cp / ChangeLog
1 2014-11-10 Andi Kleen <ak@linux.intel.com>
2
3 * semantics.c (finish_goto_stmt): Call check_no_cilk.
4 (finish_while_stmt_cond): Dito.
5 (finish_do_stmt): Dito.
6 (finish_for_cond): Dito.
7 (finish_switch_cond): Dito.
8
9 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
10
11 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
12 OPT_Wshift_count_overflow in the warnings.
13
14 2014-11-09 Jason Merrill <jason@redhat.com>
15
16 DR 799
17 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
18 same scalar type is an rvalue.
19
20 DR 2007
21 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
22
23 2014-11-07 Jason Merrill <jason@redhat.com>
24
25 DR 1558
26 * pt.c (dependent_alias_template_spec_p): New.
27 (dependent_type_p_r): Handle dependent alias template specialization.
28 (template_args_equal): A dependent alias template specializations
29 is not equal to its underlying type as a template argument.
30 * tree.c (strip_typedefs): Don't strip a dependent alias
31 template-id.
32
33 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
34 (cp_parser_primary_expression): Not here.
35
36 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
37
38 PR c++/63366
39 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
40
41 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
42
43 * constexpr.c: Remove redundant enum from machine_mode.
44
45 2014-10-28 Jason Merrill <jason@redhat.com>
46
47 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
48
49 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
50
51 * call.c: Adjust include files.
52 * class.c: Ditto.
53 * decl2.c: Ditto.
54 * decl.c: Ditto.
55 * lambda.c: Ditto.
56 * mangle.c: Ditto.
57 * method.c: Ditto.
58 * optimize.c: Ditto.
59 * parser.c: Ditto.
60 * semantics.c: Ditto.
61 * tree.c: Ditto.
62 * vtable-class-hierarchy.c: Ditto.
63
64 2014-10-24 Jason Merrill <jason@redhat.com>
65
66 Implement N3653 (Member initializers and aggregates) and fix
67 references to 'this' in constexpr constructors.
68 * class.c (check_field_decls): In C++14 an NSDMI does not make the
69 class non-aggregate.
70 * constexpr.c (struct constexpr_ctx): New.
71 (cxx_bind_parameters_in_call): Handle 'this'.
72 (cxx_eval_call_expression): Create new constexpr_ctx.
73 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
74 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
75 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
76 (cxx_eval_vec_init_1): Likewise.
77 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
78 [TARGET_EXPR]: Build new constexpr_ctx.
79 [PLACEHOLDER_EXPR]: New.
80 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
81 object parameter.
82 (is_sub_constant_expr): Build new constexpr_ctx.
83 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
84 Allow 'this'.
85 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
86 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
87 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
88 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
89 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
90 (build_ctor_subob_ref, replace_placeholders): New.
91 * typeck2.c (store_init_value): Use replace_placeholders.
92 (process_init_constructor_record): Make zero-init before NSDMI
93 explicit.
94
95 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
96
97 * cp-gimplify.c: Adjust include files.
98
99 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
100
101 PR c++/53061
102 * cp-objcp-common.c: Do not include new.
103 (cxx_initialize_diagnostics): Move from here to ...
104 * error.c (cxx_initialize_diagnostics): : ... here. Move
105 diagnostics initialization here from init_error.
106 (cxx_pp): Use a real pointer not a macro.
107 (init_error): Just initialize cxx_pp.
108 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
109 not set maximum line length.
110
111 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
112
113 PR c++/63619
114 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
115
116 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
117
118 * parser.c (cp_parser_unary_expression): Add default arguments.
119 (cp_parser_cast_expression, cp_parser_sizeof_operand,
120 cp_parser_omp_atomic): Adjust.
121
122 2014-10-20 Jason Merrill <jason@redhat.com>
123
124 PR c++/63601
125 * lambda.c (current_nonlambda_function): New.
126 * semantics.c (finish_this_expr): Use it.
127 * cp-tree.h: Declare it.
128
129 2014-10-17 Alan Modra <amodra@gmail.com>
130
131 PR middle-end/61848
132 * decl.c (merge_decls): Don't merge section name, comdat group or
133 tls model to newdecl symtab node, instead merge to olddecl.
134 Override existing olddecl section name. Set tls_model for all
135 thread-local vars, not just OMP thread-private ones. Remove
136 incorrect comment.
137
138 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
139
140 * cp-tree.h: Adjust include files.
141
142 2014-10-15 Jason Merrill <jason@redhat.com>
143
144 PR c++/63528
145 * pt.c (lookup_template_variable): Call coerce_template_parms.
146
147 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
148
149 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
150 ensure_literal_type_for_constexpr_object,
151 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
152 retrieve_constexpr_fundef, is_valid_constexpr_fn,
153 build_anon_member_initialization, build_data_member_initialization,
154 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
155 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
156 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
157 massage_constexpr_body, cx_check_missing_mem_inits,
158 register_constexpr_fundef, explain_invalid_constexpr_fn,
159 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
160 maybe_initialize_constexpr_call_table, get_function_named_in_call,
161 get_nth_callarg, lookup_parameter_binding,
162 cxx_eval_builtin_function_call, adjust_temp_type,
163 cxx_bind_parameters_in_call, push_cx_call_context,
164 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
165 reduced_constant_expression_p, verify_constant,
166 cxx_eval_unary_expression, cxx_eval_binary_expression,
167 cxx_eval_conditional_expression, cxx_eval_array_reference,
168 cxx_eval_component_reference, cxx_eval_bit_field_ref,
169 cxx_eval_logical_expression, base_field_constructor_elt,
170 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
171 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
172 cxx_eval_trinary_expression, var_in_constexpr_fn,
173 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
174 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
175 maybe_constant_init, potential_constant_expression_1,
176 potential_constant_expression, potential_rvalue_constant_expression,
177 require_potential_constant_expression,
178 require_potential_rvalue_constant_expression): Moved definitions...
179 * constexpr.c: ... here, new file.
180 * Make-lang.in: Update.
181 * config-lang.in: Likewise.
182
183 2014-10-14 Jason Merrill <jason@redhat.com>
184
185 PR c++/63455
186 * parser.c (struct saved_token_sentinel): New.
187 (cp_parser_statement): Use it.
188 (cp_parser_start_tentative_firewall): New.
189 (cp_parser_end_tentative_firewall): New.
190 (cp_parser_lambda_expression): Use them.
191 (cp_parser_statement_expr): New.
192 (cp_parser_primary_expression): Use it.
193
194 2014-10-14 DJ Delorie <dj@redhat.com>
195
196 * typeck.c (cp_common_type): Check for all __intN types, not just
197 __int128.
198 * decl.c (grokdeclarator): Likewise.
199 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
200 __int128.
201 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
202 for all __intN types, not just __int128.
203 (cp_parser_simple_type_specifier): Likewise.
204 * mangle.c (integer_type_codes): Remove int128-specific codes.
205 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
206 __intN was specified.
207 * lex.c (init_reswords): Reserve all __intN keywords.
208
209 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
210
211 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
212
213 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
214
215 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
216 unsigned long.
217 (print_template_statistics): Cast size and elements to long.
218
219 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
220
221 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
222 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
223 hashtab.
224
225 2014-10-10 Jason Merrill <jason@redhat.com>
226
227 PR c++/62115
228 * class.c (build_base_path): Preserve rvalueness.
229 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
230 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
231
232 PR c++/63194
233 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
234
235 * method.c (implicitly_declare_fn): Handle deleted lambda default
236 ctor and copy assop here.
237 * class.c (check_bases_and_members): Not here.
238 (add_implicitly_declared_members): And don't set
239 CLASSTYPE_LAZY_MOVE_ASSIGN.
240
241 * semantics.c (finish_id_expression): Check for error_mark_node.
242
243 2014-10-09 Jason Merrill <jason@redhat.com>
244
245 PR c++/63207
246 * semantics.c (outer_var_p): Non-static.
247 (process_outer_var_ref): Split out from finish_id_expression.
248 * pt.c (tsubst_copy_and_build): Call them.
249 * cp-tree.h: Declare them.
250
251 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
252
253 * semantics.c (check_constexpr_ctor_body_1): New.
254 (check_constexpr_ctor_body): Use it; add bool parameter.
255 (build_data_member_initialization): Handle BIND_EXPR and
256 USING_STMT in the main conditional.
257 (build_constexpr_constructor_member_initializers): Do not
258 handle BIND_EXPR here.
259 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
260 (massage_constexpr_body): Don't do it here.
261 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
262 Adjust check_constexpr_ctor_body call.
263 (cp_parser_compound_statement): Do not pedwarn for compound-statement
264 in constexpr function in C++14 mode.
265 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
266
267 2014-10-09 Jason Merrill <jason@redhat.com>
268
269 PR c++/63309
270 * parser.c (cp_parser_class_head): push_template_decl for members
271 of templates, too.
272
273 PR c++/63415
274 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
275 (iterative_hash_template_arg): Likewise.
276
277 PR c++/63437
278 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
279 * semantics.c (force_paren_expr): And set it.
280 * typeck.c (check_return_expr): And handle it.
281
282 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
283
284 * decl.c (grokdeclarator): constexpr only implies const in C++11.
285
286 2014-10-08 Jason Merrill <jason@redhat.com>
287
288 PR c++/63405
289 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
290
291 PR c++/63485
292 * tree.c (build_cplus_array_type): Look for a type with no
293 typedef-name or attributes.
294
295 * call.c (call_copy_ctor): New.
296 (build_over_call): Use it to avoid infinite recursion on invalid code.
297
298 2014-10-07 Jason Merrill <jason@redhat.com>
299
300 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
301
302 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
303
304 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
305
306 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
307
308 PR c++/55250
309 * semantics.c (check_constexpr_bind_expr_vars): New.
310 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
311 (build_constexpr_constructor_member_initializers): Handle
312 BIND_EXPR in the main conditional.
313
314 2014-10-02 Mark Wielaard <mjw@redhat.com>
315
316 PR debug/63239
317 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
318 (cp_function_decl_deleted_p): New prototype.
319 * cp-objcp-common.c (cp_function_deleted_p): New function.
320
321 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
322
323 PR c++/54427
324 PR c++/57198
325 PR c++/58845
326 * typeck.c (cp_build_binary_op): save_expr after convert to save
327 redundant operations.
328 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
329 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
330
331 2014-10-03 Jason Merrill <jason@redhat.com>
332
333 * decl.c (start_decl): Complain about static/thread_local vars
334 in constexpr function.
335 (check_for_uninitialized_const_var): Also uninitialized vars.
336 * parser.c (cp_parser_jump_statement): And gotos.
337 (cp_parser_asm_operand_list): And asm.
338 (cp_parser_try_block): And try.
339 * semantics.c (ensure_literal_type_for_constexpr_object): And
340 non-literal.
341
342 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
343 (var_in_constexpr_fn): New.
344 (cxx_eval_constant_expression): Look into DECL_INITIAL.
345 (potential_constant_expression_1): Allow constexpr-local vars.
346
347 PR c++/63362
348 * tree.c (strip_typedefs): Handle TREE_LIST.
349
350 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
351
352 * parser.c (cp_parser_assignment_expression,
353 cp_parser_constant_expression): Add default arguments.
354 (cp_parser_primary_expression,
355 cp_parser_postfix_open_square_expression,
356 cp_parser_parenthesized_expression_list,
357 cp_parser_question_colon_clause,
358 cp_parser_expression, cp_parser_constant_expression,
359 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
360 cp_parser_template_argument, cp_parser_enumerator_definition,
361 cp_parser_member_declaration, cp_parser_constant_initializer,
362 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
363 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
364 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
365 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
366 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
367 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
368 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
369
370 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
371
372 PR c++/53025
373 * cp-tree.h (struct saved_scope): Add noexcept_operand.
374 (cp_noexcept_operand): Define.
375 * call.c (build_over_call): Use it.
376 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
377 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
378
379 2014-10-01 Jason Merrill <jason@redhat.com>
380
381 PR c++/63362
382 * method.c (constructible_expr): Handle value-init of non-class.
383 * parser.c (cp_parser_trait_expr): Allow pack expansion.
384 * pt.c (tsubst_copy_and_build): Handle pack expansion.
385
386 PR c++/63362
387 * class.c (type_has_non_user_provided_default_constructor): Rename
388 from type_has_user_provided_default_constructor, reverse sense.
389 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
390 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
391 * call.c (build_new_method_call_1): Adjust.
392 * cp-tree.h: Adjust.
393 * decl.c (grok_special_member_properties): Don't set
394 TYPE_HAS_COMPLEX_DFLT.
395 * init.c (build_value_init_noctor): Don't use
396 type_has_user_provided_default_constructor.
397
398 2014-09-30 Jason Merrill <jason@redhat.com>
399
400 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
401 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
402 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
403 * parser.c (cp_parser_primary_expression): Likewise.
404 (cp_parser_trait_expr): Likewise. Handle variadic trait.
405 * semantics.c (trait_expr_value): Likewise.
406 (finish_trait_expr): Likewise.
407 (check_trait_type): Handle variadic trait. Return bool.
408 * method.c (build_stub_object): Add rvalue reference here.
409 (locate_fn_flags): Not here.
410 (check_nontriv, assignable_expr, constructible_expr): New.
411 (is_trivially_xible): New.
412
413 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
414 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
415 * parser.c (cp_parser_primary_expression): Likewise.
416 (cp_parser_trait_expr): Likewise.
417 * semantics.c (trait_expr_value): Likewise.
418 (finish_trait_expr): Likewise.
419
420 * method.c (build_stub_object): Use CONVERT_EXPR.
421 * tree.c (build_dummy_object): Likewise.
422 (is_dummy_object): Adjust.
423
424 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
425 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
426 * semantics.c (trait_expr_value): Likewise.
427 (finish_trait_expr): Likewise.
428 * parser.c (cp_parser_primary_expression): Likewise.
429 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
430
431 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
432
433 PR c++/16564
434 * error.c (print_instantiation_context): Delete.
435 * typeck2.c (build_x_arrow): Record location when pushing
436 template instantiation.
437 * pt.c (push_tinst_level): Make it a wrapper around ...
438 (push_tinst_level_loc): ... this. New function. Make excessive
439 template instantiation depth a fatal error. Record location. Use
440 bool as return type.
441 (instantiate_pending_templates): Make excessive
442 template instantiation depth a fatal error.
443 (problematic_instantiation_changed): Use bool as return type.
444 * cp-tree.h (print_instantiation_context): Delete.
445 (push_tinst_level): Update declaration.
446 (problematic_instantiation_changed): Likewise.
447 (push_tinst_level_loc): New.
448
449 2014-09-29 Richard Biener <rguenther@suse.de>
450
451 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
452 for conversions.
453
454 2014-09-26 Jason Merrill <jason@redhat.com>
455
456 * mangle.c (find_substitution): Use write_abi_tags.
457
458 2014-09-25 Marek Polacek <polacek@redhat.com>
459
460 PR c++/61945
461 * class.c (warn_hidden): Check for FUNCTION_DECL.
462
463 2014-09-25 Jakub Jelinek <jakub@redhat.com>
464
465 PR c++/63249
466 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
467 on low_bound and length.
468
469 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
470
471 * class.c, decl.c, optimize.c: Rename all instances of
472 DECL_ABSTRACT to DECL_ABSTRACT_P.
473
474 2014-09-24 Marek Polacek <polacek@redhat.com>
475
476 PR c/61405
477 PR c/53874
478 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
479 * tree.c (bot_manip): Add default case.
480 * parser.c (cp_parser_primary_expression): Cast the controlling
481 expression of a switch to an int.
482 (cp_parser_unqualified_id): Likewise.
483
484 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
485
486 PR c++/61857
487 * parser.c (cp_parser_skip_to_closing_square_bracket,
488 cp_parser_array_designator_p): New.
489 (cp_parser_initializer_list): Use the latter.
490
491 2014-09-22 Jason Merrill <jason@redhat.com>
492
493 * semantics.c (finish_non_static_data_member): In diagnostic, give
494 error at point of use and note at point of declaration.
495
496 PR c++/63320
497 PR c++/60463
498 PR c++/60755
499 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
500 not finding 'this'.
501
502 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
503
504 PR c++/62219
505 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
506
507 2014-09-22 Jason Merrill <jason@redhat.com>
508
509 * decl.c (poplevel): Don't warn about unused vars in template scope.
510 * error.c (dump_decl): Handle variable templates.
511
512 2014-09-20 Jason Merrill <jason@redhat.com>
513
514 PR c++/62017
515 * decl.c (begin_destructor_body): Only clobber the as-base part of
516 *this.
517
518 2014-09-19 Jason Merrill <jason@redhat.com>
519
520 PR c++/61392
521 * mangle.c (write_expression): Use unresolved-name mangling for
522 DR850 case.
523
524 PR c++/61465
525 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
526 after pulling out an element from a CONSTRUCTOR.
527
528 2014-09-18 Jakub Jelinek <jakub@redhat.com>
529
530 PR c++/63248
531 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
532 on type of type dependent expressions, and don't call it if
533 handle_omp_array_sections has kept TREE_LIST because something
534 was type dependent.
535 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
536 Use keep_next_level, begin_omp_structured_block and
537 finish_omp_structured_block instead of push_stmt_list and
538 pop_stmt_list.
539
540 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
541
542 PR c++/62232
543 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
544 for final class types.
545
546 2014-09-15 Jason Merrill <jason@redhat.com>
547
548 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
549 necessary. Call inherit_targ_abi_tags here.
550 * class.c (check_bases_and_members): Not here.
551 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
552 * cp-tree.h: Declare inherit_targ_abi_tags.
553
554 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
555
556 Do not diagnose lambda default arguments in c++14 modes.
557 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
558 conditional.
559
560 2014-09-15 Jakub Jelinek <jakub@redhat.com>
561
562 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
563 number.
564
565 2014-09-13 Marek Polacek <polacek@redhat.com>
566
567 PR c++/60862
568 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
569 location of a call expression.
570
571 2014-09-11 Jason Merrill <jason@redhat.com>
572
573 PR c++/63201
574 * decl.c (start_decl): Handle specialization of member variable
575 template.
576 * pt.c (check_explicit_specialization): Adjust error.
577
578 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
579
580 PR c++/61489
581 * typeck2.c (process_init_constructor_record): Do not warn about
582 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
583
584 2014-09-11 Jason Merrill <jason@redhat.com>
585
586 PR c++/63139
587 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
588 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
589
590 2014-09-10 Jason Merrill <jason@redhat.com>
591
592 PR c++/61659
593 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
594 (duplicate_decls, start_decl): Likewise.
595 * pt.c (check_explicit_specialization): Likewise.
596 (push_template_decl_real): Or static templates.
597
598 2014-09-08 Jason Merrill <jason@redhat.com>
599
600 * typeck.c (build_class_member_access_expr): Move
601 -Winvalid-offsetof code...
602 * semantics.c (finish_offsetof): ...here.
603 * parser.c (cp_parser_builtin_offsetof): Remember the location of
604 the type argument.
605 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
606
607 PR c++/62255
608 * pt.c (instantiate_decl): Handle recursive instantiation of
609 static data member.
610
611 2014-09-05 Jason Merrill <jason@redhat.com>
612
613 PR c++/62659
614 * semantics.c (potential_constant_expression_1): Handle un-folded
615 pointer to member constants.
616
617 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
618
619 PR ipa/61659
620 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
621 newdecl, not olddecl.
622
623 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
624
625 DR 1453
626 * class.c (check_field_decls): A class of literal type cannot have
627 volatile non-static data members and base classes.
628 (explain_non_literal_class): Update.
629
630 2014-09-02 Jakub Jelinek <jakub@redhat.com>
631 Balaji V. Iyer <balaji.v.iyer@intel.com>
632 Igor Zamyatin <igor.zamyatin@intel.com>
633
634 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
635 simplified.
636 * parser.c (cp_parser_cilk_for): New function.
637 (cp_parser_cilk_grainsize): Likewise.
638 (cp_parser_statement): Added RID_CILK_FOR case.
639 (cp_parser_omp_for_cond): Added CILK_FOR check.
640 (cp_parser_omp_for_loop_init): Change function argument to accept
641 tree_code instead just a bool flag; change the check to use that
642 tree_code; check for initialization declaration in case of Cilk_for.
643 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
644 changed call to cp_parser_omp_for_loop_init according new arguments'
645 list.
646 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
647 * pt.c (tsubst_expr): Added CILK_FOR case.
648 * semantics.c: Include convert.h.
649 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
650 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
651 (handle_omp_for_class_iterator): New argument lastp and its usage;
652 added NE_EXPR case.
653 (finish_omp_for): Changed call to handle_omp_for_class_iterator
654 according new arguments' list; in case of Cilk_for save very first
655 decl and create empty stmt_list block; use block to build correct
656 statement tree.
657
658 2014-08-31 Jason Merrill <jason@redhat.com>
659
660 PR c++/62302
661 * optimize.c (cdtor_comdat_group): Just look at the
662 DECL_ASSEMBLER_NAME of the 'tors.
663
664 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
665
666 PR c++/52892
667 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
668 result of cxx_eval_constant_expression.
669
670 2014-08-26 Jason Merrill <jason@redhat.com>
671
672 PR c++/58624
673 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
674 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
675 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
676 template.
677
678 2014-08-25 Jason Merrill <jason@redhat.com>
679
680 * pt.c (check_explicit_specialization): Don't complain about
681 non-template variable.
682 (template_for_substitution): Allow variable templates.
683 (check_template_variable): Fix logic for member var template.
684 * decl.c (start_decl): Don't complain about extra template header
685 here.
686
687 * decl.c (start_decl): Look through member variable template.
688 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
689 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
690 variables.
691
692 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
693
694 PR c++/34938
695 * cp-tree.h (TFF_POINTER): Add.
696 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
697 argument too.
698 * error.c (dump_type_suffix): Actually print the const and noreturn
699 attribute when appropriate.
700
701 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
702
703 * decl.c (compute_array_index_type, grokdeclarator,
704 undeduced_auto_decl): Change from cxx1y to cxx14.
705 *lambda.c(add_capture()): Change error message from C++1y to C++14.
706 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
707 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
708 cp_parser_decltype, cp_parser_conversion_type_id,
709 cp_parser_simple_type_specifier, cp_parser_type_id_1,
710 cp_parser_template_type_arg, cp_parser_std_attribute,
711 cp_parser_template_declaration_after_export): Ditto.
712 * pt.c (tsubst): Ditto.
713 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
714 * tree.c: Change comment.
715 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
716 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
717
718 2014-08-23 Jason Merrill <jason@redhat.com>
719
720 Allow non-constexpr variable templates.
721 * decl2.c (note_variable_template_instantiation): New.
722 * cp-tree.h: Declare it.
723 * pt.c (instantiate_decl): Call it.
724 (push_template_decl_real): Allow non-constexpr variable templates.
725 * semantics.c (finish_id_expression): Mark the variable template
726 instantiation as used.
727 * mangle.c (write_mangled_name): Variable template instantiations
728 are mangled.
729 * parser.c (cp_parser_init_declarator): Complain about
730 non-function implicit templates.
731
732 2014-08-22 Marek Polacek <polacek@redhat.com>
733
734 PR c++/62199
735 * parser.c (cp_parser_binary_expression): Check each LHS if it's
736 preceded with logical not. Adjust call to
737 warn_logical_not_parentheses.
738
739 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
740
741 PR c++/57709
742 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
743 declaration shadows a function declaration, unless the former
744 declares a function, pointer to function or pointer to member
745 function, because this is a common and valid case in real-world
746 code.
747 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
748 Improve description.
749
750 2014-08-22 Jason Merrill <jason@redhat.com>
751
752 PR c++/62129
753 * class.c (outermost_open_class): Fix logic.
754 * decl.c (complete_vars): Fix logic.
755
756 2014-08-22 Jason Merrill <jason@redhat.com>
757
758 PR c++/62129
759 * class.c (outermost_open_class): New.
760 * cp-tree.h: Declare it.
761 * decl.c (maybe_register_incomplete_var): Use it.
762 (complete_vars): Handle any constant variable.
763 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
764
765 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
766
767 PR other/62008
768 * cp-array-notation.c (build_array_notation_ref): Added correct
769 handling of case with incorrect array.
770
771 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
772
773 PR fortran/44054
774 * error.c (cp_diagnostic_finalizer): Delete.
775 (init_error): Do not set diagnostic_finalizer here.
776
777 2014-08-19 Marek Polacek <polacek@redhat.com>
778
779 PR c++/62153
780 * call.c (build_new_op_1): Remember the type of arguments for
781 a comparison. If either operand of a comparison is a boolean
782 expression, call maybe_warn_bool_compare.
783
784 2014-08-19 Jason Merrill <jason@redhat.com>
785
786 PR tree-optimization/62091
787 * decl2.c (decl_needed_p): Return true for virtual functions when
788 devirtualizing.
789
790 PR lto/53808
791 PR c++/61659
792 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
793 comdat_linkage.
794
795 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
796
797 * class.c (contains_empty_class_p): Remove.
798
799 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
800
801 * parser.c (cp_parser_expression): Add default arguments.
802 (cp_parser_primary_expression, cp_parser_postfix_expression,
803 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
804 cp_parser_unary_expression, cp_parser_direct_new_declarator,
805 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
806 cp_parser_lambda_body, cp_parser_expression_statement,
807 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
808 cp_parser_iteration_statement, cp_parser_jump_statement,
809 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
810 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
811 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
812 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
813 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
814 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
815 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
816 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
817 cp_parser_transaction_expression): Adjust.
818
819 2014-08-15 Jason Merrill <jason@redhat.com>
820
821 PR c++/61566
822 * pt.c (lookup_template_class_1): Revert recent change.
823 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
824
825 PR c++/61566
826 * pt.c (instantiate_class_template_1): Ignore lambda on
827 CLASSTYPE_DECL_LIST.
828 (push_template_decl_real): A lambda is not primary.
829 (lookup_template_class_1): Don't look for a lambda partial
830 instantiation.
831 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
832 currently in a function and the lambda living in a function.
833 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
834
835 2014-08-15 Richard Biener <rguenther@suse.de>
836 Jason Merrill <jason@redhat.com>
837
838 PR bootstrap/62077
839 * tree.c (build_min_array_type, set_array_type_canon): Split out...
840 (build_cplus_array_type): ...from here. Only call build_array_type
841 for main variants.
842
843 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
844
845 PR c++/62072
846 Revert:
847 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
848
849 DR 1584
850 PR c++/57466
851 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
852 cv-qualifiers of function types.
853
854 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
855
856 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
857
858 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
859
860 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
861 cp_build_array_ref, cp_build_function_call_vec): When a
862 pedwarn is suppressed under SFINAE, return error_mark_node.
863
864 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
865 tf_warning_or_error, where complain is a bool, glitch.
866
867 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
868
869 PR c++/62101
870 * decl.c (grokdeclarator): Move the check for friend initializers..
871 * decl2.c (grokfield) ..here. Postpone early return for friends
872 until after the initializer check.
873
874 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
875
876 PR c++/54377
877 * pt.c (coerce_template_parms): Improve error message vs default
878 arguments.
879
880 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
881
882 * parser.c (cp_parser_init_declarator): Remove redundant check of
883 decl_specifiers->type.
884
885 2014-08-13 Jason Merrill <jason@redhat.com>
886
887 * call.c (build_x_va_arg): Support passing non-POD through ....
888 (convert_arg_to_ellipsis): Likewise.
889
890 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
891
892 * pt.c (lookup_template_variable): Make dependent variable templates
893 have unknown type.
894
895 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
896
897 * parser.c (cp_parser_elaborated_type_specifier): Handle
898 specially cp_parser_template_id returning a BASELINK.
899
900 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
901
902 * parser.c (cp_parser_diagnose_invalid_type_name,
903 cp_parser_make_typename_type): Remove scope parameter.
904 (cp_parser_parse_and_diagnose_invalid_type_name,
905 cp_parser_elaborated_type_specifier): Adjust calls.
906
907 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
908
909 Reject virt-specifiers on friends and member templates
910 * friend.c (do_friend): Diagnose virt-specifiers.
911 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
912
913 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
914
915 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
916 return type to bool; in C++11 for constants give errors, not pedwarns.
917 * cp-tree.h (check_narrowing): Adjust declaration.
918 * call.c (convert_like_real): Update calls.
919 * semantics.c (finish_compound_literal): Likewise.
920
921 2014-08-08 Jason Merrill <jason@redhat.com>
922
923 * pt.c (lookup_template_class_1): Copy abi_tag.
924
925 2014-08-08 Kai Tietz <ktietz@redhat.com>
926
927 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
928 that we operate on a true inline.
929
930 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
931
932 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
933 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
934
935 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
936
937 PR c++/51312
938 * decl.c (build_enumerator): Handle class types with conversion
939 operators via perform_implicit_conversion_flags and
940 build_expr_type_conversion.
941
942 * cvt.c (build_expr_type_conversion): Replace pair of errors
943 with error + inform.
944
945 2014-08-07 Jason Merrill <jason@redhat.com>
946
947 PR c++/62043
948 * parser.c (c_parse_file): Change sorry to fatal_error.
949
950 PR c++/61959
951 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
952
953 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
954
955 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
956
957 2014-08-06 Jason Merrill <jason@redhat.com>
958
959 * init.c (build_vec_init): Fix constant initialization of
960 trailing elements.
961 (build_value_init_noctor): Call maybe_constant_init.
962 * semantics.c (maybe_constant_init): See through EXPR_STMT and
963 conversion to void.
964
965 PR c++/60417
966 * init.c (build_vec_init): Reorganize earlier change a bit.
967
968 PR c++/61994
969 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
970 if we're just returning an INIT_EXPR.
971
972 2014-08-06 Jason Merrill <jason@redhat.com>
973 Braden Obrzut <admin@maniacsvault.net>
974
975 * pt.c (check_explicit_specialization): Don't test
976 DECL_DECLARED_INLINE_P for a variable template.
977
978 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
979
980 PR c++/43906
981 * typeck.c (cp_build_binary_op): Extend to more cases the
982 -Waddress warning.
983
984 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
985
986 Implement constexpr variable templates
987 * decl.c (grokvardecl): Handle specializations of variable templates.
988 (grokdeclarator): Handle variable template id expressions and NULL_TREE
989 return from grokvardecl.
990 * decl2.c (check_member_template): Allow declaration of template member
991 variables.
992 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
993 variable templates.
994 * pt.c (check_template_variable): Accept variable temploids at
995 non-class scope.
996 (push_template_decl_real): The current instantiation of a template
997 can be a VAR_DECL.
998 (determine_specialization): Accept variable templates.
999 (check_explicit_specialization): Handle and check for malformed
1000 variable template specializations.
1001 (lookup_template_variable): New.
1002 (tsubst_decl): Handle variable template specializations.
1003 (do_decl_instantiation): Handle template variables.
1004 (instantiate_decl): Handle template variables.
1005 * semantics.c (finish_template_variable): New.
1006 (finish_id_expression): Instantiate variable templates.
1007 * cp-tree.h (variable_template_p): New.
1008
1009 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1010
1011 PR c++/15339
1012 * decl.c (check_redeclaration_no_default_args): New.
1013 (duplicate_decls): Use it, handle default arguments
1014 in redeclarations of function templates.
1015
1016 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1017
1018 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1019
1020 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1021
1022 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1023 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1024 instead of pointer_set.
1025
1026 2014-08-01 Jason Merrill <jason@redhat.com>
1027
1028 PR c++/60417
1029 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1030 init-list for trailing elements.
1031 * typeck2.c (process_init_constructor_array): Likewise.
1032
1033 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1034
1035 DR 217 again
1036 * decl.c (duplicate_decls): Handle static member functions too.
1037
1038 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1039
1040 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1041 in error output.
1042
1043 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1044
1045 PR other/61963
1046 * parser.c (cp_parser_array_notation): Added check for array_type.
1047
1048 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1049
1050 PR middle-end/61455
1051 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1052 DECL_EXPR improved. Changed handling for INIT_EXPR.
1053
1054 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1055
1056 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1057
1058 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1059
1060 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1061 -fsanitize=alignment call ubsan_maybe_instrument_reference
1062 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1063 for calls to member functions.
1064
1065 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1066
1067 PR c++/60517
1068 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1069 whether it is returning the address of a local variable.
1070 (check_return_expr): Return 0 instead of the address of a local
1071 variable.
1072
1073 2014-07-30 Jason Merrill <jason@redhat.com>
1074
1075 PR lto/53808
1076 PR c++/61659
1077 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1078
1079 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1080
1081 PR c++/57397
1082 * pt.c (unify_arity): Add boolean parameter.
1083 (unify_too_few_arguments): Likewise.
1084 (type_unification_real): Diagnose correctly insufficient
1085 arguments in the presence of trailing variadic parameters;
1086 deducing multiple trailing packs as empty is fine.
1087
1088 2014-07-30 Jason Merrill <jason@redhat.com>
1089
1090 PR c++/61659
1091 PR c++/61687
1092 Revert:
1093 * decl2.c (mark_all_virtuals): New variable.
1094 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1095 (cp_write_global_declarations): Set it and give helpful diagnostic
1096 if it introduces errors.
1097 * class.c (finish_struct_1): Check it.
1098
1099 PR lto/53808
1100 PR c++/61659
1101 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1102 (check_explicit_specialization): Clear it on specializations.
1103 * decl.c (duplicate_decls, start_decl): Likewise.
1104 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1105 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1106 linkage after setting the appropriate flags.
1107 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1108 * decl2.c (mark_needed): Mark clones.
1109 (import_export_decl): Not here.
1110
1111 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1112
1113 Implement N4051 - Allow typename in a template template parameter
1114 * parser.c (cp_parser_type_parameter_key): New funtion;
1115 (cp_parser_token_is_type_parameter_key): Ditto;
1116 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1117 but pedwarn for less than cxx1z.
1118
1119 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1120
1121 PR c++/50961
1122 * call.c (standard_conversion): Use resolve_nondeduced_context
1123 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1124
1125 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1126
1127 PR c++/61804
1128 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1129 for '++' and '--'.
1130
1131 2014-07-15 Jason Merrill <jason@redhat.com>
1132
1133 PR c++/61811
1134 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1135
1136 PR c++/60848
1137 PR c++/61723
1138 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1139 * class.c (finish_struct): Reject invalid definition of
1140 std::initializer_list.
1141
1142 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1143
1144 * call.c (convert_like_real): Call print_z_candidate and inform only
1145 if permerror returns true.
1146
1147 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1148
1149 * class.c (build_clone): Do not clear assembler names of
1150 templates.
1151 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1152 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1153 as a special case return sizeof (struct tree_decl_non_common)
1154 for other decls.
1155 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1156 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1157 * cp/cp-tree.h (tree_template_decl): New structure.
1158 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1159 (union cp_lang_tree_node): Add template_decl.
1160 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1161
1162 2014-07-14 Jason Merrill <jason@redhat.com>
1163
1164 PR c++/61445
1165 PR c++/56947
1166 * pt.c (instantiate_decl): Don't check defer_ok for local class
1167 members.
1168
1169 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR middle-end/61294
1172 * cp-tree.h (LITERAL_ZERO_P): Define.
1173 * parser.c (cp_parser_parenthesized_expression_list): Add
1174 want_literal_zero_p argument, if true, for literal zeros
1175 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1176 (cp_parser_postfix_expression): Adjust
1177 cp_parser_parenthesized_expression_list caller, handle
1178 -Wmemset-transposed-args.
1179 (literal_zeros): New variable.
1180
1181 2014-07-13 Jason Merrill <jason@redhat.com>
1182
1183 PR c++/58511
1184 * semantics.c (is_instantiation_of_constexpr): Return true for
1185 defaulted functions, too.
1186 (explain_invalid_constexpr_fn): Only use
1187 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1188 * method.c (explain_implicit_non_constexpr): Pass
1189 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1190
1191 PR c++/58611
1192 * decl.c (check_initializer): Don't finish_compound_literal
1193 on erroneous constexpr init.
1194
1195 PR c++/58612
1196 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1197
1198 PR c++/60628
1199 * decl.c (create_array_type_for_decl): Only check for auto once.
1200
1201 PR c++/58636
1202 * call.c (build_list_conv): Don't try to build a list of references.
1203
1204 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1205
1206 PR C++/60209 - Declaration of user-defined literal operator cause error
1207 * parser.c (cp_parser_operator): Fold treatment of strings
1208 and user-defined string literals. Use the full string parser.
1209 (cp_parser_string_literal): Add flag to not look for literal operator.
1210
1211 2014-07-11 Jason Merrill <jason@redhat.com>
1212
1213 PR c++/22434
1214 PR c++/61288
1215 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1216
1217 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1218
1219 PR c++/53159
1220 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1221 into convflags.
1222 * decl.c (check_initializer): Don't call check_narrowing here,
1223 set LOOKUP_NO_NARROWING.
1224 * typeck2.c (digest_init_r): Likewise.
1225
1226 2014-07-10 Jason Merrill <jason@redhat.com>
1227
1228 PR c++/61661
1229 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1230
1231 PR c++/61659
1232 PR c++/61687
1233 * decl2.c (mark_all_virtuals): New variable.
1234 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1235 (cp_write_global_declarations): Set it and give helpful diagnostic
1236 if it introduces errors.
1237 * class.c (finish_struct_1): Check it.
1238 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1239
1240 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1241
1242 PR c++/60686
1243 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1244 outside class declaration, in friend declaration, and neither on
1245 constructor nor conversion operator.
1246
1247 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1248
1249 DR 1584
1250 PR c++/57466
1251 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1252 cv-qualifiers of function types.
1253
1254 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1255 Paolo Carlini <paolo.carlini@oracle.com>
1256
1257 PR c++/59361
1258 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1259 CPP_ELLIPSIS too.
1260
1261 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1262
1263 * class.c (check_for_override): Wrap the 'final' and 'override'
1264 keywords in %< and %>.
1265
1266 2014-07-06 Marek Polacek <polacek@redhat.com>
1267
1268 PR c/6940
1269 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1270 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1271 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1272 function parameter.
1273
1274 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1275
1276 * pt.c (convert_template_argument): Use inform instead of error in
1277 three places.
1278
1279 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1280
1281 PR c++/58781
1282 PR c++/60249
1283 PR c++/59867
1284 * parser.c (cp_parser_userdef_string_literal): Take a tree
1285 not a cp_token*.
1286 (cp_parser_string_literal): Don't hack the token stream.
1287
1288 2014-06-30 Jason Merrill <jason@redhat.com>
1289
1290 PR c++/61659
1291 PR lto/53808
1292 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1293 devirtualizing.
1294 * init.c (build_vtbl_address): Don't mark destructor.
1295 * class.c (finish_struct_1): Add all classes to keyed_classes
1296 if devirtualizing.
1297
1298 PR c++/61647
1299 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1300
1301 PR c++/61566
1302 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1303
1304 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1305 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1306 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1307 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1308 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1309 * pt.c (unify): Also check whether the argument is a PMF.
1310
1311 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1312
1313 PR c++/54891
1314 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1315 a '[' can also start a primary-expression.
1316 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1317 when cp_parser_tokens_start_cast_expression returns -1.
1318
1319 2014-06-30 Jason Merrill <jason@redhat.com>
1320
1321 PR c++/61539
1322 * pt.c (unify_one_argument): Type/expression mismatch just causes
1323 deduction failure.
1324
1325 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1326 2014-04-11 change.
1327
1328 2014-06-30 Marek Polacek <polacek@redhat.com>
1329
1330 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1331 function has no_sanitize_undefined attribute.
1332 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1333 function has no_sanitize_undefined attribute.
1334
1335 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1336
1337 PR middle-end/57541
1338 * cp-array-notation.c (expand_sec_reduce_builtin):
1339 Check that bultin argument is correct.
1340 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1341
1342 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1343
1344 DR 1579
1345 PR c++/58051
1346 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1347 types aren't the same.
1348
1349 2014-06-27 Jason Merrill <jason@redhat.com>
1350
1351 PR c++/61433
1352 * error.c (dump_template_bindings): Don't tsubst in a clone.
1353
1354 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1355
1356 PR c++/61614
1357 * semantics.c (finish_compound_literal): Revert r204228.
1358
1359 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1360
1361 * parser.c (cp_parser_compound_literal_p): New.
1362 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1363
1364 2014-06-26 Jason Merrill <jason@redhat.com>
1365
1366 * parser.c (cp_parser_for_init_statement): Change range-for error
1367 to pedwarn.
1368
1369 N3994 Ranged-based for-loops: The Next Generation
1370 * parser.c (cp_lexer_nth_token_is): New.
1371 (cp_parser_for_init_statement): Allow "for (id : init)".
1372
1373 2014-06-26 Teresa Johnson <tejohnson@google.com>
1374
1375 * class.c (dump_class_hierarchy): Use saved dump files.
1376 (dump_vtable): Ditto.
1377 (dump_vtt): Ditto.
1378
1379 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1380
1381 PR c++/61537
1382 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1383 parameter lists outside of function parameter scope.
1384
1385 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1386
1387 DR 178
1388 PR c++/49132
1389 * typeck2.c (process_init_constructor_record): Do not complain about
1390 uninitialized const members, because within aggregate-initialization,
1391 members without explicit initializers are value-initialized.
1392
1393 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1394
1395 * semantics.c (finish_omp_clauses): Make sure
1396 OMP_CLAUSE_LINEAR_STEP has correct type.
1397
1398 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1399
1400 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1401 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1402 FUNCTION_DECL check.
1403 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1404 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1405 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1406 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1407
1408 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1409
1410 PR c++/33972
1411 * decl.c (grokdeclarator): Do not early check for operator-function-id
1412 as non-function.
1413
1414 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1415
1416 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1417 Adjust.
1418
1419 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1420
1421 * parser.c (cp_parser_omp_for_loop): For
1422 #pragma omp parallel for simd move lastprivate clause from parallel
1423 to for rather than simd.
1424
1425 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1426
1427 DR 577
1428 PR c++/33101
1429 * decl.c (grokparms): Accept a single parameter of type 'void'.
1430
1431 2014-06-20 Jason Merrill <jason@redhat.com>
1432
1433 PR c++/59296
1434 * call.c (add_function_candidate): Avoid special 'this' handling
1435 if we have a ref-qualifier.
1436
1437 PR c++/61556
1438 * call.c (build_over_call): Call build_this in template path.
1439
1440 2014-06-19 Jason Merrill <jason@redhat.com>
1441
1442 PR c++/59296
1443 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1444
1445 2014-06-18 Jason Merrill <jason@redhat.com>
1446
1447 PR c++/59296
1448 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1449 ref-qualifier handling.
1450
1451 PR c++/61507
1452 * pt.c (resolve_overloaded_unification): Preserve
1453 ARGUMENT_PACK_EXPLICIT_ARGS.
1454
1455 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1456
1457 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1458 argument.
1459 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1460
1461 2014-06-17 Jason Merrill <jason@redhat.com>
1462
1463 PR c++/60605
1464 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1465
1466 2014-06-15 Jason Merrill <jason@redhat.com>
1467
1468 PR c++/61488
1469 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1470
1471 PR c++/61500
1472 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1473
1474 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1475
1476 * decl.c (grokvardecl): Fix pasto in previous patch.
1477
1478 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1479
1480 * decl.c (duplicate_decls): Use set_decl_tls_model.
1481 (grokdeclarator): Likewise.
1482 * semantics.c (finish_id_expression): Check TLS only for
1483 static variables.
1484 (finish_omp_threadprivate): Use decl_default_tls_model.
1485 * decl2.c (get_guard): Likewise.
1486 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1487
1488 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1489
1490 PR c++/33101
1491 * decl.c (grokparms): Improve error message about void parameters.
1492 * error.c (type_to_string): Fix aka cut off code.
1493
1494 2014-06-12 Jason Merrill <jason@redhat.com>
1495
1496 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1497 * cvt.c (type_promotes_to): Likewise.
1498 * mangle.c (write_type, write_expression): Likewise.
1499 (write_name, write_template_arg): Likewise.
1500 (mangle_decl): Make alias based on flag_abi_compat_version.
1501 Emit -Wabi warning here.
1502 (finish_mangling_internal): Not here. Drop warn parm.
1503 (finish_mangling_get_identifier, finish_mangling): Adjust.
1504 (mangle_type_string, mangle_special_for_type): Adjust.
1505 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1506 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1507 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1508
1509 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1510 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1511 (layout_nonempty_base_or_field, end_of_class): Likewise.
1512 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1513 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1514 (layout_virtual_bases): Likewise.
1515 * decl.c (compute_array_index_type): Likewise.
1516 * mangle.c (write_mangled_name, write_prefix): Likewise.
1517 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1518 (write_template_arg, write_array_type): Likewise.
1519 * method.c (lazily_declare_fn): Likewise.
1520 * rtti.c (get_pseudo_ti_index): Likewise.
1521 * typeck.c (comp_array_types): Likewise.
1522
1523 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1524
1525 * vtable-class-hierarchy.c: Update handling for section names
1526 that are no longer trees.
1527 * decl.c (duplicate_decls): Likewise.
1528
1529 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1530
1531 PR c++/19200
1532 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1533 to cp_parser_declarator.
1534
1535 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1536
1537 PR c++/60265
1538 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1539 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1540 message.
1541
1542 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1543
1544 PR c++/19200
1545 * parser.c (cp_parser_declarator): Add bool parameter.
1546 (cp_parser_direct_declarator): Likewise, use it.
1547 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1548 (cp_parser_condition, cp_parser_explicit_instantiation,
1549 cp_parser_init_declarator, cp_parser_type_id_1,
1550 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1551 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1552 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1553 Adjust.
1554 * decl.c (grokdeclarator): Fix handling of friend declared in
1555 namespace scope (g++.dg/parse/friend10.C).
1556
1557 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1558
1559 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1560 ->implicit_section.
1561 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1562 (maybe_clone_body): Move symbol across comdat groups.
1563 * method.c (use_thunk): Copy implicit section flag.
1564
1565 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1566
1567 PR c++/22556
1568 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1569
1570 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1571
1572 * method.c (use_thunk): Use set_decl_section_name.
1573 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1574 * decl.c (duplicate_decls): Likewise.
1575 * vtable-class-hierarchy.c: Likewise.
1576
1577 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1578
1579 PR c++/60184
1580 * class.c (check_field_decls): In C++11 mode do not reject
1581 static data members and reference-type members in unions.
1582
1583 2014-06-05 Jason Merrill <jason@redhat.com>
1584
1585 PR c++/43453
1586 * decl.c (check_initializer): Collapse a TREE_LIST here.
1587 * typeck2.c (store_init_value): Not here.
1588
1589 2014-06-05 Richard Biener <rguenther@suse.de>
1590 Paolo Carlini <paolo.carlini@oracle.com>
1591
1592 PR c++/56961
1593 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1594 handling of empty classes.
1595
1596 2014-06-04 Jason Merrill <jason@redhat.com>
1597
1598 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1599 for noexcept and thread_local, too.
1600
1601 PR c++/61343
1602 * decl.c (check_initializer): Maybe clear
1603 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1604
1605 2014-06-05 Richard Biener <rguenther@suse.de>
1606
1607 PR c++/61004
1608 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1609 warnings for accessing empty classes.
1610
1611 2014-06-05 Marek Polacek <polacek@redhat.com>
1612
1613 PR c/49706
1614 * parser.c (cp_parser_binary_expression): Warn when logical not is
1615 used on the left hand side operand of a comparison.
1616
1617 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1618
1619 PR c++/43453
1620 * typeck.c (cp_build_modify_expr): Handle array of characters
1621 initialized by a string literal.
1622 * decl.c (check_initializer): Handle parenthesized string literal
1623 as initializer.
1624 * typeck2.c (store_init_value): Remove redundant check.
1625
1626 2014-06-04 Jason Merrill <jason@redhat.com>
1627
1628 PR c++/51253
1629 PR c++/61382
1630 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1631 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1632
1633 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1634
1635 PR c/58942
1636 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1637 with a pointer.
1638
1639 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1640
1641 DR 1423
1642 PR c++/52174
1643 * call.c (standard_conversion): Convert nullptr to bool only
1644 in case of direct-initialization.
1645 (convert_like_real): Provide informative error message.
1646
1647 2014-06-03 Marek Polacek <polacek@redhat.com>
1648
1649 PR c/60439
1650 * semantics.c (finish_switch_cond): Warn if switch condition has
1651 boolean value.
1652
1653 2014-06-03 Jason Merrill <jason@redhat.com>
1654
1655 PR c++/60992
1656 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1657 variable to local_specializations.
1658
1659 PR c++/60848
1660 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1661
1662 2014-06-02 Jason Merrill <jason@redhat.com>
1663
1664 PR c++/61046
1665 * decl.c (reshape_init_class): Handle un-folded
1666 constant-expressions.
1667
1668 PR c++/61134
1669 * pt.c (pack_deducible_p): Handle canonicalization.
1670
1671 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1672
1673 * pt.c (tsubst_function_type): Initialize arg_types.
1674
1675 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1676
1677 PR debug/57519
1678 * class.c (handle_using_decl): Pass the correct scope to
1679 cp_emit_debug_info_for_using.
1680
1681 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1682
1683 PR c++/59483
1684 PR c++/61148
1685 * search.c (accessible_p): Use current_nonlambda_class_type.
1686 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1687
1688 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1689
1690 * decl.c: Include builtins.h.
1691 * semantics.c: Likewise.
1692
1693 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1694
1695 DR 1227
1696 PR c++/57543
1697 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1698 * pt.c (tsubst_function_type): Inject the this parameter; do the
1699 substitutions in the order mandated by the DR.
1700 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1701 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1702 (static_fn_type): Copy it.
1703 * decl2.c (build_memfn_type, change_return_type,
1704 cp_reconstruct_complex_type): Likewise.
1705 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1706 * tree.c (strip_typedefs): Likewise.
1707 * typeck.c (merge_types): Likewise.
1708
1709 2014-05-30 Jason Merrill <jason@redhat.com>
1710
1711 PR c++/56947
1712 * pt.c (instantiate_decl): Check that defer_ok is not set for
1713 local class members.
1714
1715 PR c++/60992
1716 * pt.c (tsubst_init): Split out from...
1717 (tsubst_expr) [DECL_EXPR]: Here.
1718 (tsubst_copy) [VAR_DECL]: Use it.
1719 * semantics.c (finish_id_expression): Return the decl for static/const.
1720
1721 2014-05-28 Jason Merrill <jason@redhat.com>
1722
1723 PR c++/47202
1724 * decl.c (cxx_comdat_group): Return a decl.
1725 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1726
1727 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1728 bound.
1729
1730 PR c++/61242
1731 * call.c (build_aggr_conv): Ignore passed in flags.
1732 (build_array_conv, build_complex_conv): Likewise.
1733
1734 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1735
1736 * optimize.c (maybe_thunk_body): Use set_comdat_group.
1737 (maybe_clone_body): Likewise.
1738 * decl.c (duplicate_decls): Update code duplicating comdat group;
1739 do not copy symtab pointer; before freeing newdecl remove it
1740 from symtab.
1741 * decl2.c (constrain_visibility): Use set_comdat_group.
1742
1743 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1744
1745 * rtti.c: Include tm_p.h
1746 (emit_tinfo_decl): Force RTTI data to be aligned to required
1747 ABI alignment only.
1748
1749 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1750
1751 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1752 ignoring other target adjustments.
1753
1754 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1755
1756 * semantics.c (finish_omp_clauses): Remove duplicated variable
1757 initialization.
1758
1759 * parser.c (cp_parser_omp_target): Return bool values.
1760
1761 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1762
1763 PR c++/61088
1764 * lambda.c (add_capture): Enforce that capture by value requires
1765 complete type.
1766 * typeck2.c (cxx_incomplete_type_inform): Early return if
1767 TYPE_MAIN_DECL is null.
1768
1769 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
1770
1771 PR c/61271
1772 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1773
1774 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1775
1776 PR c++/61133
1777 * lambda.c (build_capture_proxy, add_capture): Treat normal
1778 captures and init-captures identically.
1779
1780 2014-05-21 Mark Wielaard <mjw@redhat.com>
1781
1782 PR debug/16063
1783 * cp-lang.c (cxx_enum_underlying_base_type): New function.
1784 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1785
1786 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1787
1788 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1789 * cp-array-notation.c (replace_invariant_exprs): Likewise.
1790 (expand_array_notation): Handle VOID_CST.
1791 * error.c (dump_expr): Likewise.
1792 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1793 (cxx_pretty_printer::expression): Likewise.
1794 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1795 * decl.c (register_dtor_fn): Likewise.
1796 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1797 (build_delete, push_base_cleanups): Likewise.
1798 * mangle.c (write_expression): Likewise.
1799 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1800 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1801 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1802 * tree.c (cp_tree_equal): Likewise.
1803 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1804 instead of void_zero_node.
1805 * typeck.c (check_return_expr): Likewise.
1806 * typeck2.c (build_functional_cast): Likewise.
1807
1808 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
1809
1810 PR c/60189
1811 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1812 from here to...
1813 (cp_parser_statement): ...here. Make sure only semicolon can go after
1814 Cilk_sync.
1815
1816 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1817
1818 PR c++/58753
1819 PR c++/58930
1820 PR c++/58704
1821 * typeck2.c (digest_nsdmi_init): New.
1822 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1823 * init.c (get_nsdmi): Likewise.
1824 * cp-tree.h (digest_nsdmi_init): Declare.
1825
1826 2014-05-20 Jason Merrill <jason@redhat.com>
1827
1828 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1829 up a virtual function in a dummy object.
1830
1831 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1832
1833 PR c++/60373
1834 * decl.c (duplicate_decls): Replace pair of warning_at with
1835 warning_at + inform.
1836 (maybe_commonize_var): Likewise.
1837
1838 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1839
1840 PR bootstrap/61210
1841 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1842 (tsubst_copy_and_build): Perform recursive substitutions in a
1843 deterministic order.
1844
1845 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1846
1847 PR c++/58664
1848 * typeck2.c (cxx_incomplete_type_inform): New.
1849 (cxx_incomplete_type_diagnostic): Use it.
1850 * decl.c (grokdeclarator): Check the element type of an
1851 incomplete array type; call the above.
1852 * cp-tree.h (cxx_incomplete_type_inform): Declare.
1853
1854 2014-05-19 Jason Merrill <jason@redhat.com>
1855
1856 PR c++/58761
1857 * pt.c (tsubst_copy): Don't check at_function_scope_p.
1858 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1859
1860 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
1861
1862 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1863 * parser.c (cp_parser_enum_specifier): Likewise.
1864
1865 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1866
1867 * class.c (sorted_fields_type_new): Adjust.
1868 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1869 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1870 * cp-tree.h: Remove usage of variable_size gty attribute.
1871 * decl.c (make_label_decl): Adjust.
1872 (check_goto): Likewise.
1873 (start_preparsed_function): Likewise.
1874 (save_function_data): Likewise.
1875 * lex.c (init_reswords): Likewise.
1876 (retrofit_lang_decl): Likewise.
1877 (cxx_dup_lang_specific_decl): Likewise.
1878 (copy_lang_type): Likewise.
1879 (cxx_make_type): Likewise.
1880 * name-lookup.c (binding_entry_make): Likewise.
1881 (binding_table_construct): Likewise.
1882 (binding_table_new): Likewise.
1883 (cxx_binding_make): Likewise.
1884 (pushdecl_maybe_friend_1): Likewise.
1885 (begin_scope): Likewise.
1886 (push_to_top_level): Likewise.
1887 * parser.c (cp_lexer_alloc): Likewise.
1888 (cp_lexer_new_from_tokens): Likewise.
1889 (cp_token_cache_new): Likewise.
1890 (cp_parser_context_new): Likewise.
1891 (cp_parser_new): Likewise.
1892 (cp_parser_nested_name_specifier_opt): Likewise.
1893 (cp_parser_template_id): Likewise.
1894 * pt.c (maybe_process_partial_specialization): Likewise.
1895 (register_specialization): Likewise.
1896 (add_pending_template): Likewise.
1897 (lookup_template_class_1): Likewise.
1898 (push_tinst_level): Likewise.
1899 * semantics.c (register_constexpr_fundef): Likewise.
1900 (cxx_eval_call_expression): Likewise.
1901 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1902
1903 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
1904
1905 PR c++/51640
1906 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1907 when cp_parser_lookup_name sets ambiguous_decls.
1908
1909 2014-05-15 Jason Merrill <jason@redhat.com>
1910
1911 * call.c (print_conversion_rejection): Use loc consistently.
1912
1913 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1914
1915 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1916 * call.c (convert_like_real, build_new_method_call_1): Use it.
1917 * decl2.c (grokfield): Likewise.
1918 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1919 build_new_1): Likewise.
1920 * mangle.c (write_expression): Likewise.
1921 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1922
1923 2014-05-14 Jason Merrill <jason@redhat.com>
1924
1925 PR c++/20332
1926 PR c++/21631
1927 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1928 dropped cv-quals as a bad conversion.
1929 (convert_like_real) [ck_ref_bind]: Explain them.
1930 (compare_ics): Check badness before stripping reference
1931 bindings. Handle comparing bad reference bindings.
1932 * typeck.c (comp_cv_qualification): Add overload that just takes
1933 integers.
1934 * cp-tree.h: Declare it.
1935
1936 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1937 (arg_conversion_rejection, bad_arg_conversion_rejection)
1938 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1939 (add_function_candidate): Pass actual argument, rather than type, to
1940 bad_arg_conversion_rejection.
1941 (print_conversion_rejection): Explain what's wrong with the conversion.
1942 (print_z_candidates): Say "candidate:" before each candidate.
1943 (splice_viable): Be strict if we see a viable or template candidate.
1944 (build_user_type_conversion_1): Pass false to strict parameter.
1945 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1946 (build_new_op_1, build_new_method_call_1): Likewise.
1947 (build_op_call_1): Pass true to strict parameter.
1948
1949 2014-05-13 Jason Merrill <jason@redhat.com>
1950
1951 * call.c (print_error_for_call_failure): Say "no match" rather
1952 than "ambiguous" if there were no strict matches.
1953 (build_new_method_call_1): Likewise.
1954
1955 PR c++/61151
1956 * semantics.c (is_this_parameter): Allow capture proxies too.
1957
1958 2014-05-12 Jason Merrill <jason@redhat.com>
1959
1960 * call.c (maybe_print_user_conv_context): New.
1961 (convert_like_real): Use it. Print call context for bad
1962 user-defined conversion.
1963 (build_over_call): Print call context for bad 'this' conversion.
1964
1965 * call.c (convert_like_real): Use inform for identifying the
1966 declaration point.
1967
1968 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1969
1970 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1971 complain & tf_error is false.
1972
1973 * decl.c (make_unbound_class_template): Prefer inform for
1974 "declared here"-type message.
1975
1976 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1977
1978 PR c++/60463
1979 PR c++/60755
1980 * lambda.c (lambda_expr_this_capture): Add new parameter
1981 add_capture_p controlling whether the functions will try to
1982 capture 'this' via the default capture.
1983 (maybe_resolve_dummy): Likewise.
1984 * cp-tree.h: Adjust prototypes.
1985 * call.c, semantics.c: Change callers of these functions.
1986 * call.c (build_new_method_call_1): Use the actual 'this' that
1987 would be potentially captured for the overload resolution, instead
1988 of the dummy object.
1989
1990 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1991
1992 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1993 parameter.
1994 (convert_nontype_argument): Adjust calls.
1995 (coerce_template_parameter_pack): Add missing complain & tf_error
1996 check.
1997
1998 2014-05-09 Jason Merrill <jason@redhat.com>
1999
2000 DR 587
2001 PR c++/51317
2002 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2003 non-class lvalues and xvalues that differ only in cv-qualifiers.
2004
2005 DR 5
2006 PR c++/60019
2007 * call.c (build_user_type_conversion_1): The copy-init temporary
2008 is cv-unqualified.
2009
2010 PR c++/58714
2011 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2012
2013 PR c++/54348
2014 * call.c (build_conditional_expr_1): If overload resolution finds
2015 no match, just say "different types".
2016
2017 PR c++/32019
2018 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2019
2020 PR c++/22434
2021 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2022 if we didn't find a conversion.
2023 Don't accept a bad conversion too early.
2024
2025 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2026
2027 PR c++/13981
2028 * typeck.c (convert_for_assignment): Provide an inform for pointers
2029 to incomplete class types.
2030
2031 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2032
2033 PR c++/61083
2034 * pt.c (convert_nontype_argument): Protect all the error calls
2035 with complain & tf_error.
2036
2037 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2038
2039 PR c++/61080
2040 * pt.c (instantiate_decl): Avoid generating the body of a
2041 deleted function.
2042
2043 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2044
2045 PR c++/60999
2046 * pt.c (maybe_begin_member_template_processing): Use
2047 uses_template_parms.
2048
2049 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2050 Mike Stump <mikestump@comcast.net>
2051 Richard Sandiford <rdsandiford@googlemail.com>
2052
2053 * call.c: Include wide-int.h.
2054 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2055 (convert_for_arg_passing): Likewise.
2056 * class.c: Include wide-int.h.
2057 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2058 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2059 (include_empty_classes): Likewise
2060 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2061 * cvt.c: Include wide-int.h.
2062 (ignore_overflows): Use wide_int_to_tree.
2063 * decl.c: Include wide-int.h.
2064 (check_array_designated_initializer): Use wide-int interfaces.
2065 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2066 (finish_enum_value_list): Use signop.
2067 (build_enumerator): Use wide-int interfaces.
2068 * init.c: Include wide-int.h.
2069 (build_new_1): Use wide-int interfaces.
2070 * mangle.c: Include wide-int.h.
2071 (write_integer_cst): Use wide-int interfaces.
2072 (write_array_type): Likewise.
2073 * tree.c: Include wide-int.h.
2074 (cp_tree_equal): Use tree_int_cst_equal.
2075 * typeck2.c: Include wide-int.h.
2076 (process_init_constructor_array): Use wide-int interfaces.
2077
2078 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2079
2080 PR c++/58582
2081 * decl.c (grokfndecl): Check duplicate_decls return value for
2082 error_mark_node.
2083 * pt.c (instantiate_decl): A deleted function is defined.
2084
2085 2014-05-02 Jason Merrill <jason@redhat.com>
2086
2087 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2088
2089 PR c++/60992
2090 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2091 other than 'this'.
2092 (add_capture): Check for VLA before calling it.
2093 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2094 just the current one. Make non-static.
2095 * cp-tree.h: Declare it.
2096 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2097 the operand was static or constant.
2098
2099 2014-05-02 Marek Polacek <polacek@redhat.com>
2100
2101 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2102 warning_at calls.
2103
2104 2014-05-01 Marek Polacek <polacek@redhat.com>
2105
2106 PR c/43395
2107 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2108 between label and variable when warning about returning local address.
2109
2110 2014-04-30 Jason Merrill <jason@redhat.com>
2111
2112 PR c++/60980
2113 * init.c (build_value_init): Don't try to call an array constructor.
2114
2115 PR c++/60951
2116 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2117
2118 2014-04-30 Marek Polacek <polacek@redhat.com>
2119
2120 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2121 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2122 for non-integer types.
2123
2124 2014-04-29 Jason Merrill <jason@redhat.com>
2125
2126 DR 1351
2127 Represent the unevaluated exception specification of an implicitly
2128 declared or deleted function with a simple placeholder, not a list
2129 of functions.
2130 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2131 * except.c (unevaluated_noexcept_spec): New.
2132 * class.c (deduce_noexcept_on_destructor): Use it.
2133 * decl.c (check_redeclaration_exception_specification): Call
2134 maybe_instantiate_noexcept.
2135 (duplicate_decls): Call it before merge_types.
2136 (start_preparsed_function): Call maybe_instantiate_noexcept.
2137 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2138 * init.c (get_nsdmi): Factor out of perform_member_init.
2139 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2140 (walk_field_subobs): Consider NSDMI for EH spec.
2141 (get_defaulted_eh_spec): New.
2142 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2143 (defaulted_late_check): Defer EH checking in non-template classes.
2144 (after_nsdmi_defaulted_late_checks): New.
2145 * parser.c (cp_parser_class_specifier_1): Use it.
2146 (unparsed_classes): New macro.
2147 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2148 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2149 Remove list-of-functions handling.
2150 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2151 handling and FN parameter.
2152 * typeck.c (merge_types): Adjust.
2153
2154 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2155
2156 PR c++/59120
2157 * parser.c (cp_parser_alias_declaration): Check return value of
2158 cp_parser_require.
2159
2160 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2161
2162 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2163 atomic-clause, allow comma in between atomic-clause and
2164 seq_cst.
2165
2166 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2167
2168 PR libstdc++/43622
2169 * rtti.c (emit_support_tinfos): Do not iterate on
2170 registered_builtin_types (partial revert).
2171
2172 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2173
2174 PR c++/57958
2175 * semantics.c (apply_deduced_return_type): Complete non-void type
2176 before estimating whether the type is aggregate.
2177
2178 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2179
2180 PR libstdc++/43622
2181 * rtti.c (emit_support_tinfo_1): New function, extracted from
2182 emit_support_tinfos.
2183 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2184
2185 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR c/59073
2188 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2189 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2190
2191 2014-04-18 Jason Merrill <jason@redhat.com>
2192
2193 DR 1571
2194 * call.c (reference_binding): Recurse on user-defined conversion.
2195
2196 PR c++/60872
2197 * call.c (standard_conversion): Don't try to apply restrict to void.
2198
2199 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2200
2201 * decl.c (reshape_init_r): Handle a single element of vector type.
2202
2203 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2204
2205 PR c++/60765
2206 * decl2.c (cplus_decl_attributes): Handle
2207 pointer-to-member-function declarations.
2208
2209 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2210
2211 PR c++/60764
2212 * call.c (build_user_type_coversion): Use build_dummy_object
2213 to create the placeholder object for a constructor method call.
2214 (build_special_member_call): Likewise.
2215 (build_over_call): Check for the placeholder object with
2216 is_dummy_object.
2217 (build_new_method_call_1): Likewise. Don't attempt to resolve
2218 a dummy object for a constructor method call.
2219
2220 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2221
2222 PR c++/59295
2223 * friend.c (add_friend, make_friend_class): Move repeated friend
2224 warning under Wredundant_decls.
2225
2226 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2227
2228 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2229 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2230 (do_class_using_decl): Likewise.
2231 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2232
2233 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2234
2235 PR plugins/59335
2236 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2237
2238 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2239
2240 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2241
2242 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2243
2244 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2245
2246 2014-04-11 Jason Merrill <jason@redhat.com>
2247
2248 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2249 * parser.c: Adjust.
2250 (cp_lexer_get_preprocessor_token): Always clear it.
2251 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2252
2253 DR 1467
2254 PR c++/51747
2255 * decl.c (reshape_init_r): Handle a single element of class type.
2256
2257 DR 1338
2258 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2259 built-in operator new.
2260
2261 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2262
2263 PR c++/58600
2264 * name-lookup.c (parse_using_directive): Return early if the
2265 attribs argument is error_mark_node; use get_attribute_name.
2266
2267 2014-04-11 Jason Merrill <jason@redhat.com>
2268
2269 DR 1030
2270 PR c++/51253
2271 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2272 * call.c (struct z_candidate): Add flags field.
2273 (add_candidate): Add flags parm.
2274 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2275 (add_template_candidate_real): Pass it.
2276 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2277 * tree.c (build_aggr_init_expr): Copy it.
2278 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2279
2280 2014-04-10 Richard Biener <rguenther@suse.de>
2281 Jakub Jelinek <jakub@redhat.com>
2282
2283 PR ipa/60761
2284 * error.c (dump_decl) <case FUNCTION_DECL>: If
2285 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2286 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2287 <built-in>.
2288
2289 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2290
2291 * pt.c (check_template_variable): Check for the return of pedwarn
2292 before emitting a note.
2293 * parser.c (cp_parser_lambda_introducer): Likewise.
2294
2295 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2296
2297 PR c++/59115
2298 * pt.c (process_template_parm): For an invalid non-type parameter
2299 only set TREE_TYPE to error_mark_node.
2300 (push_inline_template_parms_recursive, comp_template_parms,
2301 redeclare_class_template, coerce_template_template_parm,
2302 coerce_template_template_parms, unify): Use error_operand_p.
2303
2304 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2305
2306 * class.c (check_bases_and_members): Warn about non-virtual dtors
2307 in public bases only. Check warn_ecpp before complaining about
2308 non-polymorphic bases.
2309
2310 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2311
2312 * decl.c (duplicate_decls): Check for the return of warning_at
2313 before emitting a note.
2314 (warn_misplaced_attr_for_class_type): Likewise.
2315 (check_tag_decl): Likewise.
2316
2317 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2318
2319 PR c++/58207
2320 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2321
2322 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2323
2324 PR c++/44613
2325 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2326 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2327 instantiating a variable-sized type.
2328
2329 PR c++/21113
2330 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2331
2332 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2333
2334 * class.c (find_abi_tags_r): Check for the return of warning
2335 before emitting a note.
2336 (one_inherited_ctor): Likewise.
2337
2338 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2339
2340 * decl.c (duplicate_decls): Check for the return of permerror
2341 before emitting a note.
2342
2343 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2344
2345 * class.c (accessible_nvdtor_p): New.
2346 (check_bases): Don't check base destructor here ...
2347 (check_bases_and_members): ... check them here. Trigger on
2348 Wnon-virtual-dtor flag.
2349 (finish_struct_1): Use accessible_nvdtor_p.
2350
2351 2014-04-01 Jason Merrill <jason@redhat.com>
2352
2353 * pt.c (process_partial_specialization): Say "not deducible"
2354 rather than "not used". Use inform.
2355
2356 PR c++/60374
2357 * pt.c (coerce_template_parms): Check that the pack expansion
2358 pattern works with the first matching parameter.
2359
2360 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2361
2362 * init.c (perform_member_init): Homogenize uninitialized
2363 diagnostics.
2364
2365 2014-04-01 Jason Merrill <jason@redhat.com>
2366
2367 PR c++/60708
2368 * call.c (build_array_conv): Call complete_type.
2369
2370 PR c++/60713
2371 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2372 (picflag_from_initializer): Return it.
2373 (process_init_constructor): Handle it.
2374
2375 PR c++/60642
2376 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2377 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2378 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2379 (most_general_template): Handle more kinds of template.
2380 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2381 instantiations and specializations.
2382
2383 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2384
2385 PR c++/44859
2386 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2387 COMPONENT_REFs and ARRAY_REFs sooner.
2388
2389 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2390
2391 PR c++/60626
2392 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2393 usage in non-functions with pushed scope.
2394
2395 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2396
2397 PR c++/60573
2398 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2399 to indicate whether a scope is in the process of defining a class.
2400 * semantics.c (begin_class_definition): Set defining_class_p.
2401 * name-lookup.c (leave_scope): Reset defining_class_p.
2402 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2403 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2404 unwinding to class-defining scope to handle the erroneous definition of
2405 a generic function of an arbitrarily nested class within an enclosing
2406 class.
2407
2408 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2409
2410 PR c++/52369
2411 * method.c (walk_field_subobs): Improve the diagnostic
2412 locations for both REFERENCE_TYPEs and non-static const members.
2413 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2414 instead of %qD to be consistent with the c++11 diagnostic.
2415
2416 2014-03-25 Jason Merrill <jason@redhat.com>
2417
2418 PR c++/60566
2419 PR c++/58678
2420 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2421 * search.c (get_pure_virtuals): Not here.
2422
2423 PR c++/60375
2424 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2425 a lambda in unevaluated context.
2426
2427 PR c++/60628
2428 * decl.c (create_array_type_for_decl): Complain about array of auto.
2429
2430 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2431
2432 PR c++/60331
2433 * semantics.c (potential_constant_expression_1): Handle
2434 DECL_EXPR.
2435
2436 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2437
2438 PR c++/60627
2439 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2440 introducing an implicit function template parameter within an explicit
2441 instantiation.
2442
2443 2014-03-22 Jason Merrill <jason@redhat.com>
2444
2445 PR c++/60574
2446 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2447 to error.
2448
2449 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2450
2451 PR c++/60384
2452 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2453 on the name argument.
2454
2455 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2456
2457 PR c++/60572
2458 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2459 type.
2460
2461 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2462
2463 PR c++/51474
2464 * call.c (build_new_method_call_1): Handle pure virtuals called by
2465 NSDMIs too.
2466
2467 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2468
2469 PR c++/60390
2470 * parser.c (cp_parser_member_declaration): Don't allow
2471 finish_fully_implicit_template to consider friend declarations to be
2472 class member templates.
2473 (synthesize_implicit_template_parm): Handling winding back through class
2474 scope to the class being defined in order to inject a template argument
2475 list.
2476
2477 PR c++/60391
2478 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2479 function scope as per cp_parser_skip_to_end_of_statement.
2480
2481 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2482
2483 PR c++/59571
2484 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2485
2486 2014-03-14 Jason Merrill <jason@redhat.com>
2487
2488 PR c++/60532
2489 PR c++/58678
2490 * search.c (get_pure_virtuals): Handle abstract dtor here.
2491 (dfs_get_pure_virtuals): Not here.
2492
2493 PR c++/58678
2494 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2495 abstract class as pure.
2496
2497 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2498
2499 PR c++/60383
2500 * pt.c (maybe_process_partial_specialization): Check return value
2501 of check_specialization_namespace.
2502
2503 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2504
2505 PR c++/60254
2506 * semantics.c (finish_static_assert): Call cxx_constant_value only
2507 if require_potential_rvalue_constant_expression returns true.
2508
2509 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2510
2511 PR c++/60389
2512 * method.c (get_inherited_ctor): New.
2513 * cp-tree.h (get_inherited_ctor): Declare it.
2514 * semantics.c (is_valid_constexpr_fn): Use it.
2515
2516 2014-03-10 Jason Merrill <jason@redhat.com>
2517
2518 PR c++/60367
2519 * call.c (convert_default_arg): Remove special handling for
2520 CONSTRUCTOR.
2521
2522 PR c++/53492
2523 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2524 when deciding whether to call push_template_decl for a member class.
2525 * pt.c (push_template_decl_real): Return after wrong levels error.
2526
2527 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2528
2529 PR c++/60033
2530 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2531 lambda, remove the lambda's own template argument list prior to fetching
2532 the specialization.
2533
2534 PR c++/60393
2535 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2536 function template unwinding on error into a more general location, ...
2537 (cp_parser_skip_to_end_of_statement): ... here.
2538
2539 2014-03-07 Jason Merrill <jason@redhat.com>
2540
2541 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2542
2543 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2544 we're in a trailing return type.
2545
2546 * typeck.c (comp_template_parms_position): 'auto' and
2547 'decltype(auto)' are different from real template parms.
2548
2549 * parser.c (cp_parser_using_declaration): Consume the semicolon
2550 after bare parameter pack error.
2551
2552 * cp-tree.h (REF_PARENTHESIZED_P): New.
2553 * semantics.c (force_paren_expr): Set it.
2554 * pt.c (do_auto_deduction): Check it.
2555 (tsubst) [COMPONENT_REF]: Copy it.
2556 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2557
2558 * decl.c (create_array_type_for_decl): Only warn about invalid
2559 C++1y VLA if flag_iso or warn_vla>0.
2560 (grokdeclarator): Likewise.
2561 * pt.c (tsubst): Likewise.
2562 * semantics.c (finish_decltype_type): Likewise.
2563 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2564 (cp_build_addr_expr_1): Likewise.
2565 * init.c (build_new_1): Improve diagnostics.
2566
2567 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2568
2569 PR c++/58609
2570 * decl.c (check_initializer): Return NULL_TREE after error;
2571 consistently use inform.
2572
2573 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2574
2575 * decl.c (check_initializer): Remove dead code.
2576
2577 2014-03-06 Marek Polacek <polacek@redhat.com>
2578
2579 PR c/60197
2580 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2581 of checking tree code.
2582
2583 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2584
2585 * parser.c (cp_lexer_set_source_position): New.
2586 (cp_parser_mem_initializer): Use it.
2587 (cp_parser_postfix_open_square_expression): Likewise.
2588 (cp_parser_parenthesized_expression_list): Likewise.
2589 (cp_parser_new_initializer): Likewise.
2590 (cp_parser_jump_statement): Likewise.
2591 (cp_parser_initializer): Likewise.
2592 (cp_parser_functional_cast): Likewise.
2593
2594 2014-03-05 Jason Merrill <jason@redhat.com>
2595
2596 PR c++/60409
2597 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2598 dependent expression.
2599
2600 PR c++/60361
2601 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2602 if re-parsing might succeed.
2603 * semantics.c (finish_id_expression): Use of a parameter outside
2604 the function body is a parse error.
2605
2606 * parser.c (cp_parser_mem_initializer): Set input_location
2607 properly for init-list warning.
2608 (cp_parser_postfix_open_square_expression): Likewise.
2609 (cp_parser_parenthesized_expression_list): Likewise.
2610 (cp_parser_new_initializer): Likewise.
2611 (cp_parser_jump_statement): Likewise.
2612 (cp_parser_initializer): Likewise.
2613 (cp_parser_functional_cast): Likewise.
2614
2615 2014-03-04 Jason Merrill <jason@redhat.com>
2616
2617 PR c++/60417
2618 * typeck2.c (process_init_constructor_record): Set
2619 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2620
2621 PR c++/60415
2622 PR c++/54359
2623 * parser.c (cp_parser_direct_declarator): Set declarator to
2624 cp_error_declarator on invalid qualified-id.
2625
2626 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2627
2628 PR c++/60376
2629 * parser.c (cp_parser_using_declaration): Early return when
2630 cp_parser_nested_name_specifier errors out.
2631
2632 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2633
2634 PR c++/60377
2635 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2636 function scope on parse error in function parameter list.
2637
2638 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2639
2640 * method.c (implicitly_declare_fn): Remove redundant
2641 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2642 * semantics.c (is_instantiation_of_constexpr): Likewise.
2643 * error.c (dump_function_decl): Likewise.
2644
2645 2014-03-01 Jason Merrill <jason@redhat.com>
2646
2647 PR c++/60379
2648 * semantics.c (begin_maybe_infinite_loop): Use
2649 fold_non_dependent_expr_sfinae.
2650
2651 2014-02-28 Jason Merrill <jason@redhat.com>
2652
2653 PR c++/58845
2654 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2655
2656 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2657
2658 PR c++/58610
2659 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2660 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2661 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2662
2663 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2664
2665 PR c++/60253
2666 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2667 error_at.
2668
2669 2014-02-27 Jason Merrill <jason@redhat.com>
2670
2671 PR c++/60353
2672 PR c++/55877
2673 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2674 are not yet defined.
2675
2676 2014-02-26 Jason Merrill <jason@redhat.com>
2677
2678 PR c++/60347
2679 PR lto/53808
2680 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2681 * init.c (build_vtbl_address): Do it here.
2682
2683 PR c++/59231
2684 PR c++/11586
2685 PR c++/14710
2686 PR c++/57132
2687 * pt.c (struct warning_sentinel): New.
2688 (tsubst_copy_and_build): Use it instead of
2689 c_inhibit_evaluation_warnings.
2690 * typeck.c (maybe_warn_about_useless_cast): Remove
2691 c_inhibit_evaluation_warnings check.
2692
2693 PR c++/54440
2694 * pt.c (get_template_parm_index): New.
2695 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2696 (process_template_parm): Allow bare packs in template template
2697 parm template parms.
2698 (coerce_template_parameter_pack): Handle fixed template template
2699 parm packs and fixed packs not at the end of the parm list.
2700 (coerce_template_parms): Handle template parm packs not at the end
2701 of the parm list.
2702 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2703
2704 PR c++/60182
2705 * pt.c (unify): Ignore alias templates when deducing a template
2706 template parameter.
2707
2708 PR c++/60345
2709 Revert:
2710 DR 1571
2711 * call.c (reference_binding): Recurse on user-defined conversion.
2712 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2713
2714 2014-02-25 Jason Merrill <jason@redhat.com>
2715
2716 DR 1571
2717 * call.c (reference_binding): Recurse on user-defined conversion.
2718 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2719
2720 * call.c (print_conversion_rejection): Handle n_arg of -2.
2721 (build_user_type_conversion_1): Pass it.
2722
2723 PR c++/55877
2724 * decl2.c (no_linkage_error): Handle C++98 semantics.
2725 (reset_type_linkage): Move from decl.c.
2726 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2727 (bt_reset_linkage_2, reset_decl_linkage): New.
2728 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2729 (cp_write_global_declarations): Move condition into no_linkage_error.
2730 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2731 * semantics.c (expand_or_defer_fn_1): Factor out
2732 tentative_decl_linkage.
2733 * cp-tree.h: Adjust.
2734
2735 * decl2.c (finish_static_data_member_decl): Diagnose static data
2736 member in unnamed class.
2737 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2738
2739 PR lto/53808
2740 * class.c (clone_function_decl): Call note_vague_linkage_fn for
2741 defaulted virtual dtor.
2742
2743 DR 1286
2744 PR c++/60328
2745 * pt.c (get_underlying_template): Fix equivalence calculation.
2746
2747 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
2748
2749 PR c++/60311
2750 * parser.c (function_being_declared_is_template_p): Return false when
2751 processing a template parameter list.
2752 (cp_parser_parameter_declaration_clause): Don't set
2753 auto_is_implicit_function_template_parm_p when processing a
2754 template parameter list.
2755
2756 * parser.c (synthesize_implicit_template_parm): Inject new template
2757 argument list appropriately when a generic member function
2758 of a class template is declared out-of-line.
2759
2760 PR c++/60065
2761 * parser.c (cp_parser_direct_declarator): Don't save and
2762 restore num_template_parameter_lists around call to
2763 cp_parser_parameter_declaration_list.
2764 (function_being_declared_is_template_p): New predicate.
2765 (cp_parser_parameter_declaration_list): Use
2766 function_being_declared_is_template_p as predicate for
2767 inspecting current function template parameter list length
2768 rather than num_template_parameter_lists.
2769
2770 2014-02-24 Jason Merrill <jason@redhat.com>
2771
2772 PR c++/60146
2773 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2774 DECL_EXPR initialize a non-class iterator.
2775
2776 PR c++/60312
2777 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2778
2779 2014-02-21 Jason Merrill <jason@redhat.com>
2780
2781 PR c++/58170
2782 * parser.c (cp_parser_type_name): Always check dependency.
2783 (cp_parser_type_specifier_seq): Call
2784 cp_parser_parse_and_diagnose_invalid_type_name.
2785
2786 PR c++/60108
2787 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2788
2789 PR c++/60185
2790 * parser.c (cp_parser_default_argument): Clear
2791 current_class_ptr/current_class_ref like tsubst_default_argument.
2792
2793 PR c++/60252
2794 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2795 than current_binding_level.
2796
2797 PR c++/60186
2798 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2799
2800 PR c++/60187
2801 * parser.c (cp_parser_enum_specifier): Call
2802 check_for_bare_parameter_packs.
2803
2804 PR c++/59347
2805 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2806 erroneous typedef.
2807
2808 PR c++/60241
2809 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2810 of the partial instantiation, not the most general template.
2811 (maybe_process_partial_specialization): Reassign everything on
2812 that list.
2813
2814 PR c++/60216
2815 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2816 (check_explicit_specialization): Don't clone.
2817
2818 PR c++/60219
2819 * pt.c (coerce_template_parms): Bail if argument packing fails.
2820
2821 PR c++/60224
2822 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2823 Don't get confused by a CONSTRUCTOR that already has a type.
2824
2825 PR c++/60227
2826 * call.c (build_array_conv): Don't crash on VLA.
2827
2828 PR c++/60248
2829 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2830
2831 PR c++/60252
2832 * lambda.c (maybe_resolve_dummy): Don't try to capture this
2833 in declaration context.
2834
2835 DR 1591
2836 PR c++/60051
2837 * pt.c (unify): Only unify if deducible. Handle 0-length list.
2838
2839 PR c++/60250
2840 * parser.c (cp_parser_direct_declarator): Don't wrap a
2841 type-dependent expression in a NOP_EXPR.
2842
2843 PR c++/60251
2844 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2845
2846 PR c++/60167
2847 PR c++/60222
2848 PR c++/58606
2849 * parser.c (cp_parser_template_argument): Restore dereference.
2850 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2851 (process_partial_specialization): Handle deref.
2852 (unify): Likewise.
2853
2854 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
2855
2856 PR c++/60052
2857 PR c++/60053
2858 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2859 implicit_template_scope upon leaving an out-of-line generic member
2860 function definition.
2861
2862 2014-02-20 Kai Tietz <ktietz@redhat.com>
2863
2864 PR c++/58873
2865 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2866 valued type argument as error_mark_node.
2867
2868 PR c++/58835
2869 * semantics.c (finish_fname): Handle error_mark_node.
2870
2871 2014-02-19 Jason Merrill <jason@redhat.com>
2872
2873 PR c++/60046
2874 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2875 spec from template context.
2876
2877 2014-02-19 Jakub Jelinek <jakub@redhat.com>
2878
2879 PR debug/56563
2880 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2881 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2882
2883 PR c++/60267
2884 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2885
2886 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2887
2888 PR c++/60225
2889 * semantics.c (ensure_literal_type_for_constexpr_object): Use
2890 strip_array_types.
2891
2892 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2893
2894 PR c++/60215
2895 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2896 During error recovery allow_non_constant may be false.
2897
2898 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
2899
2900 PR c++/60190
2901 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2902 scope whenever a template parameter list has been started, independent
2903 of whether the function call operator was well-formed or not.
2904
2905 PR c++/60064
2906 * parser.c (cp_parser_member_declaration): Pop fully implicit template
2907 scope for generic friend declarations as well as for non-friends.
2908
2909 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
2910
2911 PR c++/60047
2912 * method.c (implicitly_declare_fn): A constructor of a class with
2913 virtual base classes isn't constexpr (7.1.5p4).
2914
2915 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2916
2917 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2918
2919 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2920
2921 PR c++/58703
2922 * parser.c (cp_parser_omp_declare_reduction): Save and free
2923 declarator_obstack.
2924
2925 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2926
2927 PR c++/53017
2928 PR c++/59211
2929 * tree.c (handle_init_priority_attribute): Call default_conversion on
2930 the attribute argument.
2931
2932 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2933
2934 PR c++/58871
2935 * method.c (synthesized_method_walk): If vbases is non-null but
2936 is_empty is true, likewise don't worry about the virtual bases.
2937
2938 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2939
2940 PR c++/51219
2941 * typeck2.c (process_init_constructor_record): Just skip unnamed
2942 bit-fields.
2943
2944 2014-01-31 Jason Merrill <jason@redhat.com>
2945
2946 PR c++/59469
2947 * pt.c (mark_decl_instantiated): Call mark_needed.
2948
2949 PR c++/58672
2950 * decl2.c (handle_tls_init): Handle null init fn.
2951
2952 PR c++/55800
2953 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2954
2955 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2956
2957 PR c++/59082
2958 * class.c (build_vfield_ref): Early return error_mark_node if
2959 TYPE_VFIELD (type) is null.
2960 (build_base_path): Check return value of build_vfield_ref.
2961
2962 2014-01-31 Jason Merrill <jason@redhat.com>
2963
2964 PR c++/59646
2965 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2966 [ck_list]: Check for error_mark_node.
2967 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2968
2969 PR c++/57043
2970 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2971 during partial ordering.
2972
2973 2014-01-31 Marek Polacek <polacek@redhat.com>
2974
2975 PR c/59963
2976 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2977
2978 2014-01-30 Jason Merrill <jason@redhat.com>
2979
2980 PR c++/57899
2981 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2982 (local_specializations): New macro.
2983 * pt.c (local_specializations): Remove variable.
2984
2985 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2986
2987 PR c++/58708
2988 * parser.c (make_string_pack): Use double_int::from_buffer.
2989
2990 2014-01-30 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/59940
2993 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2994 input_location.
2995 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2996 with input_location.
2997 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2998 loc parameter.
2999
3000 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3001
3002 PR c++/58843
3003 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3004
3005 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3006
3007 PR c++/58649
3008 * pt.c (lookup_template_class_1): Check start_enum return value
3009 for error_mark_node.
3010
3011 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3012
3013 * decl.c (duplicate_decls, typename_hash, typename_compare):
3014 Use TYPE_IDENTIFIER.
3015 * error.c (dump_type): Likewise.
3016 * mangle.c (dump_substitution_candidates): Likewise.
3017
3018 2014-01-30 Jason Merrill <jason@redhat.com>
3019
3020 PR c++/59633
3021 * decl2.c (attributes_naming_typedef_ok): New.
3022 * cp-tree.h: Declare it.
3023 * decl.c (grokdeclarator): Check it.
3024 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3025
3026 2014-01-29 Jason Merrill <jason@redhat.com>
3027
3028 PR c++/59707
3029 * call.c (add_builtin_candidate): Catch dependent types.
3030
3031 PR c++/59989
3032 * pt.c (expand_template_argument_pack): Correct
3033 non_default_args_count calculation.
3034
3035 PR c++/58466
3036 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3037
3038 PR c++/59956
3039 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3040 have a friend template in a class template.
3041 * pt.c (tsubst_friend_function): Look through it.
3042 (push_template_decl_real): A friend member template is
3043 primary.
3044
3045 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3046
3047 PR c++/58846
3048 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3049 == error_mark_node.
3050
3051 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3052
3053 PR c++/58674
3054 * pt.c (instantiate_template_1): Check for error_mark_node the second
3055 argument too.
3056
3057 2014-01-29 Jason Merrill <jason@redhat.com>
3058
3059 PR c++/59916
3060 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3061 cdtor_returns_this case.
3062
3063 PR c++/59315
3064 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3065
3066 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3067
3068 PR c++/58702
3069 * semantics.c (finish_omp_reduction_clause): Check type for
3070 error_mark_node.
3071
3072 2014-01-28 Jason Merrill <jason@redhat.com>
3073
3074 PR c++/59791
3075 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3076 (tsubst_copy): Use it if lookup fails.
3077
3078 PR c++/59818
3079 * pt.c (tsubst_function_type): Make sure we keep the same function
3080 quals.
3081
3082 PR c++/58701
3083 * semantics.c (build_anon_member_initialization): Stop walking
3084 when we run out of COMPONENT_REFs.
3085
3086 PR c++/58632
3087 * decl.c (lookup_and_check_tag): Ignore template parameters if
3088 scope == ts_current.
3089 * pt.c (check_template_shadow): Don't complain about the injected
3090 class name.
3091
3092 * decl.c (duplicate_decls): Tweak.
3093
3094 PR c++/53756
3095 * mangle.c (write_unqualified_name): Handle operator auto.
3096
3097 2014-01-27 Jason Merrill <jason@redhat.com>
3098
3099 PR c++/59823
3100 Core DR 1138
3101 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3102 list-initialization. A conversion to rvalue ref that involves
3103 an lvalue-rvalue conversion is bad.
3104 (convert_like_real): Give helpful error message.
3105
3106 PR c++/54652
3107 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3108
3109 PR c++/58504
3110 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3111 types.
3112
3113 PR c++/58606
3114 * pt.c (template_parm_to_arg): Call convert_from_reference.
3115 (tsubst_template_arg): Don't strip reference refs.
3116
3117 PR c++/58639
3118 * call.c (build_aggr_conv): Reject value-initialization of reference.
3119
3120 PR c++/58812
3121 PR c++/58651
3122 * call.c (convert_like_real): Give helpful error about excess braces
3123 for ck_rvalue of scalar type.
3124
3125 Core DR 1288
3126 * call.c (reference_binding): Only elide braces if the single
3127 element is reference-related.
3128
3129 PR c++/58814
3130 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3131 stabilizing.
3132
3133 PR c++/58837
3134 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3135 FUNCTION_DECL.
3136
3137 PR c++/59097
3138 * decl.c (compute_array_index_type): Don't call
3139 maybe_constant_value for a non-integral expression.
3140
3141 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3142
3143 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3144 flag_cilkplus.
3145 * cp-gimplify.c (cp_genericize): Likewise.
3146 * decl.c (grokfndecl): Likewise.
3147 * parser.c (cp_parser_postfix_expression): Likewise.
3148 (cp_parser_postfix_open_square_expression): Likewise.
3149 (cp_parser_direct_declarator): Likewise.
3150 (is_cilkplus_vector_p): Likewise.
3151 (cp_parser_omp_clause_name): Likewise.
3152 (cp_parser_omp_all_clauses): Likewise.
3153 * pt.c (apply_late_template_attributes): Likewise.
3154 * typeck.c (cp_build_array_ref): Likewise.
3155 (cp_build_compound_expr): Likewise.
3156 (check_return_expr): Likewise.
3157
3158 2014-01-24 Jason Merrill <jason@redhat.com>
3159
3160 PR c++/58550
3161 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3162 c++11 into error.
3163
3164 PR c++/59886
3165 PR c++/59659
3166 * typeck2.c (process_init_constructor_array): Don't create
3167 RANGE_EXPR yet.
3168
3169 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3170
3171 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3172 handling for RANGE_ARRAY case.
3173
3174 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3175
3176 PR c++/57524
3177 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3178
3179 2014-01-23 Marek Polacek <polacek@redhat.com>
3180
3181 PR c/59846
3182 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3183
3184 2014-01-23 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/58346
3187 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3188 an empty aggregate.
3189
3190 2014-01-23 Jason Merrill <jason@redhat.com>
3191
3192 PR c++/55189
3193 * cp-tree.h (struct language_function): Add infinite_loop and
3194 infinite_loops.
3195 (current_function_infinite_loop): New.
3196 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3197 (break_maybe_infinite_loop): New.
3198 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3199 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3200 (begin_range_for_stmt): Use them.
3201 * decl.c (finish_function): Don't warn about missing return
3202 if current_function_infinite_loop.
3203 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3204 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3205
3206 * call.c (build_op_delete_call): Use make_tree_vector and
3207 release_tree_vector.
3208
3209 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3210
3211 PR c++/58980
3212 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3213 nested_name_specifier.
3214
3215 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3216
3217 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3218 see if there is an attribute after function decl. If so, then
3219 parse them now.
3220 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3221 enabled function late parsing.
3222 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3223 attribute for a SIMD-enabled function.
3224 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3225 the function is used by SIMD-enabled function (indicated by NULL
3226 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3227 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3228 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3229 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3230 vectorlength clause. Added a new bool parameter to differentiate
3231 between the two.
3232 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3233 (is_cilkplus_vector_p): Likewise.
3234 (cp_parser_late_parsing_elem_fn_info): Likewise.
3235 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3236 and "vectorlength" clauses when Cilk Plus is enabled.
3237 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3238 and emit a sorry message when step size is a parameter.
3239 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3240 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3241 flag_openmp.
3242 * pt.c (apply_late_template_attributes): Likewise.
3243
3244 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3245
3246 PR middle-end/58809
3247 * semantics.c (finish_omp_reduction_clause): Reject
3248 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3249
3250 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3251
3252 PR c++/59482
3253 * parser.c (cp_parser_class_head): Push the class before parsing
3254 the base-clause, pop after it.
3255
3256 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3257
3258 * decl2.c (cpp_check): Revert prototype change.
3259
3260 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3261
3262 PR c++/59270
3263 PR c++/58811
3264 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3265 build_value_init.
3266
3267 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3268
3269 PR c++/59269
3270 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3271 only when errorcount == 0.
3272
3273 2014-01-17 Marek Polacek <polacek@redhat.com>
3274
3275 PR c++/59838
3276 * cvt.c (ocp_convert): Don't segfault on non-existing
3277 ENUM_UNDERLYING_TYPE.
3278
3279 2014-01-16 Jason Merrill <jason@redhat.com>
3280
3281 PR c++/59821
3282 * tree.c (bot_manip): Update the location of builtin_LINE and
3283 builtin_FILE calls.
3284
3285 2014-01-14 Jason Merrill <jason@redhat.com>
3286
3287 PR c++/59659
3288 * typeck2.c (massage_init_elt): New.
3289 (process_init_constructor_record)
3290 (process_init_constructor_union): Use it.
3291 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3292 (split_nonconstant_init_1): Handle it.
3293 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3294
3295 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3296
3297 PR c++/59631
3298 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3299 and replaced an existing if-statement with else-if statement.
3300 Changed an existing error message wording to match the one from the C
3301 parser.
3302
3303 2014-01-08 Jason Merrill <jason@redhat.com>
3304
3305 PR c++/59614
3306 * class.c (abi_tag_data): Add tags field.
3307 (check_abi_tags): Initialize it.
3308 (find_abi_tags_r): Support collecting missing tags.
3309 (mark_type_abi_tags): Don't look at template args.
3310 (inherit_targ_abi_tags): New.
3311 (check_bases_and_members): Use it.
3312 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3313 * mangle.c (write_abi_tags): Check it.
3314
3315 2014-01-07 Jason Merrill <jason@redhat.com>
3316
3317 PR c++/58856
3318 * pt.c (num_innermost_template_parms): New.
3319 (get_underlying_template): Use it.
3320
3321 PR c++/58965
3322 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3323
3324 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3325
3326 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3327 the letter of 20.11.6 about Base and Derived naming the same
3328 class type modulo cv-qualifiers.
3329
3330 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3331
3332 PR c++/59635
3333 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3334 function as unimplemented for generic lambdas with varargs.
3335
3336 PR c++/59636
3337 * parser.c (cp_parser_template_parameter): Early out with
3338 error_mark_node if parameter declaration was not parsed.
3339
3340 PR c++/59629
3341 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3342 auto_is_implicit_function_template_parm_p around lambda body.
3343
3344 PR c++/59638
3345 * parser.c (cp_parser_init_declarator): Undo fully implicit
3346 template parameter list when declarator is not a function.
3347
3348 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3349
3350 PR c++/58950
3351 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3352
3353 2014-01-03 Tobias Burnus <burnus@net-b.de>
3354
3355 PR c++/58567
3356 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3357
3358 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3359
3360 Core DR 1442
3361 PR c++/59165
3362 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3363 as include_std to perform_koenig_lookup.
3364 (cp_parser_postfix_expression): Adjust.
3365 * pt.c (tsubst_copy_and_build): Likewise.
3366 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3367 (omp_reduction_lookup): Adjust.
3368 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3369 (lookup_arg_dependent): Likewise.
3370 (lookup_function_nonclass): Adjust.
3371 * name-lookup.h: Adjust declaration.
3372 * cp-tree.h: Likewise.
3373
3374 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3375
3376 PR c++/59087
3377 * parser.c (cp_parser_userdef_numeric_literal): Mention
3378 -fext-numeric-literals in the message.
3379
3380 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3381
3382 PR c++/59641
3383 * call.c (build_conditional_expr_1): Check the return value of
3384 force_rvalue.
3385
3386 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3387
3388 * call.c (convert_like_real): Check complain.
3389
3390 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3391
3392 PR c++/59378
3393 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3394 in templates.
3395
3396 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3397
3398 Update copyright years
3399
3400 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3401
3402 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3403 the standard form for the copyright notice.
3404 \f
3405 Copyright (C) 2014 Free Software Foundation, Inc.
3406
3407 Copying and distribution of this file, with or without modification,
3408 are permitted in any medium without royalty provided the copyright
3409 notice and this notice are preserved.