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