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