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