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