]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
6bc2962255b2caa93ec617ed21b7ba49eab25397
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2
3 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
4 rather than pointer_hash.
5 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
6 * semantics.c (nrv_data): Likewise.
7 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
8
9 2015-06-24 Jason Merrill <jason@redhat.com>
10
11 PR c++/66647
12 * pt.c (dependent_type_p_r): Check for dependent alias template
13 specialization sooner.
14
15 PR c++/66501
16 * class.c (type_has_nontrivial_assignment): Remove.
17 * cp-tree.h: Remove declaration.
18 * init.c (vec_copy_assign_is_trivial): New.
19 (build_vec_init): Use it.
20
21 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
22
23 Implement N3928 - Extending static_assert
24 * parser.c (cp_parser_static_assert): Support static_assert with
25 no message string. Supply an empty string in this case.
26 * semantics.c (finish_static_assert): Don't try to print a message if
27 the message strnig is empty.
28
29 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
30
31 PR c++/65750
32 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
33 implicit template parm if 'auto' is a placeholder for trailing
34 return type.
35
36 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
37
38 Revert:
39 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
40
41 PR c++/30044
42 * parser.c (cp_parser_template_parameter_list): Update
43 current_template_parms right after processing a paramater.
44 * pt.c (template_parms_to_args): Remove obsolete hack for
45 giving template template arguments the proper level.
46 (check_default_tmpl_args): Account for tested template
47 parameter_lists.
48 (splite_late_return_type): Remove obsolete hack for giving
49 template template arguments the proper level.
50
51 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
52
53 PR c++/65811
54 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
55
56 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
57
58 PR c++/30044
59 * parser.c (cp_parser_template_parameter_list): Update
60 current_template_parms right after processing a paramater.
61 * pt.c (template_parms_to_args): Remove obsolete hack for
62 giving template template arguments the proper level.
63 (check_default_tmpl_args): Account for tested template
64 parameter_lists.
65 (splite_late_return_type): Remove obsolete hack for giving
66 template template arguments the proper level.
67
68 2015-06-23 Jason Merrill <jason@redhat.com>
69
70 PR c++/65879
71 * decl.c (grokfndecl): Check the linkage of ctype, not just
72 TYPE_ANONYMOUS_P.
73 * tree.c (no_linkage_check): Skip the 'this' pointer.
74
75 PR c++/66501
76 * class.c (type_has_nontrivial_assignment): New.
77 * init.c (build_vec_init): Use it.
78 * cp-tree.h: Declare it.
79 * method.c (trivial_fn_p): Templates aren't trivial.
80
81 PR c++/66542
82 * decl.c (expand_static_init): Make sure the destructor is callable
83 here even if we have an initializer.
84
85 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
86
87 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
88 -fdump-ada-spec is passed.
89
90 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
91
92 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
93
94 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
95
96 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
97
98 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
99
100 * decl.c (grokdeclarator): Remove pointless code.
101
102 2015-06-22 Jason Merrill <jason@redhat.com>
103
104 PR c++/66515
105 * call.c (implicit_conversion): Only reshape for classes.
106
107 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
108
109 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
110 manually swapping.
111 * semantics.c (finish_omp_atomic): Likewise.
112 * typeck.c (cp_build_array_ref): Likewise.
113
114 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
115
116 PR c++/65882
117 * call.c (build_new_op_1): Check tf_warning flag in all cases.
118
119 2015-06-19 Jason Merrill <jason@redhat.com>
120
121 PR c++/66585
122 * pt.c (instantiate_class_template_1): Clear
123 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
124
125 PR c++/65880
126 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
127 cv-qualifiers.
128 * typeck.c (merge_types): build_ptrmemfunc_type before applying
129 quals and attributes.
130
131 PR c++/65973
132 * constexpr.c (build_constexpr_constructor_member_initializers):
133 Handle an empty STATEMENT_LIST.
134
135 PR c++/65843
136 * pt.c (tsubst_copy_and_build): Register a capture proxy in
137 local_specializations.
138
139 2015-06-17 Jason Merrill <jason@redhat.com>
140
141 PR c++/66001
142 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
143 TRY_FINALLY_EXPR.
144 (potential_constant_expression_1): Likewise.
145
146 2015-06-17 Jason Merrill <jason@redhat.com>
147
148 PR c++/66515
149 * call.c (implicit_conversion): Call reshape_init here, early.
150 (build_aggr_conv): Not here.
151
152 2015-06-17 Jakub Jelinek <jakub@redhat.com>
153
154 PR c++/66571
155 * pt.c (tsubst_omp_clause_decl): New function.
156 (tsubst_omp_clauses): Use it or tsubst_copy instead of
157 tsubst_expr on OMP_CLAUSE_DECL.
158
159 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
160
161 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
162 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
163 * decl.c (grokdeclarator, xref_tag_1): Likewise.
164 * error.c (dump_aggr_type): likewise.
165 * pt.c (push_template_decl_real): Likewise.
166 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
167
168 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
169
170 * call.c: Do not include input.h, line-map.h or is-a.h.
171 * class.c: Likewise.
172 * constexpr.c: Likewise.
173 * cp-array-notation.c: Likewise.
174 * cp-gimplify.c: Likewise.
175 * cp-lang.c: Likewise.
176 * cp-objcp-common.c: Likewise.
177 * cp-tree.h: Likewise.
178 * cp-ubsan.c: Likewise.
179 * cvt.c: Likewise.
180 * decl.c: Likewise.
181 * decl2.c: Likewise.
182 * dump.c: Likewise.
183 * error.c: Likewise.
184 * except.c: Likewise.
185 * expr.c: Likewise.
186 * friend.c: Likewise.
187 * init.c: Likewise.
188 * lambda.c: Likewise.
189 * lex.c: Likewise.
190 * mangle.c: Likewise.
191 * method.c: Likewise.
192 * name-lookup.c: Likewise.
193 * optimize.c: Likewise.
194 * parser.c: Likewise.
195 * pt.c: Likewise.
196 * ptree.c: Likewise.
197 * repo.c: Likewise.
198 * rtti.c: Likewise.
199 * search.c: Likewise.
200 * semantics.c: Likewise.
201 * tree.c: Likewise.
202 * typeck.c: Likewise.
203 * typeck2.c: Likewise.
204 * vtable-class-hierarchy.c: Likewise.
205
206 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
207
208 PR c++/59682
209 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
210
211 2015-06-16 Jason Merrill <jason@redhat.com>
212
213 PR c++/66536
214 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
215 mismatch.
216
217 PR c++/58063
218 * tree.c (bot_manip): Remap SAVE_EXPR.
219
220 PR c++/66387
221 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
222
223 2015-06-15 Nathan Sidwell <nathan@acm.org>
224
225 PR c++/58583
226 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
227 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
228 protect it from recursive instantiation.
229
230 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
231
232 PR c++/51048
233 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
234 using a local type is pure virtual.
235
236 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
237
238 * call.c: Remove comment documenting the long-deleted
239 function build_method_call.
240
241 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
242
243 PR c++/65168
244 * typeck.c (cp_build_binary_op): Warn when comparing an address
245 of a reference against NULL.
246
247 2015-06-12 Jason Merrill <jason@redhat.com>
248
249 PR c++/65719
250 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
251 variables as DECL_NOT_REALLY_EXTERN.
252
253 2015-06-11 Jason Merrill <jason@redhat.com>
254
255 PR c++/66445
256 * constexpr.c (potential_constant_expression_1): Handle a
257 DECL_EXPR of TYPE_DECL.
258
259 PR c++/66450
260 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
261 ctx->ctor.
262
263 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
264
265 * decl.c (cxx_init_decl_processing): Register the main
266 translation unit through the new debug hook.
267
268 2015-06-10 Jason Merrill <jason@redhat.com>
269
270 PR c++/66289
271 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
272 * pt.c (push_template_decl_real): Set it.
273 (dependent_alias_template_spec_p): Use it.
274 (dependent_type_p_r): Use dependent_alias_template_spec_p.
275 (uses_all_template_parms_data, uses_all_template_parms_r)
276 (complex_alias_template_p): New.
277 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
278
279 2015-06-09 Jason Merrill <jason@redhat.com>
280
281 DR 1467
282 PR c++/51747
283 * typeck2.c (digest_init_r): Replace previous change with
284 gcc_unreachable.
285
286 PR c++/66387
287 * semantics.c (process_outer_var_ref): Make sure the value is
288 actually constant before returning it.
289 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
290 array.
291
292 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
293
294 PR c++/65815
295 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
296 * init.c (expand_default_init): Likewise.
297
298 2015-06-09 Jason Merrill <jason@redhat.com>
299
300 PR c++/66383
301 * tree.c (replace_placeholders_r): Handle placeholders for an
302 outer object.
303 * typeck2.c (store_init_value): Only replace_placeholders for
304 objects of class type.
305
306 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
307
308 * call.c : Adjust include files.
309 * class.c : Likewise.
310 * constexpr.c : Likewise.
311 * cp-array-notation.c : Likewise.
312 * cp-cilkplus.c : Likewise.
313 * cp-gimplify.c : Likewise.
314 * cp-lang.c : Likewise.
315 * cp-objcp-common.c : Likewise.
316 * cp-tree.h : Likewise.
317 * cp-ubsan.c : Likewise.
318 * cvt.c : Likewise.
319 * decl.c : Likewise.
320 * decl2.c : Likewise.
321 * dump.c : Likewise.
322 * error.c : Likewise.
323 * except.c : Likewise.
324 * expr.c : Likewise.
325 * friend.c : Likewise.
326 * init.c : Likewise.
327 * lambda.c : Likewise.
328 * lex.c : Likewise.
329 * mangle.c : Likewise.
330 * method.c : Likewise.
331 * name-lookup.c : Likewise.
332 * optimize.c : Likewise.
333 * parser.c : Likewise.
334 * pt.c : Likewise.
335 * ptree.c : Likewise.
336 * repo.c : Likewise.
337 * rtti.c : Likewise.
338 * search.c : Likewise.
339 * semantics.c : Likewise.
340 * tree.c : Likewise.
341 * typeck.c : Likewise.
342 * typeck2.c : Likewise.
343 * vtable-class-hierarchy.c : Likewise.
344
345 2015-06-05 Jason Merrill <jason@redhat.com>
346
347 PR c++/66405
348 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
349 the expansion has extra args.
350 (use_pack_expansion_extra_args_p): Return true in that case.
351
352 PR c++/66405
353 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
354 dependent even if it has a type.
355
356 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
357
358 * cp-objcp-common.c: Adjust comment for
359 cxx_warn_unused_global_decl.
360 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
361 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
362 * cp-tree.h (note_mangling_alias): Protoize.
363 (cp_write_global_declarations): Remove.
364 (cxx_post_compilation_parsing_cleanups): Protoize.
365 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
366 argument.
367 * decl2.c (mangling_aliases): New global.
368 (build_java_method_aliases): New. Adapted from
369 collect_candidates_for_java_method_aliases.
370 (collect_candidates_for_java_method_aliases): Remove.
371 (build_java_method_aliases): Remove.
372 (generate_mangling_aliases): New.
373 (note_mangling_alias): New. Moved from mangle_decl.
374 (locus_at_end_of_parsing): New global.
375 (c_parse_final_cleanups): Rename from
376 cp_write_global_declarations.
377 Use locus_at_end_of_parsing.
378 Call generate_mangling_aliases.
379 Rename call to collect_candidates_for_java_method_aliases into
380 build_java_method_aliases.
381 Remove call to finalize_compilation_unit.
382 Move vtable handling into cxx_post_compilation_parsing_cleanups.
383 Do not call check_global_declarations or
384 emit_debug_global_declarations.
385 (cxx_post_compilation_parsing_cleanups): New.
386 * mangle.c (mangle_decl): Move code to note_mangling_alias.
387 * name-lookup.c (do_namespace_alias): Call early_global_decl.
388
389 2015-06-05 Nathan Sidwell <nathan@acm.org>
390
391 PR c++/52595
392 * parser.c (cp_parser_cache_defarg): Continue looking for
393 declarators when scanning a potential template argument list of an
394 NSDMI.
395
396 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
397
398 * call.c: Adjust includes for restructured coretypes.h.
399 * class.c: Likewise.
400 * constexpr.c: Likewise.
401 * cp-array-notation.c: Likewise.
402 * cp-gimplify.c: Likewise.
403 * cp-lang.c: Likewise.
404 * cp-objcp-common.c: Likewise.
405 * cp-tree.h: Likewise.
406 * cp-ubsan.c: Likewise.
407 * cvt.c: Likewise.
408 * decl.c: Likewise.
409 * decl2.c: Likewise.
410 * dump.c: Likewise.
411 * error.c: Likewise.
412 * except.c: Likewise.
413 * expr.c: Likewise.
414 * friend.c: Likewise.
415 * init.c: Likewise.
416 * lambda.c: Likewise.
417 * lex.c: Likewise.
418 * mangle.c: Likewise.
419 * method.c: Likewise.
420 * name-lookup.c: Likewise.
421 * optimize.c: Likewise.
422 * parser.c: Likewise.
423 * pt.c: Likewise.
424 * ptree.c: Likewise.
425 * repo.c: Likewise.
426 * rtti.c: Likewise.
427 * search.c: Likewise.
428 * semantics.c: Likewise.
429 * tree.c: Likewise.
430 * typeck.c: Likewise.
431 * typeck2.c: Likewise.
432 * vtable-class-hierarchy.c: Likewise.
433
434 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
435
436 PR c++/66192
437 PR target/66200
438 * cp-tree.h (get_guard_cond): Adjust declaration
439 * decl.c (expand_static_init): Use atomic load acquire
440 and adjust call to get_guard_cond.
441 * decl2.c (build_atomic_load_byte): New function.
442 (get_guard_cond): Handle thread_safety.
443 (one_static_initialization_or_destruction): Adjust call to
444 get_guard_cond.
445
446 2015-06-03 Jason Merrill <jason@redhat.com>
447
448 PR c++/44282
449 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
450 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
451 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
452 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
453
454 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
455 Paolo Carlini <paolo.carlini@oracle.com>
456
457 PR c++/66130
458 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
459 use it in the diagnostic.
460 (decay_conversion): Adjust call.
461 * semantics.c (finish_decltype_type): Likewise.
462 * call.c (resolve_args, build_new_op_1,
463 perform_implicit_conversion_flags): Adjust calls.
464 * cvt.c (ocp_convert, convert_to_void): Likewise.
465 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
466
467 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
468
469 * decl.c (check_tag_decl): Use declspecs->locations as locations in
470 error_at and warning_at calls.
471
472 2015-06-03 Marek Polacek <polacek@redhat.com>
473
474 PR sanitizer/66190
475 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
476 (cp_genericize_r): Don't instrument static initializers.
477 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
478
479 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
480
481 * decl.c (start_function): Call plugin before parsing.
482 (finish_function): Call plugin after parsing.
483
484 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
485
486 * cp-tree.h (init_error): Remove declaration.
487 * error.c (scratch_pretty_printer): Rename to ...
488 (actual_pretty_printer): ... this.
489 (cxx_pp): Constify and update accordingly.
490 (init_error): Remove definition.
491 * lex.c (cxx_init): Do not call init_error.
492
493 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
494
495 PR c++/61683
496 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
497
498 2015-06-01 Jason Merrill <jason@redhat.com>
499
500 PR c++/65942
501 * decl2.c (mark_used): Don't always instantiate constexpr fns.
502 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
503
504 PR c++/44282
505 * mangle.c (attr_strcmp): New.
506 (write_CV_qualifiers_for_type): Also write out attributes that
507 affect type identity.
508 (write_type): Strip all attributes after writing qualifiers.
509
510 2015-05-31 Jason Merrill <jason@redhat.com>
511
512 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
513
514 PR c++/66320
515 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
516 with the wrong type as non-constant.
517
518 2015-05-27 Jason Merrill <jason@redhat.com>
519
520 * decl.c (check_redeclaration_exception_specification): Depend on
521 -Wsystem-headers rather than -pedantic.
522
523 * decl.c (warn_extern_redeclared_static): Use the location of
524 newdecl in diagnostics, not input_location.
525 (validate_constexpr_redeclaration): Likewise.
526 (check_redeclaration_no_default_args): Likewise.
527 (duplicate_decls): Likewise.
528 (check_redeclaration_exception_specification): Likewise.
529 Change second diagnostic to inform.
530
531 2015-05-24 Nathan Sidwell <nathan@acm.org>
532
533 PR c++/66243
534 * decl.c (build_enumerator): Don't silently convert scoped enums.
535
536 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
537
538 PR lto/66180
539 * mangle.c (mangle_decl): Mangle anonymous namespace types as
540 "<anon>".
541
542 2015-05-23 Nathan Sidwell <nathan@acm.org>
543
544 PR c++/65936
545 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
546
547 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
548
549 * Make-lang.in (check_g++_parallelize): Update comment.
550
551 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
552
553 PR c++/65598
554 * decl.c (grokdeclarator): Use the correct location in error
555 messages about 'explicit'.
556
557 2015-05-22 Marek Polacek <polacek@redhat.com>
558 Edward Smith-Rowland <3dw4rd@verizon.net>
559
560 PR c/47043
561 * cp-tree.h (build_enumerator): Update declaration.
562 * decl.c (build_enumerator): Add attributes parameter. Call
563 cplus_decl_attributes.
564 * init.c (constant_value_1): Pass tf_none to mark_used.
565 * parser.c (cp_parser_enumerator_definition): Parse attributes and
566 pass them down to build_enumerator.
567 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
568 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
569
570 2015-05-21 Nathan Sidwell <nathan@acm.org>
571
572 PR c++/60943
573 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
574
575 2015-05-21 Marek Polacek <polacek@redhat.com>
576
577 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
578
579 2015-05-20 Jason Merrill <jason@redhat.com>
580
581 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
582 before register_specialization.
583
584 * decl.c (grok_op_properties): Don't complain about size_t
585 placement delete here.
586 * call.c (second_parm_is_size_t): Split out from...
587 (non_placement_deallocation_fn_p): ...here.
588 (build_op_delete_call): Warn about size_t placement delete with
589 -Wc++14-compat.
590
591 2015-05-19 Nathan Sidwell <nathan@acm.org>
592
593 PR c++/65954
594 * typeck.c (finish_class_member_access_expr): Diagnose failed
595 lookup of enum class member.
596
597 2015-05-19 Jakub Jelinek <jakub@redhat.com>
598
599 PR middle-end/66199
600 * parser.c (cp_parser_omp_for_loop): Don't add
601 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
602 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
603 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
604 constructs.
605
606 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
607
608 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
609 swaps.
610
611 2015-05-18 Jason Merrill <jason@redhat.com>
612
613 * pt.c (retrieve_specialization): Make sure our arguments have
614 gone through strip_typedefs.
615
616 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
617 (determine_specialization): Call coerce_template_parms.
618
619 DR 1391
620 * pt.c (type_unification_real): Check convertibility here.
621 (unify_one_argument): Not here.
622
623 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
624 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
625 [TREE_LIST]: Fix no-change case.
626
627 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
628
629 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
630
631 PR fortran/44054
632 * error.c (cp_diagnostic_starter): Use diagnostic_location
633 function.
634 (cp_print_error_function): Likewise.
635 (cp_printer): Replace locus pointer with accessor function.
636
637 2015-05-12 David Malcolm <dmalcolm@redhat.com>
638
639 * parser.c (cp_parser_selection_statement): Add location and
640 guard_kind arguments to calls to
641 cp_parser_implicitly_scoped_statement.
642 (cp_parser_iteration_statement): Likewise for calls to
643 cp_parser_already_scoped_statement.
644 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
645 "guard_kind" params; use them to warn for misleading
646 indentation.
647 (cp_parser_already_scoped_statement): Likewise.
648
649 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
650
651 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
652 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
653 * semantics.c (finish_member_declaration): Likewise.
654 * method.c (lazily_declare_fn): Allways add method to main variant list.
655
656 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
657
658 PR bootstrap/66085
659 * decl2.c (note_mangling_alias): Declare arguments as unused.
660
661 2015-05-08 Jason Merrill <jason@redhat.com>
662
663 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
664 -Wc++0x-compat.
665
666 2015-05-08 Jason Merrill <jason@redhat.com>
667
668 * decl2.c (mangling_aliases): New variable.
669 (note_mangling_alias, generate_mangling_aliases): New.
670 (cp_write_global_declarations): Call generate_mangling_aliases.
671 (generate_mangling_alias): Split out from...
672 * mangle.c (mangle_decl): ...here.
673 * cp-tree.h: Declare note_mangling_alias.
674
675 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
676
677 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
678 (build_java_method_aliases): Adapt to use create_same_body_alias
679 instead of assemble_alias. Move variable declarations to
680 definition and tidy up.
681 (cp_write_global_declarations): Call build_java_method_aliases
682 instead of collecting candidates first.
683
684 2015-05-07 Jason Merrill <jason@redhat.com>
685
686 PR c++/59012
687 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
688 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
689 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
690 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
691 (apply_late_template_attributes): Handle attribute pack expansion.
692
693 2015-05-07 Marek Polacek <polacek@redhat.com>
694
695 PR c/65179
696 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
697 value.
698
699 2015-05-07 Jason Merrill <jason@redhat.com>
700
701 DR 1467
702 PR c++/51747
703 * typeck2.c (digest_init_r): Fix single element list.
704
705 2015-05-05 Jason Merrill <jason@redhat.com>
706
707 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
708 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
709 MUST_NOT_THROW_EXPR.
710 (cp_genericize_data): Add try_block field.
711 (cp_genericize_tree): Initialize it.
712 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
713 implicit rethrow.
714
715 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
716 Return false.
717
718 * semantics.c (finish_call_expr): Check complain.
719
720 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
721 maybe-in-charge constructor.
722
723 * decl.c (start_decl): Don't push the plain VAR_DECL for a
724 variable template.
725
726 DR 1518
727 DR 1630
728 PR c++/54835
729 PR c++/60417
730 * call.c (convert_like_real): Check value-initialization before
731 explicit.
732 * typeck2.c (process_init_constructor_record): Don't set
733 CONSTRUCTOR_IS_DIRECT_INIT.
734 (process_init_constructor_array): Likewise.
735 * init.c (build_vec_init): Likewise.
736
737 2015-05-05 David Malcolm <dmalcolm@redhat.com>
738
739 * parser.c (cp_parser_asm_definition): Only test for
740 error_mark_node if "outputs" was just set. Likewise for "inputs".
741
742 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
743 Jakub Jelinek <jakub@redhat.com>
744
745 PR c++/66007
746 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
747 result in an actual error.
748
749 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
750 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
751
752 PR c++/65858
753 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
754 false.
755
756 2015-04-30 David Malcolm <dmalcolm@redhat.com>
757
758 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
759 trailing semicolon.
760
761 2015-04-29 Jason Merrill <jason@redhat.com>
762
763 PR c++/50800
764 * tree.c (apply_identity_attributes): Fix handling of classes.
765
766 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
767
768 * parser.c (cp_parser_oacc_enter_exit_data): Use
769 OMP_STANDALONE_CLAUSES.
770
771 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
772
773 PR c++/64667
774 * init.c (perform_member_init): Handle references for -Winit-self.
775
776 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
777
778 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
779 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
780
781 2015-04-28 Jason Merrill <jason@redhat.com>
782
783 PR c++/65896
784 * constexpr.c (cxx_eval_store_expression): Don't try to actually
785 store an empty class.
786
787 PR c++/65656
788 * constexpr.c (cxx_eval_builtin_function_call): Fix
789 __builtin_constant_p.
790
791 PR c++/50800
792 * tree.c (strip_typedefs): Add remove_attributes parm.
793 (strip_typedefs_expr): Likewise.
794 (apply_identity_attributes): New subroutine of strip_typedefs.
795 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
796 (convert_nontype_argument, unify): Likewise.
797 * cp-tree.h: Adjust.
798
799 PR c++/65734
800 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
801
802 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
803
804 * class.c (layout_class_type): Remove check if
805 PCC_BITFIELD_TYPE_MATTERS is defined.
806
807 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
808
809 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
810
811 2015-04-24 Jason Merrill <jason@redhat.com>
812
813 PR c++/50800
814 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
815
816 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
817 Remove obsolete code.
818 [NE_EXPR]: Likewise.
819
820 2015-04-23 Jason Merrill <jason@redhat.com>
821
822 PR c++/65646
823 * pt.c (check_explicit_specialization): Don't
824 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
825 headers.
826 * decl.c (grokvardecl): Revert earlier fix.
827
828 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
829
830 PR c++/65801
831 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
832 suppresses the diagnostic.
833
834 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
835
836 Reject trailing return type for an operator auto().
837 * decl.c (grokdeclarator): Reject trailing return types for
838 all conversion operators, don't handle conversion operators
839 in the previous checks that deal with auto.
840
841 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
842
843 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
844
845 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
846
847 * class.c (resolve_address_of_overloaded_function, instantiate_type):
848 Rename tsubst_flags_t parameter flags -> complain.
849
850 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
851
852 * call.c (build_op_delete_call, build_over_call): Check mark_used
853 return value.
854 * class.c (resolve_address_of_overloaded_function): Likewise.
855 * decl.c (cxx_maybe_build_cleanup): Likewise.
856 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
857 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
858 * rtti.c (build_dynamic_cast_1): Likewise.
859 * semantics.c (process_outer_var_ref): Likewise.
860 * typeck.c (build_class_member_access_expr,
861 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
862
863 2015-04-15 Jason Merrill <jason@redhat.com>
864
865 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
866 (build_constexpr_constructor_member_initializers): Loop to find
867 the BIND_EXPR.
868 * decl.c (start_preparsed_function): Clobber the object at the
869 beginning of a constructor.
870
871 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
872 * method.c (implicitly_declare_fn): Likewise.
873 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
874
875 * decl2.c (determine_visibility): Use get_template_info.
876
877 2015-04-15 Jason Merrill <jason@redhat.com>
878 Marek Polacek <polacek@redhat.com>
879
880 PR c++/65727
881 * lambda.c (lambda_expr_this_capture): In unevaluated context go
882 through the normal loop, just don't capture.
883 (maybe_resolve_dummy): Handle null return.
884
885 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
886
887 * call.c (enforce_access): Emit error + inform.
888
889 2015-04-15 Marek Polacek <polacek@redhat.com>
890
891 * constexpr.c (use_new_call): Remove #define.
892 (lookup_parameter_binding): Remove function.
893 (cxx_bind_parameters_in_call): Remove unused code.
894 (cxx_eval_call_expression): Likewise.
895 (cxx_eval_constant_expression): Likewise.
896
897 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
898
899 * tree.c (replace_placeholders_t): Remove unused type.
900 (replace_placeholders): Remove unused pset.
901
902 2015-04-14 Jason Merrill <jason@redhat.com>
903
904 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
905
906 PR c++/65695
907 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
908
909 PR c++/65721
910 * name-lookup.c (do_class_using_decl): Complain about specifying
911 the current class even if there are dependent bases.
912
913 2015-04-14 David Krauss <david_work@me.com>
914
915 PR c++/59766
916 * decl.c (grokdeclarator): Do not flag friends with deduced return.
917
918 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
919 Jason Merrill <jason@redhat.com>
920
921 PR c++/60994
922 * parser.c (cp_parser_class_name): Add enum_ok parameter.
923 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
924 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
925 a class template.
926
927 2015-04-12 Jakub Jelinek <jakub@redhat.com>
928
929 PR c++/65736
930 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
931 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
932 the expression to the original type at the end.
933
934 2015-04-09 Jakub Jelinek <jakub@redhat.com>
935
936 PR c++/65690
937 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
938 TYPE_USER_ALIGN.
939
940 PR c++/65690
941 * tree.c (build_cplus_array_type): Layout type before variants are
942 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
943 variant.
944
945 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
946
947 PR c++/64085
948 * lambda.c (add_capture): Use dependent_type_p for capture by
949 reference too.
950
951 2015-04-02 Marek Polacek <polacek@redhat.com>
952
953 PR c++/65642
954 * constexpr.c (cxx_eval_pointer_plus_expression): Call
955 cxx_eval_constant_expression on the first operand.
956
957 2015-04-01 Jason Merrill <jason@redhat.com>
958
959 PR c++/65625
960 * decl.c (make_typename_type): Handle seeing a variable template.
961
962 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
963
964 PR c++/56100
965 * pt.c (instantiating_current_function_p): New.
966 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
967 * cp-tree.h (instantiating_current_function_p): Declare.
968
969 2015-04-01 Jason Merrill <jason@redhat.com>
970
971 PR c++/65646
972 * decl.c (grokvardecl): Don't call check_explicit_specialization
973 for non-template members of a class template.
974
975 2015-04-01 Marek Polacek <polacek@redhat.com>
976
977 PR c++/65554
978 * class.c (finish_struct): Require that the second field of a
979 user-defined initializer_list be of size type.
980
981 2015-03-31 Marek Polacek <polacek@redhat.com>
982
983 PR c++/65390
984 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
985 checking for constness.
986
987 2015-03-30 Marek Polacek <polacek@redhat.com>
988
989 PR c++/65398
990 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
991 *(&A[i] p+ j) => A[i + j] transformation here.
992 (cxx_eval_pointer_plus_expression): New function.
993 (cxx_eval_constant_expression): Use it here.
994
995 2015-03-27 Tobias Burnus <burnus@net-b.de>
996
997 PR c/65586
998 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
999 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1000 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1001 -fopenmp-simd.
1002
1003 2015-03-27 Marek Polacek <polacek@redhat.com>
1004
1005 PR c++/65556
1006 * semantics.c (finish_switch_cond): If the unlowered type is not an
1007 enum, use the type of the condition.
1008
1009 2015-03-27 Jason Merrill <jason@redhat.com>
1010
1011 PR c++/65509
1012 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1013 constants.
1014
1015 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1016
1017 PR c++/65154
1018 * init.c (build_vec_init): Fix initializing aggregates
1019 with empty init list.
1020
1021 2015-03-26 Jason Merrill <jason@redhat.com>
1022
1023 PR c++/65525
1024 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1025
1026 2015-03-25 Marek Polacek <polacek@redhat.com>
1027
1028 PR c++/65558
1029 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1030 on an anonymous namespace.
1031
1032 2015-03-25 Marek Polacek <polacek@redhat.com>
1033
1034 PR c++/61670
1035 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1036
1037 2015-03-24 Jason Merrill <jason@redhat.com>
1038
1039 PR c++/65046
1040 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1041 * parser.c (cp_parser_namespace_definition): Don't set it.
1042 * name-lookup.c (handle_namespace_attrs): Check
1043 DECL_NAMESPACE_ASSOCIATIONS instead.
1044
1045 PR c++/65498
1046 * pt.c (get_mostly_instantiated_function_type): Just return the
1047 type of the partially instantiated template in DECL_TI_TEMPLATE.
1048
1049 2015-03-20 Marek Polacek <polacek@redhat.com>
1050
1051 PR c++/65398
1052 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1053 A[i + j].
1054
1055 2015-03-20 Marek Polacek <polacek@redhat.com>
1056
1057 PR c++/65072
1058 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1059 variant.
1060
1061 2015-03-19 Jason Merrill <jason@redhat.com>
1062
1063 PR c++/65046
1064 Automatically propagate ABI tags to variables and functions
1065 from their (return) type.
1066 * class.c (check_tag): Handle variables and functions.
1067 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1068 (mark_or_check_tags): Likewise.
1069 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1070 (check_abi_tags): Add single argument overload for decls.
1071 Handle inheriting tags for decls.
1072 * mangle.c (write_mangled_name): Call it.
1073 (mangle_return_type_p): Split out from write_encoding.
1074 (unmangled_name_p): Split out from write_mangled_name.
1075 (write_mangled_name): Ignore abi_tag on namespace.
1076 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1077 * parser.c (cp_parser_namespace_definition): Set it.
1078 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1079 about abi_tag attribute on non-inline namespace.
1080 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1081 (handle_abi_tag_attribute): Allow tags on variables.
1082
1083 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1084
1085 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1086 attribute for DECL_EXTERNAL VAR_DECLs.
1087
1088 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1089
1090 PR c++/65340
1091 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1092 mark_used.
1093 * decl2.c (mark_used): Inline the require_deduced_type call and
1094 guard the error call.
1095
1096 2015-03-16 Jason Merrill <jason@redhat.com>
1097
1098 PR c++/65061
1099 * parser.c (cp_parser_template_name): Call strip_using_decl.
1100
1101 2015-03-16 Marek Polacek <polacek@redhat.com>
1102
1103 DR 1688
1104 PR c++/65327
1105 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1106
1107 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1108
1109 PR c++/65323
1110 * decl.c (check_default_argument): Don't call
1111 maybe_warn_zero_as_null_pointer_constant.
1112
1113 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1114
1115 * cp-gimplify.c (simple_empty_class_p): New.
1116 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1117 the code for empty class copies into simple_empty_class_p, and
1118 adapt it to handle COMPOUND_EXPRs.
1119
1120 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1121
1122 PR c++/65370
1123 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1124 only if the location of newdecl doesn't match the location of olddecl.
1125
1126 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c++/65127
1129 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1130 is not a PARM_DECL.
1131
1132 2015-03-10 Jason Merrill <jason@redhat.com>
1133
1134 PR c++/65333
1135 DR 1558
1136 * pt.c (dependent_type_p_r): Check both class and alias template args.
1137
1138 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1139
1140 PR c/65120
1141 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1142 before preparing arguments to warn_logical_not_parentheses.
1143 Use maybe_constant_value on rhs.
1144
1145 2015-03-09 Jason Merrill <jason@redhat.com>
1146
1147 PR c++/65339
1148 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1149
1150 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR c/65120
1153 * parser.c (cp_parser_binary_expression): Don't warn for
1154 !!x == y or !b == y where b is bool.
1155
1156 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1157
1158 * ptree.c (cxx_print_lambda_node): New.
1159 (cxx_print_xnode): Handle LAMBDA_EXPR.
1160
1161 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1162
1163 PR c++/65295
1164 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1165 RESULT_DECL handling.
1166
1167 2015-02-26 Marek Polacek <polacek@redhat.com>
1168
1169 PR c++/65202
1170 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1171 a RETURN_EXPR if its operand is null.
1172
1173 2015-02-25 Jason Merrill <jason@redhat.com>
1174
1175 PR c++/65209
1176 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1177 DECL_COMDAT.
1178 (constrain_visibility_for_template): Handle reference arguments.
1179
1180 PR debug/58315
1181 * decl.c (start_preparsed_function): Use create_artificial_label
1182 for cdtor_label.
1183
1184 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1185 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c++/65075
1188 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1189 implicit typedefs for lambda types.
1190
1191 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1192
1193 PR c++/60894
1194 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1195
1196 2015-02-13 Jason Merrill <jason@redhat.com>
1197
1198 PR c++/65054
1199 * pt.c (template_args_equal): Look through conversions here.
1200 * tree.c (cp_tree_equal): Not here.
1201
1202 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1203
1204 PR c++/60211
1205 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1206 pragma_external context.
1207
1208 2015-02-13 Jason Merrill <jason@redhat.com>
1209
1210 PR c++/65051
1211 * call.c (reference_binding): Don't look for bad conversion
1212 if TO is incomplete.
1213
1214 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1215
1216 PR c++/64970
1217 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1218 to lookup_template_class.
1219
1220 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1221
1222 PR ipa/65034
1223 * decl.c (start_preparsed_function): Use void_type_node instead
1224 of NULL_TREE as LABEL_DECL type.
1225
1226 2015-02-12 Jason Merrill <jason@redhat.com>
1227
1228 PR c++/64898
1229 * mangle.c (write_mangled_name): Fix test for variable template
1230 instantiation.
1231
1232 * decl.c (begin_destructor_body): Condition clobber on
1233 -flifetime-dse.
1234
1235 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1236
1237 PR c++/64959
1238 * parser.c (lookup_literal_operator): Return all candidates.
1239 (cp_parser_userdef_char_literal): Simplify error handling.
1240 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1241 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1242 Also give higher priority to standard string UDL operator.
1243
1244 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1245
1246 PR debug/55541
1247 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1248 * decl.c (poplevel): If functionbody, try not to create an extra
1249 BLOCK for function body and use subblocks as that, if it is non-NULL
1250 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1251 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1252
1253 PR sanitizer/64984
1254 * except.c (check_noexcept_r): Return NULL for internal
1255 calls.
1256
1257 2015-02-10 Jason Merrill <jason@redhat.com>
1258
1259 PR c++/64994
1260 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1261
1262 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1263
1264 PR ipa/64982
1265 * method.c (use_thunk): Do not check for stdarg thunks.
1266
1267 2015-02-06 Jason Merrill <jason@redhat.com>
1268
1269 PR c++/64899
1270 * init.c (build_vec_init): Handle default-initialized array with
1271 constexpr default constructor.
1272
1273 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/64824
1276 PR c/64868
1277 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1278
1279 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1280
1281 PR c++/64877
1282 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1283 for generated expressions.
1284
1285 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1286
1287 PR c++/64901
1288 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1289 DECL_OVERRIDE_P.
1290
1291 2015-02-02 Jason Merrill <jason@redhat.com>
1292
1293 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1294
1295 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1296
1297 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1298 changed to pass input_location as first argument.
1299
1300 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1301
1302 PR c++/64717
1303 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1304 into SAVE_EXPR.
1305
1306 2015-01-29 Jason Merrill <jason@redhat.com>
1307
1308 PR c++/49508
1309 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1310 erroneous return statement.
1311
1312 PR c++/64521
1313 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1314 point.
1315
1316 2015-01-27 Caroline Tice <cmtice@google.com>
1317
1318 Committing VTV Cywin/Ming patch for Patrick Wollgast
1319 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1320 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1321
1322 2015-01-27 Jason Merrill <jason@redhat.com>
1323
1324 PR c++/58597
1325 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1326 current_function_decl.
1327
1328 PR c++/63889
1329 * pt.c (finish_template_variable): Move from semantics.c.
1330 Handle multiple template arg levels. Handle coercion here.
1331 (lookup_template_variable): Not here.
1332
1333 2015-01-23 Jason Merrill <jason@redhat.com>
1334
1335 PR c++/64314
1336 PR c++/57510
1337 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1338 that has been completely split out.
1339
1340 PR c++/64701
1341 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1342 statement codes.
1343
1344 PR c++/64727
1345 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1346 of CONST_DECL.
1347
1348 2015-01-21 Jason Merrill <jason@redhat.com>
1349
1350 PR c++/64603
1351 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1352 constant CONSTRUCTORs.
1353
1354 PR c++/64647
1355 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1356 give a hard error in a template instantiation.
1357
1358 2015-01-21 Richard Biener <rguenther@suse.de>
1359
1360 PR middle-end/64313
1361 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1362 for builtins the user declared correctly.
1363
1364 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1365
1366 PR c++/58614
1367 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1368 TREE_TYPE (elt) == error_mark_node.
1369
1370 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1371
1372 PR tree-optimization/62053
1373 * tree.c (build_cplus_array_type): Layout type after variants are set.
1374
1375 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1376
1377 * cp-gimplify.c (cp_genericize_r): Call
1378 cp_ubsan_maybe_instrument_member_call for member calls.
1379 (cp_ubsan_check_member_access_r): New function.
1380 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1381 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1382 cp_ubsan_instrument_member_accesses,
1383 cp_ubsan_maybe_instrument_downcast,
1384 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1385 * cp-ubsan.c: New file.
1386 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1387 * constexpr.c (cxx_eval_call_expression): Return void_node
1388 for IFN_UBSAN_VPTR.
1389 (potential_constant_expression_1): Return true for
1390 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1391 * typeck.c (build_class_member_access_expr): Provide locus
1392 for COMPONENT_REFs.
1393 (build_static_cast_1): Instrument downcasts.
1394 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1395 add ubsan instrumentation for virtual_access.
1396 * call.c: Include internal-fn.h.
1397 (set_flags_from_callee): Handle internal calls.
1398
1399 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1400
1401 PR c++/59366
1402 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1403 and function templates, declared only in the class.
1404 * decl.c (duplicate_decls): Reveal hidden friend functions or
1405 function templates, if they are redeclared outside the class.
1406
1407 2015-01-15 Jason Merrill <jason@redhat.com>
1408
1409 PR c++/64356
1410 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1411
1412 PR c++/63283
1413 * constexpr.c (potential_constant_expression_1): Handle reference
1414 args in templates.
1415
1416 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1417 James Norris <jnorris@codesourcery.com>
1418 Cesar Philippidis <cesar@codesourcery.com>
1419 Ilmir Usmanov <i.usmanov@samsung.com>
1420 Jakub Jelinek <jakub@redhat.com>
1421
1422 * parser.c: Include "gomp-constants.h".
1423 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1424 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1425 Use OMP_CLAUSE_SET_MAP_KIND.
1426 (cp_parser_omp_construct, cp_parser_pragma): Handle
1427 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1428 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1429 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1430 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1431 "create", "delete", "deviceptr", "host", "num_gangs",
1432 "num_workers", "present", "present_or_copy", "pcopy",
1433 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1434 "present_or_create", "pcreate", "vector_length", "wait".
1435 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1436 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1437 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1438 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1439 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1440 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1441 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1442 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1443 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1444 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1445 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1446 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1447 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1448 (cp_parser_oacc_wait): New functions.
1449 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1450 (finish_oacc_parallel): New prototypes.
1451 * semantics.c: Include "gomp-constants.h".
1452 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1453 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1454 OMP_CLAUSE_SET_MAP_KIND.
1455 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1456 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1457 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1458 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1459 functions.
1460
1461 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1462
1463 PR c++/58671
1464 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1465 self-initialization.
1466
1467 2015-01-13 Jason Merrill <jason@redhat.com>
1468
1469 PR c++/64356
1470 PR libstdc++/58777
1471 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1472 pointer expressions.
1473 (cxx_eval_increment_expression): Likewise.
1474
1475 PR c++/64514
1476 * pt.c (coerce_template_parameter_pack): Return NULL for a
1477 zero-length fixed parameter pack with a pack expansion arg.
1478
1479 PR c++/64520
1480 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1481
1482 2015-01-12 Jason Merrill <jason@redhat.com>
1483
1484 PR c++/64547
1485 * constexpr.c (cxx_eval_call_expression): A call to a void
1486 function doesn't need to return a value.
1487
1488 2015-01-09 Michael Collison <michael.collison@linaro.org>
1489
1490 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1491 input.h, alias.h, symtab.h, options.h, fold-const.h,
1492 wide-int.h, and inchash.h due to flattening of tree.h.
1493 * class.c: Ditto.
1494 * constexpr.c: Ditto.
1495 * cp-array-notation.c: Ditto.
1496 * cp-gimplify.c: Ditto.
1497 * cp-lang.c: Ditto.
1498 * cp-objcp-common.c: Ditto.
1499 * cvt.c: Ditto.
1500 * decl2.c: Ditto.
1501 * decl.c: Ditto.
1502 * dump.c: Ditto.
1503 * error.c: Ditto.
1504 * except.c: Ditto.
1505 * expr.c: Ditto.
1506 * friend.c: Ditto.
1507 * init.c: Ditto.
1508 * lambda.c: Ditto.
1509 * lex.c: Ditto.
1510 * mangle.c: Ditto.
1511 * name-lookup.c: Ditto.
1512 * optimize.c: Ditto.
1513 * parser.c: Ditto.
1514 * pt.c: Ditto.
1515 * ptree.c: Ditto.
1516 * repo.c: Ditto.
1517 * rtti.c: Ditto.
1518 * search.c: Ditto.
1519 * semantics.c: Ditto.
1520 * tree.c: Ditto.
1521 * typeck2.c: Ditto.
1522 * typeck.c: Ditto.
1523
1524 2015-01-08 Jason Merrill <jason@redhat.com>
1525
1526 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1527 * decl.c (compute_array_index_type): Likewise.
1528 * init.c (build_vec_init): Likewise.
1529 * typeck.c (cp_build_binary_op): Likewise.
1530
1531 2015-01-08 Jason Merrill <jason@redhat.com>
1532
1533 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1534 whether an initializer-list is too big for a VLA.
1535 (throw_bad_array_length): Remove.
1536 * cp-tree.h: Remove prototype.
1537
1538 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1539
1540 PR c++/60753
1541 * decl.c (grokfndecl): Add bool parameter.
1542 (grokdeclarator): Adjust calls.
1543 (start_decl): Don't set DECL_DELETED_FN here.
1544
1545 2015-01-06 Jason Merrill <jason@redhat.com>
1546
1547 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1548 template-ids.
1549
1550 PR c++/64455
1551 * pt.c (type_dependent_expression_p): Handle variable templates.
1552 * constexpr.c (potential_constant_expression_1): Use it.
1553
1554 PR c++/64487
1555 * semantics.c (finish_offsetof): Handle templates here.
1556 * parser.c (cp_parser_builtin_offsetof): Not here.
1557
1558 PR c++/64496
1559 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1560 class NSDMI.
1561
1562 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1563
1564 PR c++/64489
1565 * class.c (check_field_decls): Make copy assignment operators
1566 complex only in c++98 mode.
1567
1568 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1569
1570 PR c++/31397
1571 * class.c (check_for_override): Warn when a virtual function is an
1572 override not marked override.
1573
1574 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1575
1576 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1577 hold base_fndecls.
1578 (get_basefndecls): Adjust.
1579
1580 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1581
1582 Update copyright years.
1583
1584 2015-01-05 Marek Polacek <polacek@redhat.com>
1585
1586 PR c/64423
1587 * typeck.c (cp_build_array_ref): Pass loc down to
1588 warn_array_subscript_with_type_char.
1589
1590 \f
1591 Copyright (C) 2015 Free Software Foundation, Inc.
1592
1593 Copying and distribution of this file, with or without modification,
1594 are permitted in any medium without royalty provided the copyright
1595 notice and this notice are preserved.