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