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