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