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