re PR c++/33972 (Cannot declare operator() using function typedef)
[gcc.git] / gcc / cp / ChangeLog
1 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2
3 PR c++/33972
4 * decl.c (grokdeclarator): Do not early check for operator-function-id
5 as non-function.
6
7 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8
9 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
10 Adjust.
11
12 2014-06-24 Jakub Jelinek <jakub@redhat.com>
13
14 * parser.c (cp_parser_omp_for_loop): For
15 #pragma omp parallel for simd move lastprivate clause from parallel
16 to for rather than simd.
17
18 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
19
20 DR 577
21 PR c++/33101
22 * decl.c (grokparms): Accept a single parameter of type 'void'.
23
24 2014-06-20 Jason Merrill <jason@redhat.com>
25
26 PR c++/59296
27 * call.c (add_function_candidate): Avoid special 'this' handling
28 if we have a ref-qualifier.
29
30 PR c++/61556
31 * call.c (build_over_call): Call build_this in template path.
32
33 2014-06-19 Jason Merrill <jason@redhat.com>
34
35 PR c++/59296
36 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
37
38 2014-06-18 Jason Merrill <jason@redhat.com>
39
40 PR c++/59296
41 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
42 ref-qualifier handling.
43
44 PR c++/61507
45 * pt.c (resolve_overloaded_unification): Preserve
46 ARGUMENT_PACK_EXPLICIT_ARGS.
47
48 2014-06-18 Jakub Jelinek <jakub@redhat.com>
49
50 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
51 argument.
52 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
53
54 2014-06-17 Jason Merrill <jason@redhat.com>
55
56 PR c++/60605
57 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
58
59 2014-06-15 Jason Merrill <jason@redhat.com>
60
61 PR c++/61488
62 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
63
64 PR c++/61500
65 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
66
67 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
68
69 * decl.c (grokvardecl): Fix pasto in previous patch.
70
71 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
72
73 * decl.c (duplicate_decls): Use set_decl_tls_model.
74 (grokdeclarator): Likewise.
75 * semantics.c (finish_id_expression): Check TLS only for
76 static variables.
77 (finish_omp_threadprivate): Use decl_default_tls_model.
78 * decl2.c (get_guard): Likewise.
79 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
80
81 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
82
83 PR c++/33101
84 * decl.c (grokparms): Improve error message about void parameters.
85 * error.c (type_to_string): Fix aka cut off code.
86
87 2014-06-12 Jason Merrill <jason@redhat.com>
88
89 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
90 * cvt.c (type_promotes_to): Likewise.
91 * mangle.c (write_type, write_expression): Likewise.
92 (write_name, write_template_arg): Likewise.
93 (mangle_decl): Make alias based on flag_abi_compat_version.
94 Emit -Wabi warning here.
95 (finish_mangling_internal): Not here. Drop warn parm.
96 (finish_mangling_get_identifier, finish_mangling): Adjust.
97 (mangle_type_string, mangle_special_for_type): Adjust.
98 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
99 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
100 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
101
102 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
103 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
104 (layout_nonempty_base_or_field, end_of_class): Likewise.
105 (layout_empty_base, build_base_field, layout_class_type): Likewise.
106 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
107 (layout_virtual_bases): Likewise.
108 * decl.c (compute_array_index_type): Likewise.
109 * mangle.c (write_mangled_name, write_prefix): Likewise.
110 (write_template_prefix, write_integer_cst, write_expression): Likewise.
111 (write_template_arg, write_array_type): Likewise.
112 * method.c (lazily_declare_fn): Likewise.
113 * rtti.c (get_pseudo_ti_index): Likewise.
114 * typeck.c (comp_array_types): Likewise.
115
116 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
117
118 * vtable-class-hierarchy.c: Update handling for section names
119 that are no longer trees.
120 * decl.c (duplicate_decls): Likewise.
121
122 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
123
124 PR c++/19200
125 * parser.c (cp_parser_init_declarator): Actually pass friend_p
126 to cp_parser_declarator.
127
128 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
129
130 PR c++/60265
131 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
132 * name-lookup.c (validate_nonmember_using_decl): Adjust error
133 message.
134
135 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
136
137 PR c++/19200
138 * parser.c (cp_parser_declarator): Add bool parameter.
139 (cp_parser_direct_declarator): Likewise, use it.
140 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
141 (cp_parser_condition, cp_parser_explicit_instantiation,
142 cp_parser_init_declarator, cp_parser_type_id_1,
143 cp_parser_parameter_declaration, cp_parser_exception_declaration,
144 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
145 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
146 Adjust.
147 * decl.c (grokdeclarator): Fix handling of friend declared in
148 namespace scope (g++.dg/parse/friend10.C).
149
150 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
151
152 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
153 ->implicit_section.
154 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
155 (maybe_clone_body): Move symbol across comdat groups.
156 * method.c (use_thunk): Copy implicit section flag.
157
158 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
159
160 PR c++/22556
161 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
162
163 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
164
165 * method.c (use_thunk): Use set_decl_section_name.
166 * optimize.c (maybe_clone_body): Use set_decl_section_name.
167 * decl.c (duplicate_decls): Likewise.
168 * vtable-class-hierarchy.c: Likewise.
169
170 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
171
172 PR c++/60184
173 * class.c (check_field_decls): In C++11 mode do not reject
174 static data members and reference-type members in unions.
175
176 2014-06-05 Jason Merrill <jason@redhat.com>
177
178 PR c++/43453
179 * decl.c (check_initializer): Collapse a TREE_LIST here.
180 * typeck2.c (store_init_value): Not here.
181
182 2014-06-05 Richard Biener <rguenther@suse.de>
183 Paolo Carlini <paolo.carlini@oracle.com>
184
185 PR c++/56961
186 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
187 handling of empty classes.
188
189 2014-06-04 Jason Merrill <jason@redhat.com>
190
191 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
192 for noexcept and thread_local, too.
193
194 PR c++/61343
195 * decl.c (check_initializer): Maybe clear
196 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
197
198 2014-06-05 Richard Biener <rguenther@suse.de>
199
200 PR c++/61004
201 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
202 warnings for accessing empty classes.
203
204 2014-06-05 Marek Polacek <polacek@redhat.com>
205
206 PR c/49706
207 * parser.c (cp_parser_binary_expression): Warn when logical not is
208 used on the left hand side operand of a comparison.
209
210 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
211
212 PR c++/43453
213 * typeck.c (cp_build_modify_expr): Handle array of characters
214 initialized by a string literal.
215 * decl.c (check_initializer): Handle parenthesized string literal
216 as initializer.
217 * typeck2.c (store_init_value): Remove redundant check.
218
219 2014-06-04 Jason Merrill <jason@redhat.com>
220
221 PR c++/51253
222 PR c++/61382
223 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
224 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
225
226 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
227
228 PR c/58942
229 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
230 with a pointer.
231
232 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
233
234 DR 1423
235 PR c++/52174
236 * call.c (standard_conversion): Convert nullptr to bool only
237 in case of direct-initialization.
238 (convert_like_real): Provide informative error message.
239
240 2014-06-03 Marek Polacek <polacek@redhat.com>
241
242 PR c/60439
243 * semantics.c (finish_switch_cond): Warn if switch condition has
244 boolean value.
245
246 2014-06-03 Jason Merrill <jason@redhat.com>
247
248 PR c++/60992
249 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
250 variable to local_specializations.
251
252 PR c++/60848
253 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
254
255 2014-06-02 Jason Merrill <jason@redhat.com>
256
257 PR c++/61046
258 * decl.c (reshape_init_class): Handle un-folded
259 constant-expressions.
260
261 PR c++/61134
262 * pt.c (pack_deducible_p): Handle canonicalization.
263
264 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
265
266 * pt.c (tsubst_function_type): Initialize arg_types.
267
268 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
269
270 PR debug/57519
271 * class.c (handle_using_decl): Pass the correct scope to
272 cp_emit_debug_info_for_using.
273
274 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
275
276 PR c++/59483
277 PR c++/61148
278 * search.c (accessible_p): Use current_nonlambda_class_type.
279 * semantics.c (check_accessibility_of_qualified_id): Likewise.
280
281 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
282
283 * decl.c: Include builtins.h.
284 * semantics.c: Likewise.
285
286 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
287
288 DR 1227
289 PR c++/57543
290 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
291 * pt.c (tsubst_function_type): Inject the this parameter; do the
292 substitutions in the order mandated by the DR.
293 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
294 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
295 (static_fn_type): Copy it.
296 * decl2.c (build_memfn_type, change_return_type,
297 cp_reconstruct_complex_type): Likewise.
298 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
299 * tree.c (strip_typedefs): Likewise.
300 * typeck.c (merge_types): Likewise.
301
302 2014-05-30 Jason Merrill <jason@redhat.com>
303
304 PR c++/56947
305 * pt.c (instantiate_decl): Check that defer_ok is not set for
306 local class members.
307
308 PR c++/60992
309 * pt.c (tsubst_init): Split out from...
310 (tsubst_expr) [DECL_EXPR]: Here.
311 (tsubst_copy) [VAR_DECL]: Use it.
312 * semantics.c (finish_id_expression): Return the decl for static/const.
313
314 2014-05-28 Jason Merrill <jason@redhat.com>
315
316 PR c++/47202
317 * decl.c (cxx_comdat_group): Return a decl.
318 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
319
320 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
321 bound.
322
323 PR c++/61242
324 * call.c (build_aggr_conv): Ignore passed in flags.
325 (build_array_conv, build_complex_conv): Likewise.
326
327 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
328
329 * optimize.c (maybe_thunk_body): Use set_comdat_group.
330 (maybe_clone_body): Likewise.
331 * decl.c (duplicate_decls): Update code duplicating comdat group;
332 do not copy symtab pointer; before freeing newdecl remove it
333 from symtab.
334 * decl2.c (constrain_visibility): Use set_comdat_group.
335
336 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
337
338 * rtti.c: Include tm_p.h
339 (emit_tinfo_decl): Force RTTI data to be aligned to required
340 ABI alignment only.
341
342 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
343
344 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
345 ignoring other target adjustments.
346
347 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
348
349 * semantics.c (finish_omp_clauses): Remove duplicated variable
350 initialization.
351
352 * parser.c (cp_parser_omp_target): Return bool values.
353
354 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
355
356 PR c++/61088
357 * lambda.c (add_capture): Enforce that capture by value requires
358 complete type.
359 * typeck2.c (cxx_incomplete_type_inform): Early return if
360 TYPE_MAIN_DECL is null.
361
362 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
363
364 PR c/61271
365 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
366
367 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
368
369 PR c++/61133
370 * lambda.c (build_capture_proxy, add_capture): Treat normal
371 captures and init-captures identically.
372
373 2014-05-21 Mark Wielaard <mjw@redhat.com>
374
375 PR debug/16063
376 * cp-lang.c (cxx_enum_underlying_base_type): New function.
377 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
378
379 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
380
381 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
382 * cp-array-notation.c (replace_invariant_exprs): Likewise.
383 (expand_array_notation): Handle VOID_CST.
384 * error.c (dump_expr): Likewise.
385 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
386 (cxx_pretty_printer::expression): Likewise.
387 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
388 * decl.c (register_dtor_fn): Likewise.
389 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
390 (build_delete, push_base_cleanups): Likewise.
391 * mangle.c (write_expression): Likewise.
392 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
393 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
394 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
395 * tree.c (cp_tree_equal): Likewise.
396 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
397 instead of void_zero_node.
398 * typeck.c (check_return_expr): Likewise.
399 * typeck2.c (build_functional_cast): Likewise.
400
401 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
402
403 PR c/60189
404 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
405 from here to...
406 (cp_parser_statement): ...here. Make sure only semicolon can go after
407 Cilk_sync.
408
409 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
410
411 PR c++/58753
412 PR c++/58930
413 PR c++/58704
414 * typeck2.c (digest_nsdmi_init): New.
415 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
416 * init.c (get_nsdmi): Likewise.
417 * cp-tree.h (digest_nsdmi_init): Declare.
418
419 2014-05-20 Jason Merrill <jason@redhat.com>
420
421 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
422 up a virtual function in a dummy object.
423
424 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
425
426 PR c++/60373
427 * decl.c (duplicate_decls): Replace pair of warning_at with
428 warning_at + inform.
429 (maybe_commonize_var): Likewise.
430
431 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
432
433 PR bootstrap/61210
434 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
435 (tsubst_copy_and_build): Perform recursive substitutions in a
436 deterministic order.
437
438 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
439
440 PR c++/58664
441 * typeck2.c (cxx_incomplete_type_inform): New.
442 (cxx_incomplete_type_diagnostic): Use it.
443 * decl.c (grokdeclarator): Check the element type of an
444 incomplete array type; call the above.
445 * cp-tree.h (cxx_incomplete_type_inform): Declare.
446
447 2014-05-19 Jason Merrill <jason@redhat.com>
448
449 PR c++/58761
450 * pt.c (tsubst_copy): Don't check at_function_scope_p.
451 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
452
453 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
454
455 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
456 * parser.c (cp_parser_enum_specifier): Likewise.
457
458 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
459
460 * class.c (sorted_fields_type_new): Adjust.
461 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
462 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
463 * cp-tree.h: Remove usage of variable_size gty attribute.
464 * decl.c (make_label_decl): Adjust.
465 (check_goto): Likewise.
466 (start_preparsed_function): Likewise.
467 (save_function_data): Likewise.
468 * lex.c (init_reswords): Likewise.
469 (retrofit_lang_decl): Likewise.
470 (cxx_dup_lang_specific_decl): Likewise.
471 (copy_lang_type): Likewise.
472 (cxx_make_type): Likewise.
473 * name-lookup.c (binding_entry_make): Likewise.
474 (binding_table_construct): Likewise.
475 (binding_table_new): Likewise.
476 (cxx_binding_make): Likewise.
477 (pushdecl_maybe_friend_1): Likewise.
478 (begin_scope): Likewise.
479 (push_to_top_level): Likewise.
480 * parser.c (cp_lexer_alloc): Likewise.
481 (cp_lexer_new_from_tokens): Likewise.
482 (cp_token_cache_new): Likewise.
483 (cp_parser_context_new): Likewise.
484 (cp_parser_new): Likewise.
485 (cp_parser_nested_name_specifier_opt): Likewise.
486 (cp_parser_template_id): Likewise.
487 * pt.c (maybe_process_partial_specialization): Likewise.
488 (register_specialization): Likewise.
489 (add_pending_template): Likewise.
490 (lookup_template_class_1): Likewise.
491 (push_tinst_level): Likewise.
492 * semantics.c (register_constexpr_fundef): Likewise.
493 (cxx_eval_call_expression): Likewise.
494 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
495
496 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
497
498 PR c++/51640
499 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
500 when cp_parser_lookup_name sets ambiguous_decls.
501
502 2014-05-15 Jason Merrill <jason@redhat.com>
503
504 * call.c (print_conversion_rejection): Use loc consistently.
505
506 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
507
508 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
509 * call.c (convert_like_real, build_new_method_call_1): Use it.
510 * decl2.c (grokfield): Likewise.
511 * init.c (perform_member_init, build_aggr_init, expand_default_init,
512 build_new_1): Likewise.
513 * mangle.c (write_expression): Likewise.
514 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
515
516 2014-05-14 Jason Merrill <jason@redhat.com>
517
518 PR c++/20332
519 PR c++/21631
520 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
521 dropped cv-quals as a bad conversion.
522 (convert_like_real) [ck_ref_bind]: Explain them.
523 (compare_ics): Check badness before stripping reference
524 bindings. Handle comparing bad reference bindings.
525 * typeck.c (comp_cv_qualification): Add overload that just takes
526 integers.
527 * cp-tree.h: Declare it.
528
529 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
530 (arg_conversion_rejection, bad_arg_conversion_rejection)
531 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
532 (add_function_candidate): Pass actual argument, rather than type, to
533 bad_arg_conversion_rejection.
534 (print_conversion_rejection): Explain what's wrong with the conversion.
535 (print_z_candidates): Say "candidate:" before each candidate.
536 (splice_viable): Be strict if we see a viable or template candidate.
537 (build_user_type_conversion_1): Pass false to strict parameter.
538 (perform_overload_resolution, build_conditional_expr_1): Likewise.
539 (build_new_op_1, build_new_method_call_1): Likewise.
540 (build_op_call_1): Pass true to strict parameter.
541
542 2014-05-13 Jason Merrill <jason@redhat.com>
543
544 * call.c (print_error_for_call_failure): Say "no match" rather
545 than "ambiguous" if there were no strict matches.
546 (build_new_method_call_1): Likewise.
547
548 PR c++/61151
549 * semantics.c (is_this_parameter): Allow capture proxies too.
550
551 2014-05-12 Jason Merrill <jason@redhat.com>
552
553 * call.c (maybe_print_user_conv_context): New.
554 (convert_like_real): Use it. Print call context for bad
555 user-defined conversion.
556 (build_over_call): Print call context for bad 'this' conversion.
557
558 * call.c (convert_like_real): Use inform for identifying the
559 declaration point.
560
561 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
562
563 * cvt.c (cp_convert_to_pointer): Don't call error_at if
564 complain & tf_error is false.
565
566 * decl.c (make_unbound_class_template): Prefer inform for
567 "declared here"-type message.
568
569 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
570
571 PR c++/60463
572 PR c++/60755
573 * lambda.c (lambda_expr_this_capture): Add new parameter
574 add_capture_p controlling whether the functions will try to
575 capture 'this' via the default capture.
576 (maybe_resolve_dummy): Likewise.
577 * cp-tree.h: Adjust prototypes.
578 * call.c, semantics.c: Change callers of these functions.
579 * call.c (build_new_method_call_1): Use the actual 'this' that
580 would be potentially captured for the overload resolution, instead
581 of the dummy object.
582
583 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
584
585 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
586 parameter.
587 (convert_nontype_argument): Adjust calls.
588 (coerce_template_parameter_pack): Add missing complain & tf_error
589 check.
590
591 2014-05-09 Jason Merrill <jason@redhat.com>
592
593 DR 587
594 PR c++/51317
595 * call.c (build_conditional_expr_1, conditional_conversion): Handle
596 non-class lvalues and xvalues that differ only in cv-qualifiers.
597
598 DR 5
599 PR c++/60019
600 * call.c (build_user_type_conversion_1): The copy-init temporary
601 is cv-unqualified.
602
603 PR c++/58714
604 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
605
606 PR c++/54348
607 * call.c (build_conditional_expr_1): If overload resolution finds
608 no match, just say "different types".
609
610 PR c++/32019
611 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
612
613 PR c++/22434
614 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
615 if we didn't find a conversion.
616 Don't accept a bad conversion too early.
617
618 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
619
620 PR c++/13981
621 * typeck.c (convert_for_assignment): Provide an inform for pointers
622 to incomplete class types.
623
624 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
625
626 PR c++/61083
627 * pt.c (convert_nontype_argument): Protect all the error calls
628 with complain & tf_error.
629
630 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
631
632 PR c++/61080
633 * pt.c (instantiate_decl): Avoid generating the body of a
634 deleted function.
635
636 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
637
638 PR c++/60999
639 * pt.c (maybe_begin_member_template_processing): Use
640 uses_template_parms.
641
642 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
643 Mike Stump <mikestump@comcast.net>
644 Richard Sandiford <rdsandiford@googlemail.com>
645
646 * call.c: Include wide-int.h.
647 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
648 (convert_for_arg_passing): Likewise.
649 * class.c: Include wide-int.h.
650 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
651 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
652 (include_empty_classes): Likewise
653 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
654 * cvt.c: Include wide-int.h.
655 (ignore_overflows): Use wide_int_to_tree.
656 * decl.c: Include wide-int.h.
657 (check_array_designated_initializer): Use wide-int interfaces.
658 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
659 (finish_enum_value_list): Use signop.
660 (build_enumerator): Use wide-int interfaces.
661 * init.c: Include wide-int.h.
662 (build_new_1): Use wide-int interfaces.
663 * mangle.c: Include wide-int.h.
664 (write_integer_cst): Use wide-int interfaces.
665 (write_array_type): Likewise.
666 * tree.c: Include wide-int.h.
667 (cp_tree_equal): Use tree_int_cst_equal.
668 * typeck2.c: Include wide-int.h.
669 (process_init_constructor_array): Use wide-int interfaces.
670
671 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
672
673 PR c++/58582
674 * decl.c (grokfndecl): Check duplicate_decls return value for
675 error_mark_node.
676 * pt.c (instantiate_decl): A deleted function is defined.
677
678 2014-05-02 Jason Merrill <jason@redhat.com>
679
680 * decl2.c (vague_linkage_p): Local statics have vague linkage.
681
682 PR c++/60992
683 * lambda.c (lambda_capture_field_type): Wrap anything dependent
684 other than 'this'.
685 (add_capture): Check for VLA before calling it.
686 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
687 just the current one. Make non-static.
688 * cp-tree.h: Declare it.
689 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
690 the operand was static or constant.
691
692 2014-05-02 Marek Polacek <polacek@redhat.com>
693
694 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
695 warning_at calls.
696
697 2014-05-01 Marek Polacek <polacek@redhat.com>
698
699 PR c/43395
700 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
701 between label and variable when warning about returning local address.
702
703 2014-04-30 Jason Merrill <jason@redhat.com>
704
705 PR c++/60980
706 * init.c (build_value_init): Don't try to call an array constructor.
707
708 PR c++/60951
709 * typeck2.c (massage_init_elt): Use maybe_constant_init.
710
711 2014-04-30 Marek Polacek <polacek@redhat.com>
712
713 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
714 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
715 for non-integer types.
716
717 2014-04-29 Jason Merrill <jason@redhat.com>
718
719 DR 1351
720 Represent the unevaluated exception specification of an implicitly
721 declared or deleted function with a simple placeholder, not a list
722 of functions.
723 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
724 * except.c (unevaluated_noexcept_spec): New.
725 * class.c (deduce_noexcept_on_destructor): Use it.
726 * decl.c (check_redeclaration_exception_specification): Call
727 maybe_instantiate_noexcept.
728 (duplicate_decls): Call it before merge_types.
729 (start_preparsed_function): Call maybe_instantiate_noexcept.
730 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
731 * init.c (get_nsdmi): Factor out of perform_member_init.
732 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
733 (walk_field_subobs): Consider NSDMI for EH spec.
734 (get_defaulted_eh_spec): New.
735 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
736 (defaulted_late_check): Defer EH checking in non-template classes.
737 (after_nsdmi_defaulted_late_checks): New.
738 * parser.c (cp_parser_class_specifier_1): Use it.
739 (unparsed_classes): New macro.
740 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
741 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
742 Remove list-of-functions handling.
743 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
744 handling and FN parameter.
745 * typeck.c (merge_types): Adjust.
746
747 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
748
749 PR c++/59120
750 * parser.c (cp_parser_alias_declaration): Check return value of
751 cp_parser_require.
752
753 2014-04-24 Jakub Jelinek <jakub@redhat.com>
754
755 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
756 atomic-clause, allow comma in between atomic-clause and
757 seq_cst.
758
759 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
760
761 PR libstdc++/43622
762 * rtti.c (emit_support_tinfos): Do not iterate on
763 registered_builtin_types (partial revert).
764
765 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
766
767 PR c++/57958
768 * semantics.c (apply_deduced_return_type): Complete non-void type
769 before estimating whether the type is aggregate.
770
771 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
772
773 PR libstdc++/43622
774 * rtti.c (emit_support_tinfo_1): New function, extracted from
775 emit_support_tinfos.
776 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
777
778 2014-04-22 Jakub Jelinek <jakub@redhat.com>
779
780 PR c/59073
781 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
782 fails, don't set OM_PARALLEL_COMBINED and return NULL.
783
784 2014-04-18 Jason Merrill <jason@redhat.com>
785
786 DR 1571
787 * call.c (reference_binding): Recurse on user-defined conversion.
788
789 PR c++/60872
790 * call.c (standard_conversion): Don't try to apply restrict to void.
791
792 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
793
794 * decl.c (reshape_init_r): Handle a single element of vector type.
795
796 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
797
798 PR c++/60765
799 * decl2.c (cplus_decl_attributes): Handle
800 pointer-to-member-function declarations.
801
802 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
803
804 PR c++/60764
805 * call.c (build_user_type_coversion): Use build_dummy_object
806 to create the placeholder object for a constructor method call.
807 (build_special_member_call): Likewise.
808 (build_over_call): Check for the placeholder object with
809 is_dummy_object.
810 (build_new_method_call_1): Likewise. Don't attempt to resolve
811 a dummy object for a constructor method call.
812
813 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
814
815 PR c++/59295
816 * friend.c (add_friend, make_friend_class): Move repeated friend
817 warning under Wredundant_decls.
818
819 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
820
821 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
822 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
823 (do_class_using_decl): Likewise.
824 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
825
826 2014-04-15 Jakub Jelinek <jakub@redhat.com>
827
828 PR plugins/59335
829 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
830
831 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
832
833 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
834
835 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
836
837 * pt.c (mark_template_parm): Use template_parm_level_and_index.
838
839 2014-04-11 Jason Merrill <jason@redhat.com>
840
841 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
842 * parser.c: Adjust.
843 (cp_lexer_get_preprocessor_token): Always clear it.
844 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
845
846 DR 1467
847 PR c++/51747
848 * decl.c (reshape_init_r): Handle a single element of class type.
849
850 DR 1338
851 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
852 built-in operator new.
853
854 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
855
856 PR c++/58600
857 * name-lookup.c (parse_using_directive): Return early if the
858 attribs argument is error_mark_node; use get_attribute_name.
859
860 2014-04-11 Jason Merrill <jason@redhat.com>
861
862 DR 1030
863 PR c++/51253
864 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
865 * call.c (struct z_candidate): Add flags field.
866 (add_candidate): Add flags parm.
867 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
868 (add_template_candidate_real): Pass it.
869 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
870 * tree.c (build_aggr_init_expr): Copy it.
871 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
872
873 2014-04-10 Richard Biener <rguenther@suse.de>
874 Jakub Jelinek <jakub@redhat.com>
875
876 PR ipa/60761
877 * error.c (dump_decl) <case FUNCTION_DECL>: If
878 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
879 recurse on DECL_ABSTRACT_ORIGIN instead of printing
880 <built-in>.
881
882 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
883
884 * pt.c (check_template_variable): Check for the return of pedwarn
885 before emitting a note.
886 * parser.c (cp_parser_lambda_introducer): Likewise.
887
888 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
889
890 PR c++/59115
891 * pt.c (process_template_parm): For an invalid non-type parameter
892 only set TREE_TYPE to error_mark_node.
893 (push_inline_template_parms_recursive, comp_template_parms,
894 redeclare_class_template, coerce_template_template_parm,
895 coerce_template_template_parms, unify): Use error_operand_p.
896
897 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
898
899 * class.c (check_bases_and_members): Warn about non-virtual dtors
900 in public bases only. Check warn_ecpp before complaining about
901 non-polymorphic bases.
902
903 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
904
905 * decl.c (duplicate_decls): Check for the return of warning_at
906 before emitting a note.
907 (warn_misplaced_attr_for_class_type): Likewise.
908 (check_tag_decl): Likewise.
909
910 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
911
912 PR c++/58207
913 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
914
915 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
916
917 PR c++/44613
918 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
919 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
920 instantiating a variable-sized type.
921
922 PR c++/21113
923 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
924
925 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
926
927 * class.c (find_abi_tags_r): Check for the return of warning
928 before emitting a note.
929 (one_inherited_ctor): Likewise.
930
931 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
932
933 * decl.c (duplicate_decls): Check for the return of permerror
934 before emitting a note.
935
936 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
937
938 * class.c (accessible_nvdtor_p): New.
939 (check_bases): Don't check base destructor here ...
940 (check_bases_and_members): ... check them here. Trigger on
941 Wnon-virtual-dtor flag.
942 (finish_struct_1): Use accessible_nvdtor_p.
943
944 2014-04-01 Jason Merrill <jason@redhat.com>
945
946 * pt.c (process_partial_specialization): Say "not deducible"
947 rather than "not used". Use inform.
948
949 PR c++/60374
950 * pt.c (coerce_template_parms): Check that the pack expansion
951 pattern works with the first matching parameter.
952
953 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
954
955 * init.c (perform_member_init): Homogenize uninitialized
956 diagnostics.
957
958 2014-04-01 Jason Merrill <jason@redhat.com>
959
960 PR c++/60708
961 * call.c (build_array_conv): Call complete_type.
962
963 PR c++/60713
964 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
965 (picflag_from_initializer): Return it.
966 (process_init_constructor): Handle it.
967
968 PR c++/60642
969 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
970 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
971 * pt.c (get_template_info): Handle NAMESPACE_DECL.
972 (most_general_template): Handle more kinds of template.
973 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
974 instantiations and specializations.
975
976 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
977
978 PR c++/44859
979 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
980 COMPONENT_REFs and ARRAY_REFs sooner.
981
982 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
983
984 PR c++/60626
985 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
986 usage in non-functions with pushed scope.
987
988 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
989
990 PR c++/60573
991 * name-lookup.h (cp_binding_level): New transient field defining_class_p
992 to indicate whether a scope is in the process of defining a class.
993 * semantics.c (begin_class_definition): Set defining_class_p.
994 * name-lookup.c (leave_scope): Reset defining_class_p.
995 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
996 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
997 unwinding to class-defining scope to handle the erroneous definition of
998 a generic function of an arbitrarily nested class within an enclosing
999 class.
1000
1001 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
1002
1003 PR c++/52369
1004 * method.c (walk_field_subobs): Improve the diagnostic
1005 locations for both REFERENCE_TYPEs and non-static const members.
1006 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
1007 instead of %qD to be consistent with the c++11 diagnostic.
1008
1009 2014-03-25 Jason Merrill <jason@redhat.com>
1010
1011 PR c++/60566
1012 PR c++/58678
1013 * class.c (build_vtbl_initializer): Handle abstract dtors here.
1014 * search.c (get_pure_virtuals): Not here.
1015
1016 PR c++/60375
1017 * parser.c (cp_parser_lambda_expression): Don't parse the body of
1018 a lambda in unevaluated context.
1019
1020 PR c++/60628
1021 * decl.c (create_array_type_for_decl): Complain about array of auto.
1022
1023 2014-03-25 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c++/60331
1026 * semantics.c (potential_constant_expression_1): Handle
1027 DECL_EXPR.
1028
1029 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
1030
1031 PR c++/60627
1032 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
1033 introducing an implicit function template parameter within an explicit
1034 instantiation.
1035
1036 2014-03-22 Jason Merrill <jason@redhat.com>
1037
1038 PR c++/60574
1039 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
1040 to error.
1041
1042 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1043
1044 PR c++/60384
1045 * name-lookup.c (push_class_level_binding_1): Check identifier_p
1046 on the name argument.
1047
1048 2014-03-20 Jakub Jelinek <jakub@redhat.com>
1049
1050 PR c++/60572
1051 * init.c (build_zero_init_1): Ignore fields with error_mark_node
1052 type.
1053
1054 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1055
1056 PR c++/51474
1057 * call.c (build_new_method_call_1): Handle pure virtuals called by
1058 NSDMIs too.
1059
1060 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
1061
1062 PR c++/60390
1063 * parser.c (cp_parser_member_declaration): Don't allow
1064 finish_fully_implicit_template to consider friend declarations to be
1065 class member templates.
1066 (synthesize_implicit_template_parm): Handling winding back through class
1067 scope to the class being defined in order to inject a template argument
1068 list.
1069
1070 PR c++/60391
1071 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
1072 function scope as per cp_parser_skip_to_end_of_statement.
1073
1074 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1075
1076 PR c++/59571
1077 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
1078
1079 2014-03-14 Jason Merrill <jason@redhat.com>
1080
1081 PR c++/60532
1082 PR c++/58678
1083 * search.c (get_pure_virtuals): Handle abstract dtor here.
1084 (dfs_get_pure_virtuals): Not here.
1085
1086 PR c++/58678
1087 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
1088 abstract class as pure.
1089
1090 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1091
1092 PR c++/60383
1093 * pt.c (maybe_process_partial_specialization): Check return value
1094 of check_specialization_namespace.
1095
1096 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1097
1098 PR c++/60254
1099 * semantics.c (finish_static_assert): Call cxx_constant_value only
1100 if require_potential_rvalue_constant_expression returns true.
1101
1102 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
1103
1104 PR c++/60389
1105 * method.c (get_inherited_ctor): New.
1106 * cp-tree.h (get_inherited_ctor): Declare it.
1107 * semantics.c (is_valid_constexpr_fn): Use it.
1108
1109 2014-03-10 Jason Merrill <jason@redhat.com>
1110
1111 PR c++/60367
1112 * call.c (convert_default_arg): Remove special handling for
1113 CONSTRUCTOR.
1114
1115 PR c++/53492
1116 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
1117 when deciding whether to call push_template_decl for a member class.
1118 * pt.c (push_template_decl_real): Return after wrong levels error.
1119
1120 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
1121
1122 PR c++/60033
1123 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
1124 lambda, remove the lambda's own template argument list prior to fetching
1125 the specialization.
1126
1127 PR c++/60393
1128 * parser.c (cp_parser_parameter_declaration_clause): Move generic
1129 function template unwinding on error into a more general location, ...
1130 (cp_parser_skip_to_end_of_statement): ... here.
1131
1132 2014-03-07 Jason Merrill <jason@redhat.com>
1133
1134 * Make-lang.in (check_g++_parallelize): Split dg.exp.
1135
1136 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
1137 we're in a trailing return type.
1138
1139 * typeck.c (comp_template_parms_position): 'auto' and
1140 'decltype(auto)' are different from real template parms.
1141
1142 * parser.c (cp_parser_using_declaration): Consume the semicolon
1143 after bare parameter pack error.
1144
1145 * cp-tree.h (REF_PARENTHESIZED_P): New.
1146 * semantics.c (force_paren_expr): Set it.
1147 * pt.c (do_auto_deduction): Check it.
1148 (tsubst) [COMPONENT_REF]: Copy it.
1149 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
1150
1151 * decl.c (create_array_type_for_decl): Only warn about invalid
1152 C++1y VLA if flag_iso or warn_vla>0.
1153 (grokdeclarator): Likewise.
1154 * pt.c (tsubst): Likewise.
1155 * semantics.c (finish_decltype_type): Likewise.
1156 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
1157 (cp_build_addr_expr_1): Likewise.
1158 * init.c (build_new_1): Improve diagnostics.
1159
1160 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1161
1162 PR c++/58609
1163 * decl.c (check_initializer): Return NULL_TREE after error;
1164 consistently use inform.
1165
1166 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1167
1168 * decl.c (check_initializer): Remove dead code.
1169
1170 2014-03-06 Marek Polacek <polacek@redhat.com>
1171
1172 PR c/60197
1173 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
1174 of checking tree code.
1175
1176 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1177
1178 * parser.c (cp_lexer_set_source_position): New.
1179 (cp_parser_mem_initializer): Use it.
1180 (cp_parser_postfix_open_square_expression): Likewise.
1181 (cp_parser_parenthesized_expression_list): Likewise.
1182 (cp_parser_new_initializer): Likewise.
1183 (cp_parser_jump_statement): Likewise.
1184 (cp_parser_initializer): Likewise.
1185 (cp_parser_functional_cast): Likewise.
1186
1187 2014-03-05 Jason Merrill <jason@redhat.com>
1188
1189 PR c++/60409
1190 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
1191 dependent expression.
1192
1193 PR c++/60361
1194 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
1195 if re-parsing might succeed.
1196 * semantics.c (finish_id_expression): Use of a parameter outside
1197 the function body is a parse error.
1198
1199 * parser.c (cp_parser_mem_initializer): Set input_location
1200 properly for init-list warning.
1201 (cp_parser_postfix_open_square_expression): Likewise.
1202 (cp_parser_parenthesized_expression_list): Likewise.
1203 (cp_parser_new_initializer): Likewise.
1204 (cp_parser_jump_statement): Likewise.
1205 (cp_parser_initializer): Likewise.
1206 (cp_parser_functional_cast): Likewise.
1207
1208 2014-03-04 Jason Merrill <jason@redhat.com>
1209
1210 PR c++/60417
1211 * typeck2.c (process_init_constructor_record): Set
1212 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
1213
1214 PR c++/60415
1215 PR c++/54359
1216 * parser.c (cp_parser_direct_declarator): Set declarator to
1217 cp_error_declarator on invalid qualified-id.
1218
1219 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1220
1221 PR c++/60376
1222 * parser.c (cp_parser_using_declaration): Early return when
1223 cp_parser_nested_name_specifier errors out.
1224
1225 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
1226
1227 PR c++/60377
1228 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
1229 function scope on parse error in function parameter list.
1230
1231 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
1232
1233 * method.c (implicitly_declare_fn): Remove redundant
1234 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
1235 * semantics.c (is_instantiation_of_constexpr): Likewise.
1236 * error.c (dump_function_decl): Likewise.
1237
1238 2014-03-01 Jason Merrill <jason@redhat.com>
1239
1240 PR c++/60379
1241 * semantics.c (begin_maybe_infinite_loop): Use
1242 fold_non_dependent_expr_sfinae.
1243
1244 2014-02-28 Jason Merrill <jason@redhat.com>
1245
1246 PR c++/58845
1247 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
1248
1249 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
1250
1251 PR c++/58610
1252 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
1253 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
1254 * lambda.c (maybe_add_lambda_conv_op): Likewise.
1255
1256 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1257
1258 PR c++/60253
1259 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
1260 error_at.
1261
1262 2014-02-27 Jason Merrill <jason@redhat.com>
1263
1264 PR c++/60353
1265 PR c++/55877
1266 * decl2.c (tentative_decl_linkage): Don't mess with functions that
1267 are not yet defined.
1268
1269 2014-02-26 Jason Merrill <jason@redhat.com>
1270
1271 PR c++/60347
1272 PR lto/53808
1273 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
1274 * init.c (build_vtbl_address): Do it here.
1275
1276 PR c++/59231
1277 PR c++/11586
1278 PR c++/14710
1279 PR c++/57132
1280 * pt.c (struct warning_sentinel): New.
1281 (tsubst_copy_and_build): Use it instead of
1282 c_inhibit_evaluation_warnings.
1283 * typeck.c (maybe_warn_about_useless_cast): Remove
1284 c_inhibit_evaluation_warnings check.
1285
1286 PR c++/54440
1287 * pt.c (get_template_parm_index): New.
1288 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
1289 (process_template_parm): Allow bare packs in template template
1290 parm template parms.
1291 (coerce_template_parameter_pack): Handle fixed template template
1292 parm packs and fixed packs not at the end of the parm list.
1293 (coerce_template_parms): Handle template parm packs not at the end
1294 of the parm list.
1295 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
1296
1297 PR c++/60182
1298 * pt.c (unify): Ignore alias templates when deducing a template
1299 template parameter.
1300
1301 PR c++/60345
1302 Revert:
1303 DR 1571
1304 * call.c (reference_binding): Recurse on user-defined conversion.
1305 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1306
1307 2014-02-25 Jason Merrill <jason@redhat.com>
1308
1309 DR 1571
1310 * call.c (reference_binding): Recurse on user-defined conversion.
1311 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1312
1313 * call.c (print_conversion_rejection): Handle n_arg of -2.
1314 (build_user_type_conversion_1): Pass it.
1315
1316 PR c++/55877
1317 * decl2.c (no_linkage_error): Handle C++98 semantics.
1318 (reset_type_linkage): Move from decl.c.
1319 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
1320 (bt_reset_linkage_2, reset_decl_linkage): New.
1321 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
1322 (cp_write_global_declarations): Move condition into no_linkage_error.
1323 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
1324 * semantics.c (expand_or_defer_fn_1): Factor out
1325 tentative_decl_linkage.
1326 * cp-tree.h: Adjust.
1327
1328 * decl2.c (finish_static_data_member_decl): Diagnose static data
1329 member in unnamed class.
1330 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
1331
1332 PR lto/53808
1333 * class.c (clone_function_decl): Call note_vague_linkage_fn for
1334 defaulted virtual dtor.
1335
1336 DR 1286
1337 PR c++/60328
1338 * pt.c (get_underlying_template): Fix equivalence calculation.
1339
1340 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
1341
1342 PR c++/60311
1343 * parser.c (function_being_declared_is_template_p): Return false when
1344 processing a template parameter list.
1345 (cp_parser_parameter_declaration_clause): Don't set
1346 auto_is_implicit_function_template_parm_p when processing a
1347 template parameter list.
1348
1349 * parser.c (synthesize_implicit_template_parm): Inject new template
1350 argument list appropriately when a generic member function
1351 of a class template is declared out-of-line.
1352
1353 PR c++/60065
1354 * parser.c (cp_parser_direct_declarator): Don't save and
1355 restore num_template_parameter_lists around call to
1356 cp_parser_parameter_declaration_list.
1357 (function_being_declared_is_template_p): New predicate.
1358 (cp_parser_parameter_declaration_list): Use
1359 function_being_declared_is_template_p as predicate for
1360 inspecting current function template parameter list length
1361 rather than num_template_parameter_lists.
1362
1363 2014-02-24 Jason Merrill <jason@redhat.com>
1364
1365 PR c++/60146
1366 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
1367 DECL_EXPR initialize a non-class iterator.
1368
1369 PR c++/60312
1370 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
1371
1372 2014-02-21 Jason Merrill <jason@redhat.com>
1373
1374 PR c++/58170
1375 * parser.c (cp_parser_type_name): Always check dependency.
1376 (cp_parser_type_specifier_seq): Call
1377 cp_parser_parse_and_diagnose_invalid_type_name.
1378
1379 PR c++/60108
1380 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
1381
1382 PR c++/60185
1383 * parser.c (cp_parser_default_argument): Clear
1384 current_class_ptr/current_class_ref like tsubst_default_argument.
1385
1386 PR c++/60252
1387 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1388 than current_binding_level.
1389
1390 PR c++/60186
1391 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1392
1393 PR c++/60187
1394 * parser.c (cp_parser_enum_specifier): Call
1395 check_for_bare_parameter_packs.
1396
1397 PR c++/59347
1398 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1399 erroneous typedef.
1400
1401 PR c++/60241
1402 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1403 of the partial instantiation, not the most general template.
1404 (maybe_process_partial_specialization): Reassign everything on
1405 that list.
1406
1407 PR c++/60216
1408 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1409 (check_explicit_specialization): Don't clone.
1410
1411 PR c++/60219
1412 * pt.c (coerce_template_parms): Bail if argument packing fails.
1413
1414 PR c++/60224
1415 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1416 Don't get confused by a CONSTRUCTOR that already has a type.
1417
1418 PR c++/60227
1419 * call.c (build_array_conv): Don't crash on VLA.
1420
1421 PR c++/60248
1422 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1423
1424 PR c++/60252
1425 * lambda.c (maybe_resolve_dummy): Don't try to capture this
1426 in declaration context.
1427
1428 DR 1591
1429 PR c++/60051
1430 * pt.c (unify): Only unify if deducible. Handle 0-length list.
1431
1432 PR c++/60250
1433 * parser.c (cp_parser_direct_declarator): Don't wrap a
1434 type-dependent expression in a NOP_EXPR.
1435
1436 PR c++/60251
1437 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1438
1439 PR c++/60167
1440 PR c++/60222
1441 PR c++/58606
1442 * parser.c (cp_parser_template_argument): Restore dereference.
1443 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1444 (process_partial_specialization): Handle deref.
1445 (unify): Likewise.
1446
1447 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
1448
1449 PR c++/60052
1450 PR c++/60053
1451 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1452 implicit_template_scope upon leaving an out-of-line generic member
1453 function definition.
1454
1455 2014-02-20 Kai Tietz <ktietz@redhat.com>
1456
1457 PR c++/58873
1458 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1459 valued type argument as error_mark_node.
1460
1461 PR c++/58835
1462 * semantics.c (finish_fname): Handle error_mark_node.
1463
1464 2014-02-19 Jason Merrill <jason@redhat.com>
1465
1466 PR c++/60046
1467 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1468 spec from template context.
1469
1470 2014-02-19 Jakub Jelinek <jakub@redhat.com>
1471
1472 PR debug/56563
1473 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1474 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1475
1476 PR c++/60267
1477 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1478
1479 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1480
1481 PR c++/60225
1482 * semantics.c (ensure_literal_type_for_constexpr_object): Use
1483 strip_array_types.
1484
1485 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1486
1487 PR c++/60215
1488 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1489 During error recovery allow_non_constant may be false.
1490
1491 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
1492
1493 PR c++/60190
1494 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1495 scope whenever a template parameter list has been started, independent
1496 of whether the function call operator was well-formed or not.
1497
1498 PR c++/60064
1499 * parser.c (cp_parser_member_declaration): Pop fully implicit template
1500 scope for generic friend declarations as well as for non-friends.
1501
1502 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
1503
1504 PR c++/60047
1505 * method.c (implicitly_declare_fn): A constructor of a class with
1506 virtual base classes isn't constexpr (7.1.5p4).
1507
1508 2014-02-05 Jan Hubicka <hubicka@ucw.cz
1509
1510 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
1511
1512 2014-02-05 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR c++/58703
1515 * parser.c (cp_parser_omp_declare_reduction): Save and free
1516 declarator_obstack.
1517
1518 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
1519
1520 PR c++/53017
1521 PR c++/59211
1522 * tree.c (handle_init_priority_attribute): Call default_conversion on
1523 the attribute argument.
1524
1525 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1526
1527 PR c++/58871
1528 * method.c (synthesized_method_walk): If vbases is non-null but
1529 is_empty is true, likewise don't worry about the virtual bases.
1530
1531 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1532
1533 PR c++/51219
1534 * typeck2.c (process_init_constructor_record): Just skip unnamed
1535 bit-fields.
1536
1537 2014-01-31 Jason Merrill <jason@redhat.com>
1538
1539 PR c++/59469
1540 * pt.c (mark_decl_instantiated): Call mark_needed.
1541
1542 PR c++/58672
1543 * decl2.c (handle_tls_init): Handle null init fn.
1544
1545 PR c++/55800
1546 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
1547
1548 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
1549
1550 PR c++/59082
1551 * class.c (build_vfield_ref): Early return error_mark_node if
1552 TYPE_VFIELD (type) is null.
1553 (build_base_path): Check return value of build_vfield_ref.
1554
1555 2014-01-31 Jason Merrill <jason@redhat.com>
1556
1557 PR c++/59646
1558 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
1559 [ck_list]: Check for error_mark_node.
1560 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
1561
1562 PR c++/57043
1563 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
1564 during partial ordering.
1565
1566 2014-01-31 Marek Polacek <polacek@redhat.com>
1567
1568 PR c/59963
1569 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
1570
1571 2014-01-30 Jason Merrill <jason@redhat.com>
1572
1573 PR c++/57899
1574 * cp-tree.h (struct saved_scope): Add x_local_specializations.
1575 (local_specializations): New macro.
1576 * pt.c (local_specializations): Remove variable.
1577
1578 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
1579
1580 PR c++/58708
1581 * parser.c (make_string_pack): Use double_int::from_buffer.
1582
1583 2014-01-30 Marek Polacek <polacek@redhat.com>
1584
1585 PR c/59940
1586 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
1587 input_location.
1588 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
1589 with input_location.
1590 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
1591 loc parameter.
1592
1593 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1594
1595 PR c++/58843
1596 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
1597
1598 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1599
1600 PR c++/58649
1601 * pt.c (lookup_template_class_1): Check start_enum return value
1602 for error_mark_node.
1603
1604 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1605
1606 * decl.c (duplicate_decls, typename_hash, typename_compare):
1607 Use TYPE_IDENTIFIER.
1608 * error.c (dump_type): Likewise.
1609 * mangle.c (dump_substitution_candidates): Likewise.
1610
1611 2014-01-30 Jason Merrill <jason@redhat.com>
1612
1613 PR c++/59633
1614 * decl2.c (attributes_naming_typedef_ok): New.
1615 * cp-tree.h: Declare it.
1616 * decl.c (grokdeclarator): Check it.
1617 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
1618
1619 2014-01-29 Jason Merrill <jason@redhat.com>
1620
1621 PR c++/59707
1622 * call.c (add_builtin_candidate): Catch dependent types.
1623
1624 PR c++/59989
1625 * pt.c (expand_template_argument_pack): Correct
1626 non_default_args_count calculation.
1627
1628 PR c++/58466
1629 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
1630
1631 PR c++/59956
1632 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
1633 have a friend template in a class template.
1634 * pt.c (tsubst_friend_function): Look through it.
1635 (push_template_decl_real): A friend member template is
1636 primary.
1637
1638 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1639
1640 PR c++/58846
1641 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
1642 == error_mark_node.
1643
1644 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1645
1646 PR c++/58674
1647 * pt.c (instantiate_template_1): Check for error_mark_node the second
1648 argument too.
1649
1650 2014-01-29 Jason Merrill <jason@redhat.com>
1651
1652 PR c++/59916
1653 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
1654 cdtor_returns_this case.
1655
1656 PR c++/59315
1657 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
1658
1659 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1660
1661 PR c++/58702
1662 * semantics.c (finish_omp_reduction_clause): Check type for
1663 error_mark_node.
1664
1665 2014-01-28 Jason Merrill <jason@redhat.com>
1666
1667 PR c++/59791
1668 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
1669 (tsubst_copy): Use it if lookup fails.
1670
1671 PR c++/59818
1672 * pt.c (tsubst_function_type): Make sure we keep the same function
1673 quals.
1674
1675 PR c++/58701
1676 * semantics.c (build_anon_member_initialization): Stop walking
1677 when we run out of COMPONENT_REFs.
1678
1679 PR c++/58632
1680 * decl.c (lookup_and_check_tag): Ignore template parameters if
1681 scope == ts_current.
1682 * pt.c (check_template_shadow): Don't complain about the injected
1683 class name.
1684
1685 * decl.c (duplicate_decls): Tweak.
1686
1687 PR c++/53756
1688 * mangle.c (write_unqualified_name): Handle operator auto.
1689
1690 2014-01-27 Jason Merrill <jason@redhat.com>
1691
1692 PR c++/59823
1693 Core DR 1138
1694 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
1695 list-initialization. A conversion to rvalue ref that involves
1696 an lvalue-rvalue conversion is bad.
1697 (convert_like_real): Give helpful error message.
1698
1699 PR c++/54652
1700 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
1701
1702 PR c++/58504
1703 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
1704 types.
1705
1706 PR c++/58606
1707 * pt.c (template_parm_to_arg): Call convert_from_reference.
1708 (tsubst_template_arg): Don't strip reference refs.
1709
1710 PR c++/58639
1711 * call.c (build_aggr_conv): Reject value-initialization of reference.
1712
1713 PR c++/58812
1714 PR c++/58651
1715 * call.c (convert_like_real): Give helpful error about excess braces
1716 for ck_rvalue of scalar type.
1717
1718 Core DR 1288
1719 * call.c (reference_binding): Only elide braces if the single
1720 element is reference-related.
1721
1722 PR c++/58814
1723 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
1724 stabilizing.
1725
1726 PR c++/58837
1727 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
1728 FUNCTION_DECL.
1729
1730 PR c++/59097
1731 * decl.c (compute_array_index_type): Don't call
1732 maybe_constant_value for a non-integral expression.
1733
1734 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1735
1736 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
1737 flag_cilkplus.
1738 * cp-gimplify.c (cp_genericize): Likewise.
1739 * decl.c (grokfndecl): Likewise.
1740 * parser.c (cp_parser_postfix_expression): Likewise.
1741 (cp_parser_postfix_open_square_expression): Likewise.
1742 (cp_parser_direct_declarator): Likewise.
1743 (is_cilkplus_vector_p): Likewise.
1744 (cp_parser_omp_clause_name): Likewise.
1745 (cp_parser_omp_all_clauses): Likewise.
1746 * pt.c (apply_late_template_attributes): Likewise.
1747 * typeck.c (cp_build_array_ref): Likewise.
1748 (cp_build_compound_expr): Likewise.
1749 (check_return_expr): Likewise.
1750
1751 2014-01-24 Jason Merrill <jason@redhat.com>
1752
1753 PR c++/58550
1754 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
1755 c++11 into error.
1756
1757 PR c++/59886
1758 PR c++/59659
1759 * typeck2.c (process_init_constructor_array): Don't create
1760 RANGE_EXPR yet.
1761
1762 2014-01-24 Jakub Jelinek <jakub@redhat.com>
1763
1764 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
1765 handling for RANGE_ARRAY case.
1766
1767 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1768
1769 PR c++/57524
1770 * name-lookup.c (push_using_directive): Use timevar_cond_start.
1771
1772 2014-01-23 Marek Polacek <polacek@redhat.com>
1773
1774 PR c/59846
1775 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
1776
1777 2014-01-23 Marek Polacek <polacek@redhat.com>
1778
1779 PR c/58346
1780 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1781 an empty aggregate.
1782
1783 2014-01-23 Jason Merrill <jason@redhat.com>
1784
1785 PR c++/55189
1786 * cp-tree.h (struct language_function): Add infinite_loop and
1787 infinite_loops.
1788 (current_function_infinite_loop): New.
1789 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
1790 (break_maybe_infinite_loop): New.
1791 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
1792 (finish_do_stmt, finish_for_cond, finish_for_stmt)
1793 (begin_range_for_stmt): Use them.
1794 * decl.c (finish_function): Don't warn about missing return
1795 if current_function_infinite_loop.
1796 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
1797 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
1798
1799 * call.c (build_op_delete_call): Use make_tree_vector and
1800 release_tree_vector.
1801
1802 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1803
1804 PR c++/58980
1805 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
1806 nested_name_specifier.
1807
1808 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1809
1810 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
1811 see if there is an attribute after function decl. If so, then
1812 parse them now.
1813 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
1814 enabled function late parsing.
1815 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
1816 attribute for a SIMD-enabled function.
1817 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
1818 the function is used by SIMD-enabled function (indicated by NULL
1819 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
1820 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
1821 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
1822 vectorlength clause in SIMD-enabled function and #pragma SIMD's
1823 vectorlength clause. Added a new bool parameter to differentiate
1824 between the two.
1825 (cp_parser_cilk_simd_fn_vector_attrs): New function.
1826 (is_cilkplus_vector_p): Likewise.
1827 (cp_parser_late_parsing_elem_fn_info): Likewise.
1828 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
1829 and "vectorlength" clauses when Cilk Plus is enabled.
1830 (cp_parser_omp_clause_linear): Added a new parameter of type bool
1831 and emit a sorry message when step size is a parameter.
1832 * parser.h (cp_parser::cilk_simd_fn_info): New field.
1833 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
1834 flag_openmp.
1835 * pt.c (apply_late_template_attributes): Likewise.
1836
1837 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR middle-end/58809
1840 * semantics.c (finish_omp_reduction_clause): Reject
1841 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1842
1843 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
1844
1845 PR c++/59482
1846 * parser.c (cp_parser_class_head): Push the class before parsing
1847 the base-clause, pop after it.
1848
1849 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1850
1851 * decl2.c (cpp_check): Revert prototype change.
1852
1853 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1854
1855 PR c++/59270
1856 PR c++/58811
1857 * init.c (build_value_init_noctor): Don't pass error_mark_node to
1858 build_value_init.
1859
1860 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
1861
1862 PR c++/59269
1863 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
1864 only when errorcount == 0.
1865
1866 2014-01-17 Marek Polacek <polacek@redhat.com>
1867
1868 PR c++/59838
1869 * cvt.c (ocp_convert): Don't segfault on non-existing
1870 ENUM_UNDERLYING_TYPE.
1871
1872 2014-01-16 Jason Merrill <jason@redhat.com>
1873
1874 PR c++/59821
1875 * tree.c (bot_manip): Update the location of builtin_LINE and
1876 builtin_FILE calls.
1877
1878 2014-01-14 Jason Merrill <jason@redhat.com>
1879
1880 PR c++/59659
1881 * typeck2.c (massage_init_elt): New.
1882 (process_init_constructor_record)
1883 (process_init_constructor_union): Use it.
1884 (process_init_constructor_array): Use it. Use RANGE_EXPR.
1885 (split_nonconstant_init_1): Handle it.
1886 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
1887
1888 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1889
1890 PR c++/59631
1891 * parser.c (cp_parser_postfix_expression): Added a new if-statement
1892 and replaced an existing if-statement with else-if statement.
1893 Changed an existing error message wording to match the one from the C
1894 parser.
1895
1896 2014-01-08 Jason Merrill <jason@redhat.com>
1897
1898 PR c++/59614
1899 * class.c (abi_tag_data): Add tags field.
1900 (check_abi_tags): Initialize it.
1901 (find_abi_tags_r): Support collecting missing tags.
1902 (mark_type_abi_tags): Don't look at template args.
1903 (inherit_targ_abi_tags): New.
1904 (check_bases_and_members): Use it.
1905 * cp-tree.h (ABI_TAG_IMPLICIT): New.
1906 * mangle.c (write_abi_tags): Check it.
1907
1908 2014-01-07 Jason Merrill <jason@redhat.com>
1909
1910 PR c++/58856
1911 * pt.c (num_innermost_template_parms): New.
1912 (get_underlying_template): Use it.
1913
1914 PR c++/58965
1915 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
1916
1917 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
1918
1919 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
1920 the letter of 20.11.6 about Base and Derived naming the same
1921 class type modulo cv-qualifiers.
1922
1923 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
1924
1925 PR c++/59635
1926 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
1927 function as unimplemented for generic lambdas with varargs.
1928
1929 PR c++/59636
1930 * parser.c (cp_parser_template_parameter): Early out with
1931 error_mark_node if parameter declaration was not parsed.
1932
1933 PR c++/59629
1934 * parser.c (cp_parser_lambda_expression): Save/reset/restore
1935 auto_is_implicit_function_template_parm_p around lambda body.
1936
1937 PR c++/59638
1938 * parser.c (cp_parser_init_declarator): Undo fully implicit
1939 template parameter list when declarator is not a function.
1940
1941 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
1942
1943 PR c++/58950
1944 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
1945
1946 2014-01-03 Tobias Burnus <burnus@net-b.de>
1947
1948 PR c++/58567
1949 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
1950
1951 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1952
1953 Core DR 1442
1954 PR c++/59165
1955 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
1956 as include_std to perform_koenig_lookup.
1957 (cp_parser_postfix_expression): Adjust.
1958 * pt.c (tsubst_copy_and_build): Likewise.
1959 * semantics.c (perform_koenig_lookup): Remove bool parameter.
1960 (omp_reduction_lookup): Adjust.
1961 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
1962 (lookup_arg_dependent): Likewise.
1963 (lookup_function_nonclass): Adjust.
1964 * name-lookup.h: Adjust declaration.
1965 * cp-tree.h: Likewise.
1966
1967 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1968
1969 PR c++/59087
1970 * parser.c (cp_parser_userdef_numeric_literal): Mention
1971 -fext-numeric-literals in the message.
1972
1973 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1974
1975 PR c++/59641
1976 * call.c (build_conditional_expr_1): Check the return value of
1977 force_rvalue.
1978
1979 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1980
1981 * call.c (convert_like_real): Check complain.
1982
1983 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
1984
1985 PR c++/59378
1986 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
1987 in templates.
1988
1989 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1990
1991 Update copyright years
1992
1993 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1994
1995 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
1996 the standard form for the copyright notice.
1997 \f
1998 Copyright (C) 2014 Free Software Foundation, Inc.
1999
2000 Copying and distribution of this file, with or without modification,
2001 are permitted in any medium without royalty provided the copyright
2002 notice and this notice are preserved.