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