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