Fix TYPE_MAIN_VARIANT construction for arrays of qualified typedefs (PR c/68162).
[official-gcc.git] / gcc / cp / ChangeLog
blobebd567a0dce7600f3ec5eff471cc7daad5757b78
1 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
3         PR c/68162
4         * tree.c (c_build_qualified_type): Add extra arguments.
6 2015-12-02  Eric Botcazou  <ebotcazou@adacore.com>
8         PR c++/68290
9         * constraint.cc (make_constrained_auto): Move to...
10         * pt.c (make_auto_1): Add set_canonical parameter and set
11         TYPE_CANONICAL on the type only if it is true.
12         (make_decltype_auto): Adjust call to make_auto_1.
13         (make_auto): Likewise.
14         (splice_late_return_type): Likewise.
15         (make_constrained_auto): ...here.  Call make_auto_1 instead of
16         make_auto and pass false.  Set TYPE_CANONICAL directly.
18 2015-12-02  Thomas Schwinge  <thomas@codesourcery.com>
20         * parser.c (cp_parser_omp_clause_name)
21         (cp_parser_oacc_all_clauses): Alphabetical sorting.
22         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE.
24 2015-12-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
26         PR gcov-profile/68603
27         * cp-gimplify.c (genericize_cp_loop): For the back-jump's location
28         use the start of the loop body only if the loop is unconditional.
30 2015-11-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
32         * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
33         to start of loop body instead of start of loop.
35 2015-12-01  Julian Brown  <julian@codesourcery.com>
36             Cesar Philippidis  <cesar@codesourcery.com>
37             James Norris  <James_Norris@mentor.com>
39         * cp-tree.h (finish_oacc_host_data): Add prototype.
40         * parser.c (cp_parser_omp_clause_name): Add use_device support.
41         (cp_parser_oacc_all_clauses): Add use_device support.
42         (OACC_HOST_DATA_CLAUSE_MASK): New macro.
43         (cp_parser_oacc_host_data): New function.
44         (cp_parser_omp_construct): Add host_data support.
45         (cp_parser_pragma): Add host_data support.
46         * semantics.c (finish_omp_clauses): Add use_device support.
47         (finish_oacc_host_data): New function.
49 2015-11-27  Martin Liska  <mliska@suse.cz>
51         PR c++/68312
52         * cp-array-notation.c (expand_sec_reduce_builtin):
53         Likewise.
54         (create_array_refs): Replace argument with const reference.
55         (expand_an_in_modify_expr): Likewise.
56         (cp_expand_cond_array_notations): Likewise.
57         (expand_unary_array_notation_exprs): Likewise.
59 2015-11-27  Jakub Jelinek  <jakub@redhat.com>
61         PR c/63326
62         * parser.c (cp_parser_statement): Clear in_compound after labels.
64 2015-11-27  Martin Liska  <mliska@suse.cz>
66         * parser.c (cp_parser_late_parsing_cilk_simd_fn_info):
67         Release tokens.
69 2015-11-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
71         * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
72         to start of loop body instead of start of loop.
74 2015-11-26  Jakub Jelinek  <jakub@redhat.com>
76         PR c++/68508
77         * cp-tree.h (cp_ubsan_maybe_instrument_downcast): Add INTYPE argument.
78         * cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise.  Use
79         it instead of or in addition to TREE_TYPE (op).  Use
80         is_properly_derived_from, return NULL_TREE if TREE_TYPE (intype) and
81         TREE_TYPE (type) are the same type minus qualifiers.
82         * typeck.c (build_static_cast_1): Adjust callers.
84 2015-11-25  Martin Sebor  <msebor@redhat.com>
86         PR c++/67876
87         * pt.c (convert_template_argument): Make sure number of tree
88         operands is greater than zero before attempting to extract one.
90 2015-11-25  Ryan Burn  <contact@rnburn.com>
92         PR c++/68434
93         * pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before
94         calling canonical_type_parameter.
96 2015-11-25  Jason Merrill  <jason@redhat.com>
98         * lambda.c (maybe_add_lambda_conv_op): Only set
99         no_sanitize_undefined if SANITIZE_NULL.
101         PR c++/67941
102         * lambda.c (maybe_add_lambda_conv_op): Mark _FUN as
103         no_sanitize_undefined.
105         * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use
106         do_ubsan_in_current_function.
108 2015-11-25  Markus Trippelsdorf  <markus@trippelsdorf.de>
109             Paolo Carlini  <paolo.carlini@oracle.com>
111         PR c++/68087
112         * constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
113         tree_to_shwi to avoid ICEs.
115 2015-11-24  Ilya Verbin  <ilya.verbin@intel.com>
117         * parser.c (cp_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
118         with "if (ENABLE_OFFLOADING)".
120 2015-11-23  Igor Zamyatin  <igor.zamyatin@intel.com>
122         PR c++/68001
123         * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
125 2015-11-20  Jakub Jelinek  <jakub@redhat.com>
127         PR c++/67354
128         * cp-tree.h (defer_mangling_aliases): Declare.
129         (generate_mangling_aliases): New prototype.
130         * decl2.c (defer_mangling_aliases): New variable.
131         (note_mangling_alias): Use !defer_mangling_aliases
132         instead of at_eof.
133         (generate_mangling_aliases): No longer static. Clear
134         defer_mangling_aliases.
135         * optimize.c (maybe_thunk_body): Defer emitting mangling aliases
136         if !defer_mangling_aliases until the fns are put into the same
137         comdat group.
139 2015-11-19  David Malcolm  <dmalcolm@redhat.com>
141         * cp-tree.h (lookup_member_fuzzy): New decl.
142         * search.c: Include spellcheck.h.
143         (class lookup_field_fuzzy_info): New class.
144         (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): New.
145         (lookup_field_fuzzy_info::fuzzy_lookup_field): New.
146         (lookup_field_fuzzy_r): New.
147         (lookup_member_fuzzy): New.
148         * typeck.c (finish_class_member_access_expr): When issuing
149         a "has no member named" error, call lookup_member_fuzzy, and
150         offer any result as a suggestion.
152 2015-11-19  Torvald Riegel  <triegel@redhat.com>
154         * except.c (do_free_exception): Use transactional wrapper.
156 2015-11-19  Jason Merrill  <jason@redhat.com>
158         PR c++/68422
159         * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
160         * parser.c (cp_parser_sizeof_pack): Set it.
161         * pt.c  (tsubst_copy) [SIZEOF_EXPR]: Likewise.
162         (tsubst_pack_expansion): Improve T... shortcut for expression packs.
164 2015-11-19  Ryan Burn  <contact@rnburn.com>
166         PR c++/68396
167         * pt.c (find_parameter_packs_r) [DECLTYPE_TYPE]: When traversing
168         the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false.
170 2015-11-19  Jakub Jelinek  <jakub@redhat.com>
171             Manuel López-Ibáñez  <manu@gcc.gnu.org>
173         PR c++/67409
174         * decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
175         emit_diagnostic instead of permerror.
176         (check_previous_goto_1): Adjust identify_goto callers, treat all
177         cases but crossing initialization and entering scope of decl with
178         non-trivial dtor as unconditional hard errors.
179         (check_goto): Use identify_goto.  Treat all cases but crossing
180         initialization and entering scope of decl with non-trivial dtor
181         as unconditional hard errors.
183 2015-11-19  Cesar Philippidis  <cesar@codesourcery.com>
185         * parser.h (struct cp_omp_declare_simd_data): Add clauses member.
186         (struct cp_parser): Change type the of oacc_routine to
187         cp_omp_declare_simd_data.
188         * parser.c (cp_ensure_no_oacc_routine): Rework to use
189         cp_omp_declare_simd_data.
190         (cp_parser_simple_declaration): Remove boolean first.  Update call to
191         cp_parser_init_declarator. Don't NULL out oacc_routine.
192         (cp_parser_init_declarator): Remove boolean first parameter.  Update
193         calls to cp_finalize_oacc_routine.
194         (cp_parser_late_return_type_opt): Handle acc routines.
195         (cp_parser_member_declaration): Remove first variable.  Handle
196         acc routines like omp declare simd.
197         (cp_parser_function_definition_from_specifiers_and_declarator): Update
198         call to cp_finalize_oacc_routine.
199         (cp_parser_single_declaration): Update call to
200         cp_parser_init_declarator.
201         (cp_parser_save_member_function_body): Remove first_decl parameter.
202         Update call to cp_finalize_oacc_routine.
203         (cp_parser_finish_oacc_routine): Delete.
204         (cp_parser_oacc_routine): Rework to use cp_omp_declare_simd_data.
205         (cp_parser_late_parsing_oacc_routine): New function.
206         (cp_finalize_oacc_routine): Remove first argument.  Add more error
207         handling and set the acc routine and 'omp declare target' attributes.
208         (cp_parser_pragma): Remove unnecessary call to
209         cp_ensure_no_oacc_routine.
211 2015-11-17  Cesar Philippidis  <cesar@codesourcery.com>
213         * cp-gimplify.c (cp_fold_r): Add support for OACC_LOOP.
215 2015-11-17  Jason Merrill  <jason@redhat.com>
217         PR bootstrap/68346
218         * typeck.c (build_static_cast_1): Force a NOP when converting to
219         the same type.
221         * cp-tree.h (LITERAL_ZERO_P): Remove.
222         * parser.c (cp_parser_postfix_expression, literal_zeros)
223         (cp_parser_parenthesized_expression_list): Don't mess with it.
225         * parser.c (cp_parser_unary_expression): Fold -constant here.
226         * typeck.c (cp_build_unary_op): Not here.
228         PR bootstrap/68361
229         * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
230         -Wparentheses.
232 2015-11-16  Jason Merrill  <jason@redhat.com>
234         * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
235         to fold arguments to __builtin_constant_p.
237 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
239         * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
240         "simd" attribute as well. Update error message.
242 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
244         * parser.c (cp_parser_omp_declare_target): Adjust.
246 2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
248         * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
250 2015-11-14  Jason Merrill  <jason@redhat.com>
252         PR bootstrap/68346
253         * call.c (build_new_op_1): Don't fold arguments to
254         warn_tautological_cmp.
256 2015-11-14  Jakub Jelinek  <jakub@redhat.com>
258         * semantics.c (finish_omp_clauses): Don't mark
259         GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
261 2015-11-13  Kai Tietz  <ktietz70@googlemail.com>
262             Marek Polacek  <polacek@redhat.com>
263             Jason Merrill  <jason@redhat.com>
265         * call.c (build_conditional_expr_1, convert_like_real)
266         (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
267         (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
268         * class.c (build_base_path, determine_primary_bases)
269         (update_vtable_entry_for_fn, check_bitfield_decl)
270         (layout_nonempty_base_or_field, layout_empty_base)
271         (propagate_binfo_offsets, include_empty_classes)
272         (layout_class_type, build_vbase_offset_vtbl_entries): Use
273         fold_convert.
274         * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
275         (cxx_eval_call_expression): Handle MEM_REF.
276         (cxx_eval_pointer_plus_expression): Fold the second operand.
277         (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
278         (fold_simple_1, fold_simple): New.
279         (maybe_constant_value_1): Factor out from maybe_constant_value.
280         (cv_cache, maybe_constant_value): Cache results.
281         (maybe_constant_init): Handle null input.
282         (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
283         * cp-array-notation.c (build_array_notation_ref): Fold operands.
284         * cp-gimplify.c (cp_fold_r, cp_fold): New.
285         (cp_genericize_r): Use fold_convert.  Don't fold SIZEOF_EXPR.
286         (cp_genericize): Fold everything.
287         (contains_label_1, contains_label_p): New.
288         (cp_fold, cp_fully_fold): New.
289         * cp-tree.h (class cache_map): New.
290         * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
291         (cp_convert_and_check): Use cp_fully_fold.
292         (convert, convert_force): Don't fold.
293         * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
294         (compute_array_index_type): Use cp_fully_fold.
295         (build_enumerator): Use fold_convert.
296         * decl2.c (get_guard_cond, set_guard): Use fold_convert.
297         * init.c (build_zero_init_1): Fold zero-initializers.
298         (build_new_1): Fold nelts calculations.
299         (build_vec_delete_1): Fold conversions.
300         (build_vec_init): Fold maxindex.
301         * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
302         (cp_parser_question_colon_clause): Fold LHS.
303         * pt.c (convert_nontype_argument): Fold nullptr conversion.
304         * semantics.c (finish_unary_op_expr): Fold for warnings.
305         (handle_omp_array_sections_1): Fold length and low bound.
306         (handle_omp_for_class_iterator): Fold various things.
307         * tree.c (builtin_valid_in_constant_expr_p): Add
308         BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
309         (convert_bitfield_to_declared_type): Don't fold.
310         (handle_init_priority_attribute): Fold.
311         (fold_if_not_in_template): Remove.
312         * typeck.c (decay_conversion, build_class_member_access_expr)
313         (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
314         (cp_pointer_int_sum, pointer_diff): Don't fold.
315         (cp_build_binary_op): Fold for warnings and PMF ops.
316         (cp_build_unary_op): Fold negation of a constant, nothing else.
317         (expand_ptrmemfunc_cst): Fold operations.
318         * typeck2.c (split_nonconstant_init): Fold initializer.
319         (store_init_value): Likewise.
320         (check_narrowing): Try folding.
321         * config-lang.in (gtfiles): Add cp-gimplify.c.
323 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
325         * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
327 2015-11-12  James Norris  <jnorris@codesourcery.com>
329         * parser.c (cp_parser_oacc_declare): Remove unused.
331 2015-11-12  James Norris  <jnorris@codesourcery.com>
332             Joseph Myers  <joseph@codesourcery.com>
334         * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
335         clause.
336         (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
337         and PRAGMA_OMP_CLAUSE_LINK.
338         (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
339         and PRAGMA_OMP_CLAUSE_LINK.
340         (OACC_DECLARE_CLAUSE_MASK): New definition.
341         (cp_parser_oacc_declare): New function.
342         (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
343         * pt.c (tsubst_expr): Handle OACC_DECLARE.
345 2015-11-12  Jason Merrill  <jason@redhat.com>
347         * pt.c (check_explicit_specialization): Check the namespace after
348         we choose a template.
350 2015-11-11  Jason Merrill  <jason@redhat.com>
352         * decl.c (duplicate_decls): When combining typedefs, remove the
353         new type from the variants list.
355 2015-11-11  Jason Merrill  <jason@redhat.com>
357         * pt.c (instantiate_class_template_1): Set function_depth around
358         instantiation of lambda op().
360 2015-11-11  Marek Polacek  <polacek@redhat.com>
362         PR c/68107
363         PR c++/68266
364         * decl.c (grokdeclarator): Call valid_array_size_p.  Remove code
365         checking the size of an array.
367 2015-11-11  Dominique d'Humieres <dominiq@lps.ens.fr>
369         PR bootstrap/68271
370         * parser.h (cp_token): Update pragma_kind to 8.
372 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
374         * call.c: Remove unused header files.
375         * class.c: Likewise.
376         * constexpr.c: Likewise.
377         * cp-array-notation.c: Likewise.
378         * cp-cilkplus.c: Likewise.
379         * cp-gimplify.c: Likewise.
380         * cp-lang.c: Likewise.
381         * cp-objcp-common.c: Likewise.
382         * cp-ubsan.c: Likewise.
383         * cvt.c: Likewise.
384         * cxx-pretty-print.c: Likewise.
385         * decl.c: Likewise.
386         * decl2.c: Likewise.
387         * dump.c: Likewise.
388         * error.c: Likewise.
389         * except.c: Likewise.
390         * expr.c: Likewise.
391         * friend.c: Likewise.
392         * g++spec.c: Likewise.
393         * init.c: Likewise.
394         * lambda.c: Likewise.
395         * lex.c: Likewise.
396         * mangle.c: Likewise.
397         * method.c: Likewise.
398         * name-lookup.c: Likewise.
399         * optimize.c: Likewise.
400         * parser.c: Likewise.
401         * pt.c: Likewise.
402         * ptree.c: Likewise.
403         * repo.c: Likewise.
404         * rtti.c: Likewise.
405         * search.c: Likewise.
406         * semantics.c: Likewise.
407         * tree.c: Likewise.
408         * typeck.c: Likewise.
409         * typeck2.c: Likewise.
410         * vtable-class-hierarchy.c: Likewise.
412 2015-11-09  Cesar Philippidis  <cesar@codesourcery.com>
414         * parser.c (cp_finalize_oacc_routine): New boolean first argument.
415         (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
416         (cp_parser_simple_declaration): Maintain a boolean first to keep track
417         of each new declarator.  Propagate it to cp_parser_init_declarator.
418         (cp_parser_init_declarator): New boolean first argument.  Propagate it
419         to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
420         (cp_parser_member_declaration): Likewise.
421         (cp_parser_single_declaration): Update call to
422         cp_parser_init_declarator.
423         (cp_parser_save_member_function_body): New boolean first_decl argument.
424         Propagate it to cp_finalize_oacc_routine.
425         (cp_parser_finish_oacc_routine): New boolean first argument.  Use it to
426         determine if multiple declarators follow a routine construct.
427         (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
429 2015-10-19  Martin Sebor  <msebor@redhat.com>
431         PR c++/67913
432         PR c++/67927
433         * call.c (build_operator_new_call): Do not assume size_check
434         is non-null, analogously to the top half of the function.
435         * init.c (build_new_1): Detect and diagnose array sizes in
436         excess of the maximum of roughly SIZE_MAX / 2.
437         Insert a runtime check only for arrays with a non-constant size.
438         (build_new): Detect and diagnose negative array sizes.
440 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
441             Cesar Philippidis  <cesar@codesourcery.com>
442             James Norris  <jnorris@codesourcery.com>
443             Julian Brown  <julian@codesourcery.com>
444             Nathan Sidwell  <nathan@codesourcery.com>
446         * parser.h (struct cp_parser): Add oacc_routine field.
447         * parser.c (cp_ensure_no_oacc_routine): New.
448         (cp_parser_new): Initialize oacc_routine field.
449         (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
450         (cp_parser_namespace_definition,
451         cp_parser_class_specifier_1): Likewise.
452         (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
453         (cp_parser_function_definition,
454         cp_parser_save_member_function_body): Likewise.
455         (OACC_ROUTINE_CLAUSE_MASK): New.
456         (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
457         cp_finalize_oacc_routine): New.
458         (cp_parser_pragma): Adjust omp_declare_simd checking.  Call
459         cp_ensure_no_oacc_routine.
460         (cp_parser_pragma): Add OpenACC routine handling.
462 2015-11-08  Martin Sebor  <msebor@redhat.com>
464         PR c++/67942
465         * cp/init.c (warn_placement_new_too_small): Convert integer
466         operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
467         value.
469 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
471         * error.c (cp_printer): Update for new "caret_p" param for
472         textinfo::set_location.
473         (pedwarn_cxx98): Update for change in signature of
474         diagnostic_set_info.
476 2015-11-06  Jason Merrill  <jason@redhat.com>
478         Support non-type constrained-type-specifiers.
479         * parser.c (check_type_concept): Remove.
480         (cp_parser_maybe_constrained_type_specifier): Don't call it.
481         (synthesize_implicit_template_parm): Handle non-type and template
482         template parameters.  Also compare extra args.  Return the decl.
483         (cp_parser_template_argument): Handle constrained-type-specifiers for
484         non-type template parameters.
485         (finish_constrained_template_template_parm): Split out from
486         cp_parser_constrained_template_template_parm.
487         (cp_parser_nonclass_name): Move some logic into
488         cp_parser_maybe_concept_name.
489         (cp_parser_init_declarator): Fix error recovery.
490         (get_concept_from_constraint): Remove.
491         (cp_parser_simple_type_specifier): Adjust for
492         synthesize_implicit_template_parm returning the decl.
493         * constraint.cc (placeholder_extract_concept_and_args)
494         (equivalent_placeholder_constraints): Also handle TYPE_DECL
495         constrained parms.
497         * pt.c (push_inline_template_parms_recursive): Don't recreate the
498         CONST_DECL.
500 2015-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
502         * init.c (warn_placement_new_too_small): Use %wu format
503         rather than %lu when printing bytes_avail.
505 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
506             Thomas Schwinge  <thomas@codesourcery.com>
507             James Norris  <jnorris@codesourcery.com>
509         * parser.c (cp_parser_omp_clause_name): Add support for
510         PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
511         (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
512         arguments.
513         (cp_parser_oacc_clause_tile): New function.
514         (cp_parser_omp_clause_default): Add is_oacc argument. Handle
515         default(none) in OpenACC.
516         (cp_parser_oacc_all_clauses): Add support for
517         (cp_parser_omp_all_clauses): Update call to
518         cp_parser_omp_clause_default.
519         PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
520         (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
521         TILE}.
522         (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
523         (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
524         FIRSTPRIVATE}.
525         (cp_parser_oacc_update): Update the error message for missing clauses.
526         * semantics.c (finish_omp_clauses): Add support for
527         OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
529 2015-11-05  Martin Sebor  <msebor@redhat.com>
531         PR c++/67942
532         * cp/init.c (warn_placement_new_too_small): Avoid assuming
533         the size of the first operand of placement new or its type
534         is known.
536 2015-11-05  Martin Sebor  <msebor@redhat.com>
538         PR c++/67942
539         * cp/init.c (warn_placement_new_too_small): New function.
540         (build_new_1): Call it.
542 2015-11-05  Paolo Carlini  <paolo.carlini@oracle.com>
544         PR c++/67846
545         * parser.c (cp_parser_lambda_body): Check lambda_return_type
546         return value.
547         * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
548         member function used invalidly.
550 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
551             Ilya Verbin  <ilya.verbin@intel.com>
553         * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
554         (omp_privatize_field): Add SHARED argument.
555         * parser.c: Include context.h.
556         (cp_parser_omp_clause_schedule): Parse schedule
557         modifiers, diagnose monotonic together with nonmonotonic.
558         (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument.  Parse
559         parameter name as linear step as id-expression rather than expression.
560         (cp_parser_omp_all_clauses): Adjust caller.
561         (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
562         initialize it.  Adjust omp_privatize_field caller.
563         (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
564         to finish_omp_for.
565         (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
566         (cp_parser_omp_target_data,
567         cp_parser_omp_target_enter_data,
568         cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
569         and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
570         (cp_parser_omp_target): Likewise.  Evaluate num_teams and
571         thread_limit expressions on combined target teams before the target.
572         (cp_parser_omp_declare_target): If decl has "omp declare target" or
573         "omp declare target link" attribute, and cgraph or varpool node already
574         exists, then set corresponding flags.  Call finish_omp_clauses
575         in the parenthesized extended-list syntax case.  Call
576         cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
577         (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
578         instead of cp_parser_skip_to_pragma_eol.
579         * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
580         inside declare target.
581         * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
582         use tsubst_omp_clause_decl instead of tsubst_expr on
583         OMP_CLAUSE_LINEAR_STEP.  Handle non-static data members in shared
584         clauses.
585         (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
586         (tsubst_find_omp_teams): New function.
587         (tsubst_expr): Evaluate num_teams and thread_limit expressions on
588         combined target teams before the target.  Use OMP_FOR_ORIG_DECLS for
589         all OpenMP/OpenACC/Cilk+ looping constructs.  Adjust finish_omp_for
590         caller.
591         * semantics.c (omp_privatize_field): Add SHARED argument, if true,
592         always create artificial var and never put it into the hash table
593         or vector.
594         (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
595         Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
596         (handle_omp_array_sections): For structure element
597         based array sections use GOMP_MAP_ALWAYS_POINTER instead of
598         GOMP_MAP_FIRSTPRIVATE_POINTER.  Encode low-bound into the MEM_REF,
599         either into the constant offset, or for variable low-bound using
600         POINTER_PLUS_EXPR.
601         (finish_omp_clauses): Adjust omp_privatize_field caller.  Drop
602         generic_field_head, structure elements are now always mapped even
603         as array section bases, diagnose same var in data sharing and
604         mapping clauses.  For references map what they refer to using
605         GOMP_MAP_ALWAYS_POINTER for structure elements and
606         GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise.  Diagnose if linear step
607         on declare simd is neither a constant nor a uniform parameter.
608         Allow non-static data members on shared clauses.  Look through
609         POINTER_PLUS_EXPR for array section reductions.  Diagnose nonmonotonic
610         modifier on kinds other than dynamic or guided or nonmonotonic
611         modifier together with ordered clause.  Diagnose the same var or
612         function appearing multiple times on the same directive.  Fix up
613         wording for the to clause if t is neither a FUNCTION_DECL nor a
614         VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
615         (handle_omp_for_class_iterator): Add ORIG_DECLS argument.  Call
616         c_omp_check_loop_iv_exprs on cond.
617         (finish_omp_for): Add ORIG_INITS argument.  Call
618         c_omp_check_loop_iv_exprs on ORIG_INITS elements.  Adjust
619         handle_omp_for_class_iterator caller.  Call c_omp_check_loop_iv.
620         Call add_stmt.
621         (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
623 2015-11-04  Cesar Philippidis  <cesar@codesourcery.com>
625         * (cp_parser_oacc_single_int_clause): New function.
626         (cp_parser_oacc_clause_vector_length): Delete.
627         (cp_parser_omp_clause_num_gangs): Delete.
628         (cp_parser_omp_clause_num_workers): Delete.
629         (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
630         for num_gangs, num_workers and vector_length.
632 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
634         * call.c (validate_conversion_obstack): Define unconditionally.
635         * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
636         gcc_checking_assert.
637         * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
638         * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
639         * mangle.c (add_substitution): Likewise.
640         * method.c (maybe_explain_implicit_delete): Likewise.
641         * parser.c (cp_parser_template_argument_list): Remove conditional
642         compilation.
643         * pt.c (check_unstripped_args): Rename to...
644         (verify_unstripped_args): ... this and remove conditional compilation.
645         (retrieve_specialization): Guard call of verify_unstripped_args with
646         flag_checking.
647         (template_parm_to_arg): Remove conditional compilation.
648         (template_parms_to_args, coerce_template_parameter_pack,
649         coerce_template_parms): Likewise.
650         (tsubst_copy): Use flag_checking.
651         (type_unification_real): Remove conditional compilation.
652         (build_non_dependent_expr): Use flag_checking.
653         * tree.c (build_target_expr): Remove conditional compilation, use
654         gcc_checking_assert.
655         * typeck.c (comptypes): Likewise.
656         * typeck2.c (digest_init_r): Likewise.
658 2015-11-03  Jason Merrill  <jason@redhat.com>
660         * pt.c (struct find_parameter_pack_data): Add
661         type_pack_expansion_p field.
662         (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
663         (uses_parameter_packs, make_pack_expansion)
664         (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
666 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
667             Chung-Lin Tang  <cltang@codesourcery.com>
669         * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
670         PRAGMA_OACC_ATOMIC.
672 2015-10-31  Ville Voutilainen  <ville.voutilainen@gmail.com>
674         Remove the implementation of N3994, terse range-for loops.
675         * parser.c (cp_parser_for_init_statement): Remove the parsing
676         of a terse range-for.
678 2015-10-31  Jason Merrill  <jason@redhat.com>
680         Implement multiple 'auto' feature from Concepts TS.
681         * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
682         (cp_parser_template_type_arg): Likewise.
683         (get_concept_from_constraint): Split out most logic to...
684         * constraint.cc (placeholder_extract_concept_and_args): ...here.
685         (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
686         * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
687         * cxx-pretty-print.h: Declare it.
688         * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
689         * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
690         (type_uses_auto): Use is_auto_r.
691         (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
692         * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
693         constraints.
695         * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
696         Return a meaningful value rather than error_mark_node.
697         (for_each_template_parm): Return a tree.
698         (uses_template_parms_level): Return bool.
699         * cp-tree.h: Adjust.
701         * pt.c (unify): Don't diagnose no common base if we already have
702         the same template.
703         (do_auto_deduction): Explain deduction failure.
705         * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
706         uid.
708         * parser.c (synthesize_implicit_template_parm)
709         (finish_fully_implicit_template): Make static.
711 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
713         * call.c: Reorder #include's and remove duplicates.
714         * class.c: Likewise.
715         * constexpr.c: Likewise.
716         * cp-array-notation.c: Likewise.
717         * cp-cilkplus.c: Likewise.
718         * cp-gimplify.c: Likewise.
719         * cp-lang.c: Likewise.
720         * cp-objcp-common.c: Likewise.
721         * cp-ubsan.c: Likewise.
722         * cvt.c: Likewise.
723         * cxx-pretty-print.c: Likewise.
724         * decl.c: Likewise.
725         * decl2.c: Likewise.
726         * dump.c: Likewise.
727         * error.c: Likewise.
728         * except.c: Likewise.
729         * expr.c: Likewise.
730         * friend.c: Likewise.
731         * init.c: Likewise.
732         * lambda.c: Likewise.
733         * lex.c: Likewise.
734         * mangle.c: Likewise.
735         * method.c: Likewise.
736         * name-lookup.c: Likewise.
737         * optimize.c: Likewise.
738         * parser.c: Likewise.
739         * pt.c: Likewise.
740         * ptree.c: Likewise.
741         * repo.c: Likewise.
742         * rtti.c: Likewise.
743         * search.c: Likewise.
744         * semantics.c: Likewise.
745         * tree.c: Likewise.
746         * typeck.c: Likewise.
747         * typeck2.c: Likewise.
748         * vtable-class-hierarchy.c: Likewise.
750 2015-10-29  Paolo Carlini  <paolo.carlini@oracle.com>
752         PR c++/67845
753         * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
754         functions consistently reset TREE_TYPE (decl) too.
756 2015-10-28  Jason Merrill  <jason@redhat.com>
758         DR 1518
759         * class.c (type_has_user_provided_or_explicit_constructor): New.
760         (check_bases_and_members): Use it.
761         * cp-tree.h: Declare it.
763 2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>
764             Thomas Schwinge  <thomas@codesourcery.com>
765             James Norris  <jnorris@codesourcery.com>
766             Joseph Myers  <joseph@codesourcery.com>
767             Julian Brown  <julian@codesourcery.com>
768             Nathan Sidwell <nathan@codesourcery.com>
769             Bernd Schmidt  <bschmidt@redhat.com>
771         * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
772         vector, worker.
773         (cp_parser_oacc_simple_clause): New.
774         (cp_parser_oacc_shape_clause): New.
775         (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
776         (OACC_LOOP_CLAUSE_MASK): Likewise.
777         * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
778         worker. Unify the handling of teams, tasks and vector_length with
779         the other loop shape clauses.
781 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
782             James Norris  <jnorris@codesourcery.com>
783             Cesar Philippidis  <cesar@codesourcery.com>
785         PR c/64765
786         PR c/64880
787         * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
788         declare functions.
789         (finish_omp_construct): Declare function.
790         * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
791         formal parameters, and handle these.  Adjust all users.
792         (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
793         into...
794         (cp_parser_oacc_kernels_parallel): ... this new function.  Adjust
795         all users.
796         * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
797         (finish_omp_construct): ... this new function.
799 2015-10-25  Jason Merrill  <jason@redhat.com>
801         DR 2179
802         * pt.c (process_partial_specialization): Handle error_mark_node
803         from most_specialized_partial_spec.
805 2015-10-23  Jason Merrill  <jason@redhat.com>
807         DR 1518
808         DR 1630
809         PR c++/54835
810         PR c++/60417
811         * call.c (convert_like_real): Value-initialization can't use
812         explicit constructors in C++11 and up.
814         PR c++/67813
815         * constexpr.c (cxx_eval_store_expression): Always use *valp if
816         set.
818 2015-10-22  Jason Merrill  <jason@redhat.com>
820         * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
821         (add_template_candidate_real): Handle it.
822         * pt.c (fn_type_unification): Handle it.
824         * call.c (add_conv_candidate): Remove first_arg parm.
825         (add_template_conv_candidate): Likewise.
826         (add_template_candidate_real): Don't pass it.
827         (build_op_call_1): Likewise.
829 2015-10-22  Richard Biener  <rguenther@suse.de>
831         * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
832         before folding a MINUS_EXPR.
833         (finish_omp_clauses): Likewise.
835 2015-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
837         PR c++/66781
838         * parser.c (cp_parser_enum_specifier): Upon error_at set
839         nested_name_specifier to error_mark_node; improve error message.
841 2015-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
843         PR c++/67847
844         * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
845         which doesn't name a class or namespace.
847 2015-10-21  Ilya Enkovich  <enkovich.gnu@gmail.com>
849         * call.c (build_conditional_expr_1): Use boolean vector
850         type for vector comparison.
851         * typeck.c (build_vec_cmp): New.
852         (cp_build_binary_op): Use build_vec_cmp for comparison.
854 2015-10-20  Jason Merrill  <jason@redhat.com>
856         PR c++/66583
857         * init.c (innermost_aggr_scope): New.
858         (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
859         (sort_mem_initializers): Handle initializers for entire anonymous
860         aggregates.
862 2015-10-20  Marek Polacek  <polacek@redhat.com>
864         * parser.c (is_cilkplus_vector_p): Don't define here.
866 2015-10-19  Jason Merrill  <jason@redhat.com>
868         PR c++/67064
869         * semantics.c (force_paren_expr): Don't mess with hard register vars.
871         Implement N4268, Do constant evaluation of all non-type template args.
872         * parser.c (cp_parser_template_argument): For C++1z just parse a
873         constant-expression.
874         * pt.c (convert_nontype_argument): For C++1z always call
875         maybe_constant_value.
877         * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
878         only when necessary.
879         (cxx_eval_component_reference): Like here.
880         * decl2.c (lower_var_init): And here.
881         (c_parse_final_cleanups): Call it.
882         * typeck2.c (digest_init_r): Not here.
883         * decl.c (complete_vars): Or here.
884         (cp_finish_decl): Add local statics to symbol table.
886 2015-10-17  Jason Merrill  <jason@redhat.com>
888         PR c++/68006
889         * decl.c (implicit_default_ctor_p): New.
890         (start_preparsed_function): Don't clobber on entry to one.
892 2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
894         PR c++/67926
895         * constexpr.c (potential_constant_expression_1): Handle
896         UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
897         BINARY_RIGHT_FOLD_EXPR.
899 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
900             Aldy Hernandez  <aldyh@redhat.com>
902         * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
903         * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
904         (cp_genericize_r): Likewise.
905         (cxx_omp_finish_clause): Don't diagnose references.
906         (cxx_omp_disregard_value_expr): New function.
907         * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
908         * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
909         (DECL_OMP_PRIVATIZED_MEMBER): Define.
910         (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
911         pop_omp_privatization_clauses, save_omp_privatization_clauses,
912         restore_omp_privatization_clauses, omp_privatize_field,
913         cxx_omp_disregard_value_expr): New prototypes.
914         (finish_omp_clauses): Add two new arguments.
915         (finish_omp_for): Add ORIG_DECLV argument.
916         * parser.c (cp_parser_lambda_body): Call
917         save_omp_privatization_clauses and restore_omp_privatization_clauses.
918         (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
919         (cp_parser_omp_var_list_no_open): Handle structure elements for
920         map, to and from clauses.  Handle array sections in reduction
921         clause.  Parse this keyword.  Formatting fixes.
922         (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
923         if clause modifiers.
924         (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
925         cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
926         cp_parser_omp_clause_defaultmap): New functions.
927         (cp_parser_omp_clause_ordered): Parse optional parameter.
928         (cp_parser_omp_clause_reduction): Handle array reductions.
929         (cp_parser_omp_clause_schedule): Parse optional simd modifier.
930         (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
931         New functions.
932         (cp_parser_omp_clause_linear): Parse linear clause modifiers.
933         (cp_parser_omp_clause_depend_sink): New function.
934         (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
935         (cp_parser_omp_clause_map): Parse release/delete map kinds and
936         optional always modifier.
937         (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
938         and finish_omp_clauses callers.
939         (cp_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
940         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
941         (OMP_CRITICAL_CLAUSE_MASK): Define.
942         (cp_parser_omp_critical): Parse critical clauses.
943         (cp_parser_omp_for_incr): Use cp_tree_equal if
944         processing_template_decl.
945         (cp_parser_omp_for_loop_init): Return tree instead of bool.  Handle
946         non-static data member iterators.
947         (cp_parser_omp_for_loop): Handle doacross loops, adjust
948         finish_omp_for and finish_omp_clauses callers.
949         (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
950         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
951         (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
952         (OMP_FOR_CLAUSE_MASK): Add linear clause.
953         (cp_parser_omp_for): Disallow ordered clause when combined with
954         distribute.  Disallow linear clause when combined with distribute
955         and not combined with simd.
956         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
957         (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
958         of tree, parse clauses and if depend clause is found, don't parse
959         a body.
960         (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
961         Allow target parallel without for after it.
962         (OMP_TASK_CLAUSE_MASK): Add priority clause.
963         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
964         (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
965         invalid kinds.
966         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
967         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
968         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
969         (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
970         functions.
971         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
972         defaultmap and is_device_ptr clauses.
973         (cp_parser_omp_target): Parse target parallel and target simd.  Set
974         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
975         and target exit data.  Diagnose invalid map kinds.
976         (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
977         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
978         (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
979         construct.
980         (OMP_TASKLOOP_CLAUSE_MASK): Define.
981         (cp_parser_omp_taskloop): New function.
982         (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
983         handle PRAGMA_OMP_TASKLOOP.
984         (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
985         handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
986         and pop_omp_privatization_clauses around parsing calls.
987         (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
988         * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
989         and finish_omp_clauses callers.
990         (tsubst_omp_clause_decl): Return NULL if decl is NULL.
991         For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
992         Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
993         effects.
994         (tsubst_omp_clauses): Add ALLOW_FIELDS argument.  Handle new
995         OpenMP 4.5 clauses.  Use tsubst_omp_clause_decl for more clauses.
996         If ALLOW_FIELDS, handle non-static data members in the clauses.
997         Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
998         (omp_parallel_combined_clauses): New variable.
999         (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
1000         OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
1001         Improve handling of clauses on combined constructs.
1002         (tsubst_expr): Call push_omp_privatization_clauses and
1003         pop_omp_privatization_clauses around instantiation of certain
1004         OpenMP constructs, improve handling of clauses on combined
1005         constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
1006         tsubst_omp_clauses and finish_omp_for callers, handle clauses on
1007         critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
1008         (instantiate_decl): Call save_omp_privatization_clauses and
1009         restore_omp_privatization_clauses around instantiation.
1010         (dependent_omp_for_p): Fix up comment typo.  Handle SCOPE_REF.
1011         * semantics.c (omp_private_member_map, omp_private_member_vec,
1012         omp_private_member_ignore_next): New variables.
1013         (finish_non_static_data_member): Return dummy decl for privatized
1014         non-static data members.
1015         (omp_clause_decl_field, omp_clause_printable_decl,
1016         omp_note_field_privatization, omp_privatize_field): New functions.
1017         (handle_omp_array_sections_1): Fix comment typo.
1018         Add IS_OMP argument, handle structure element bases, diagnose
1019         bitfields, pass IS_OMP recursively, diagnose known zero length
1020         array sections in depend clauses, handle array sections in reduction
1021         clause, diagnose negative length even for pointers.
1022         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1023         types, pass IS_OMP down to handle_omp_array_sections_1, handle
1024         array sections in reduction clause, set
1025         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1026         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1027         (finish_omp_reduction_clause): Handle array sections and arrays.
1028         Use omp_clause_printable_decl.
1029         (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
1030         New functions.
1031         (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
1032         Handle new OpenMP 4.5 clauses and new restrictions for the old
1033         ones, handle non-static data members, reject this keyword when not
1034         allowed.
1035         (push_omp_privatization_clauses, pop_omp_privatization_clauses,
1036         save_omp_privatization_clauses, restore_omp_privatization_clauses):
1037         New functions.
1038         (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
1039         Add collapse and ordered arguments.  Fix handling of lastprivate
1040         iterators in doacross loops.
1041         (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
1042         adjust c_finish_omp_for, handle_omp_for_class_iterator and
1043         finish_omp_clauses callers.  Fill in OMP_CLAUSE_LINEAR_STEP on simd
1044         loops with non-static data member iterators.
1046 2015-10-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
1048         PR c++/58566
1049         * lambda.c (lambda_return_type): Return error_mark_node
1050         instead of void_type_node for the error cases.
1052 2015-10-08  Jason Merrill  <jason@redhat.com>
1054         * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
1055         * init.c (get_nsdmi): Use it.
1056         * typeck2.c (massage_init_elt): Use it.
1058 2015-10-07  Jason Merrill  <jason@redhat.com>
1060         PR c++/67557
1061         * call.c (is_base_field_ref): New.
1062         (unsafe_copy_elision_p): New.
1063         (build_over_call): Use it.
1065 2015-10-07  Marek Polacek  <polacek@redhat.com>
1067         PR sanitizer/67867
1068         * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
1070 2015-10-07  Marek Polacek  <polacek@redhat.com>
1072         * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
1073         (genericize_cp_loop): Likewise.
1074         * decl.c (cxx_maybe_build_cleanup): Likewise.
1075         * parser.c (cp_parser_binary_expression): Likewise.
1076         (cp_parser_omp_for_loop): Likewise.
1077         (cp_parser_omp_construct): Likewise.
1078         * semantics.c (finish_transaction_stmt): Likewise.
1079         (build_transaction_expr): Likewise.
1081 2015-10-06  Jason Merrill  <jason@redhat.com>
1083         PR c++/67810
1084         * parser.c (cp_parser_fold_expr_p): Remove.
1085         (is_binary_op): New.
1086         (cp_parser_fold_expression): Take LHS as parameter.
1087         (cp_parser_primary_expression): Call it after parsing an expression.
1088         (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
1089         (cp_parser_expression): Ignore an operator followed by '...'.
1090         (is_binary_op): New.
1091         * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
1092         (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
1094 2015-10-06  Marek Polacek  <polacek@redhat.com>
1096         PR c++/67863
1097         * call.c (build_conditional_expr_1): Build the COND_EXPR with
1098         a location.
1100 2015-10-05  Paolo Carlini  <paolo.carlini@oracle.com>
1102         PR c++/53856
1103         * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
1104         reject default template arguments in out of class definitions
1105         of members of non-template classes.
1107 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
1109         * tree.c (cp_tree_equal): Use real_equal instead of
1110         REAL_VALUES_EQUAL.
1112 2015-10-04  Jason Merrill  <jason@redhat.com>
1114         Implement N4514, C++ Extensions for Transactional Memory.
1115         * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
1116         (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
1117         * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
1118         * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
1119         (make_call_declarator): Take tx_qualifier.
1120         (cp_parser_tx_qualifier_opt): New.
1121         (cp_parser_lambda_declarator_opt): Use it.
1122         (cp_parser_direct_declarator): Likewise.
1123         (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
1124         (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
1125         (cp_parser_std_attribute): Map optimize_for_synchronized to
1126         transaction_callable.
1127         (cp_parser_transaction): Take the token.  Handle atomic_noexcept.
1128         * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
1129         * call.c (enum conversion_kind): Add ck_tsafe.
1130         (standard_conversion): Handle transaction-safety conversion.
1131         (convert_like_real, resolve_address_of_overloaded_function): Likewise.
1132         (check_methods): Diagnose transaction_safe_dynamic on non-virtual
1133         function.
1134         (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
1135         * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
1136         (can_convert_tx_safety): New.
1137         * typeck.c (composite_pointer_type): Handle transaction-safety.
1138         * name-lookup.h (enum scope_kind): Add sk_transaction.
1139         * name-lookup.c (begin_scope): Handle it.
1140         * semantics.c (begin_compound_stmt): Pass it.
1141         * decl.c (check_previous_goto_1): Check it.
1142         (struct named_label_entry): Add in_transaction_scope.
1143         (poplevel_named_label_1): Set it.
1144         (check_goto): Check it.
1145         (duplicate_decls): A specialization can be transaction_safe
1146         independently of its template.
1147         (grokdeclarator): Handle tx-qualifier.
1148         * rtti.c (ptr_initializer): Handle transaction-safe.
1149         * search.c (check_final_overrider): Check transaction_safe_dynamic.
1150         Don't check transaction_safe.
1151         * mangle.c (write_function_type): Mangle transaction_safe here.
1152         (write_CV_qualifiers_for_type): Not here.
1153         (write_type): Preserve transaction_safe when stripping attributes.
1154         * error.c (dump_type_suffix): Print transaction_safe.
1156 2015-10-02  Marek Polacek  <polacek@redhat.com>
1158         PR c/64249
1159         * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
1160         down to cp_parser_selection_statement.
1161         (cp_parser_selection_statement): Add CHAIN parameter.  Add code to
1162         warn about duplicated if-else-if conditions.
1163         (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
1164         it down to cp_parser_statement.
1166 2015-10-01  Ville Voutilainen  <ville.voutilainen@gmail.com>
1168         PR c++/54430
1169         * name-lookup.c (push_binding): Make non-static.
1170         * name-lookup.h (push_binding): Declare it.
1171         * parser.c (cp_parser_range_for): Use it, get the range
1172         declaration away from the scope until the range expression
1173         has been parsed, then restore the declaration.
1175 2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>
1177         Fix small typos in the coding rule enforcement warnings.
1178         * parser.c (cp_parser_namespace_definition): Replace 'namepace'
1179         with 'namespace'.
1181 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
1183         * decl.c (xref_basetypes): Check virtual and/or multiple
1184         inheritance warning.
1185         * parser.c (cp_parser_namespace_definition): Check namespaces
1186         warning.
1187         * pt.c (push_template_decl_real): Check templates warning.
1189 2015-09-22  Jason Merrill  <jason@redhat.com>
1191         * mangle.c (abi_warn_or_compat_version_crosses): New.
1192         Use it instead of abi_version_crosses.
1193         (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
1195 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
1197         Complete the implementation of N4230, Nested namespace definition.
1198         * parser.c (cp_parser_namespace_definition): Support namespace
1199         attributes both before and after the namespace identifier.
1201 2015-09-19  Trevor Saunders  <tbsaunde@tbsaunde.org>
1203         * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
1205 2015-09-18  Ville Voutilainen  <ville.voutilainen@gmail.com>
1207         Implement nested namespace definitions.
1208         * parser.c (cp_parser_namespace_definition): Grok nested namespace
1209         definitions.
1211 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1213         * parser.c (pragma_lex): Add loc argument. Rearrange the code to
1214         make it more similar to the C version.
1216 2015-09-17  Andrew Sutton  <andrew.n.sutton@gmail.com>
1217             Jason Merrill  <jason@redhat.com>
1219         Implement N4295 fold-expressions.
1220         * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
1221         BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
1222         * cp-objcp-common.c (cp_common_init_ts): Handle them.
1223         * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
1224         (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
1225         * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
1226         (cp_parser_skip_to_closing_parenthesis_1): This function.  Change
1227         or_comma parameter to or_ttype.
1228         (cp_parser_fold_operator, cp_parser_fold_expr_p)
1229         (cp_parser_fold_expression): New.
1230         (cp_parser_primary_expression): Use them.
1231         * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
1232         (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
1233         (tsubst_binary_left_fold, expand_right_fold)
1234         (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
1235         (tsubst_copy): Use them.
1236         (type_dependent_expression_p): Handle fold-expressions.
1237         * semantics.c (finish_unary_fold_expr)
1238         (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
1239         (finish_binary_fold_expr): New.
1241 2015-09-17  Richard Biener  <rguenther@suse.de>
1243         * cp-tree.h (note_decl_for_pch): Remove.
1244         * class.c (build_clone): Do not call note_decl_for_pch.
1245         * semantics.c (finish_member_declaration): Likewise.
1246         (note_decl_for_pch): Remove.
1247         * decl2.c (c_parse_final_cleanups): Mangle all globals before
1248         writing the PCH.
1250 2015-09-14  Jason Merrill  <jason@redhat.com>
1252         PR c++/44282
1253         * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
1254         mangling with lower -fabi-version.
1256 2015-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
1258         PR c++/51911
1259         * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
1260         per the spirit of DR 1467).
1262 2015-09-11  Mark Wielaard  <mjw@redhat.com>
1264         PR c/28901
1265         * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
1266         VAR_P TREE_READONLY override.
1268 2015-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
1270         PR c++/67318
1271         * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
1272         and set template_parameter_pack_p also when the type is null.
1274 2015-09-09  Mark Wielaard  <mjw@redhat.com>
1276         * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
1277         parm against NULL.
1279 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
1281         PR c++/67522
1282         * semantics.c (handle_omp_array_sections_1): Only run
1283         type_dependent_expression_p on VAR_DECL/PARM_DECLs.
1284         (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
1285         Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
1286         is not a VAR_DECL/PARM_DECL.
1288         PR c++/67511
1289         * semantics.c (handle_omp_for_class_iterator): Don't wrap
1290         error_mark_node into a NOP_EXPR to void_type_node.
1292 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
1294         PR c++/53184
1295         * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
1297 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
1299         PR c++/67504
1300         * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
1301         before INTEGRAL_TYPE_P test.
1303 2015-09-08  Jason Merrill  <jason@redhat.com>
1305         PR c++/67041
1306         * pt.c (tsubst_copy_and_build): Handle variables like functions.
1308 2015-09-08  Paolo Carlini  <paolo.carlini@oracle.com>
1310         PR c++/67369
1311         * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
1312         if the first argument isn't a template.
1314 2015-09-03  Martin Sebor  <msebor@redhat.com>
1316         PR c/66516
1317         * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
1318         argument(s).
1319         * expr.c (mark_rvalue_use): Use new argument.
1320         * call.c (build_addr_func): Call decay_conversion with new
1321         argument.
1322         * pt.c (convert_template_argument): Call reject_gcc_builtin.
1323         * typeck.c (decay_conversion): Use new argument.
1324         (c_decl_implicit): Define.
1326 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1328         PR middle-end/60586
1329         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
1330         function.
1331         (cp_gimplify_expr): Added a call to the function
1332         cilk_cp_gimplify_call_params_in_spawned_fn.
1334 2015-09-01  Paolo Carlini  <paolo.carlini@oracle.com>
1336         PR c++/61753
1337         * decl.c (smallest_type_quals_location): New.
1338         (check_special_function_return_type): Use the latter; add int and
1339         const location_t* parameters.
1340         (grokdeclarator): Adjust check_special_function_return_type call.
1342 2015-08-29  Markus Trippelsdorf  <markus@trippelsdorf.de>
1344         PR c++/67371
1345         * constexpr.c (potential_constant_expression_1): Remove IF_STMT
1346         case. Move label to COND_EXPR case. Remove checking of
1347         SWITCH_STMT_BODY.
1349 2015-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
1351         PR c++/63693
1352         * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
1353         only on class types.
1355 2015-08-21  Jason Merrill  <jason@redhat.com>
1357         PR c++/67240
1358         * constraint.cc (satisfy_implicit_conversion_constraint): Also
1359         check for NULL_TREE.
1361 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
1363         * decl.c (grokvardecl): Simplify the latter.
1365 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
1367         * decl.c (grokvardecl): Complete check added for c++/67065.
1369 2015-08-20  Jason Merrill  <jason@redhat.com>
1371         * name-lookup.c (hidden_name_p): Handle OVERLOAD.
1373 2015-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
1375         PR c++/67065
1376         * decl.c (grokvardecl): Reject 'main' as global variable.
1378 2015-08-19  Jason Merrill  <jason@redhat.com>
1380         PR c++/66957
1381         * search.c (protected_accessible_p): Remove redundant access_in_type.
1382         Add otype parm instead of walking binfo.
1383         (friend_accessible_p): Check SCOPE itself.  Handle class
1384         templates.  Pass through otype.
1385         (dfs_accessible_post): Handle all accessibility cases.
1386         (dfs_accessible_pre): New.
1387         (accessible_p): Use it.  Don't check protected access here.  Pass
1388         decl and otype to dfs_walk.
1389         (member_declared_in_type, dfs_access_in_type_pre): New.
1390         (access_in_type): Use dfs_access_in_type_pre.
1391         * friend.c (add_friend): Fix multiple friends with the same name.
1393         * lambda.c (current_nonlambda_scope): New.
1395 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
1397         * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
1398         method.c, name-lookup.h, parser.c, parser.h, rtti.c,
1399         semantics.c, typeck2.c: Remove useless typedefs.
1401 2015-08-18  Jason Merrill  <jason@redhat.com>
1403         DR 1155
1404         * pt.c (convert_nontype_argument): Allow internal linkage in C++11
1405         and up.
1407 2015-08-17  Paolo Carlini  <paolo.carlini@oracle.com>
1409         PR c++/67216
1410         * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
1412 2015-08-17  Jason Merrill  <jason@redhat.com>
1414         PR c++/67244
1415         * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
1417         PR c++/67104
1418         * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
1419         (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
1421         * constexpr.c (cxx_eval_store_expression): Don't set
1422         CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
1423         without it.
1424         (cxx_eval_array_reference): Check it.
1426         * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
1428 2015-08-14  Jason Merrill  <jason@redhat.com>
1430         PR c++/65974
1431         * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
1433 2015-08-12  Jason Merrill  <jason@redhat.com>
1435         PR c++/67104
1436         * constexpr.c (cxx_eval_array_reference): Fix typo.
1438         PR c++/67104
1439         * constexpr.c (cxx_eval_array_reference): Handle sparse
1440         CONSTRUCTORs.
1442         PR c++/67108
1443         * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
1444         * error.c (dump_template_bindings): Don't tsubst in that case.
1446         PR c++/67161
1447         * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
1448         TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
1450 2015-08-08  Jason Merrill  <jason@redhat.com>
1452         PR c++/67152
1453         * pt.c (process_partial_specialization): Call
1454         associate_classtype_constraints.
1456         PR c++/67159
1457         * constraint.cc (finish_template_introduction):
1458         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1460         PR c++/67142
1461         * pt.c (equal): Make sure tmpl is actually a template.
1463         PR c++/67144
1464         * call.c (joust): Only call more_constrained on decls.
1466 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
1467             Braden Obrzut  <admin@maniacsvault.net>
1468             Jason Merrill  <jason@redhat.com>
1469             Ville Voutilainen  <ville.voutilainen@gmail.com>
1471         Add C++ Concepts TS support.
1472         * constraint.cc, logic.cc: New files.
1473         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
1474         (c++.tags): Also process .cc files.
1475         * call.c (enum rejection_reason_code): Add rr_constraint_failure.
1476         (print_z_candidate): Handle it.
1477         (constraint_failure): New.
1478         (add_function_candidate): Check constraints.
1479         (build_new_function_call): Handle evaluating concepts.
1480         (joust): Check more_constrained.
1481         * class.c (add_method): Check equivalently_constrained.
1482         (build_clone): Copy constraints.
1483         (currently_open_class): Return tree.
1484         (resolve_address_of_overloaded_function): Check constraints.
1485         * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
1486         (potential_constant_expression_1): Likewise.
1487         * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
1488         (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
1489         * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
1490         SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
1491         EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
1492         EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
1493         * cp-tree.h (struct tree_constraint_info, check_nonnull)
1494         (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
1495         (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
1496         (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
1497         (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
1498         (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
1499         (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
1500         (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
1501         (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
1502         (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
1503         (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
1504         (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
1505         (struct local_specialization_stack, enum auto_deduction_context)
1506         (variable_concept_p, concept_template_p)
1507         (struct deferring_access_check_sentinel): New.
1508         (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
1509         (union lang_tree_node): Add constraint_info field.
1510         (struct lang_decl_base): Add concept_p flag.
1511         (enum cp_decl_spec): Add ds_concept.
1512         (struct cp_declarator): Add requires_clause.
1513         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1514         (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
1515         TRAIT_EXPR, *_CONSTR.
1516         (pp_cxx_parameter_declaration_clause): Accept a chain of
1517         PARM_DECLs.
1518         (cxx_pretty_printer::declarator): Print requires-clause.
1519         (pp_cxx_template_declaration): Likewise.
1520         (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
1521         (pp_cxx_requires_clause, pp_cxx_requirement)
1522         (pp_cxx_requirement_list, pp_cxx_requirement_body)
1523         (pp_cxx_requires_expr, pp_cxx_simple_requirement)
1524         (pp_cxx_type_requirement, pp_cxx_compound_requirement)
1525         (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
1526         (pp_cxx_expression_constraint, pp_cxx_type_constraint)
1527         (pp_cxx_implicit_conversion_constraint)
1528         (pp_cxx_argument_deduction_constraint)
1529         (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
1530         (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
1531         * cxx-pretty-print.h: Declare them.
1532         * decl.c (decls_match): Compare constraints.
1533         (duplicate_decls): Likewise.  Remove constraints before freeing.
1534         (cxx_init_decl_processing): Call init_constraint_processing.
1535         (cp_finish_decl): Diagnose concept without initializer.
1536         (grokfndecl, grokvardecl): Handle concepts and constraints.
1537         (grokdeclarator): Handle concept, requires-clause.
1538         (grokparms): No longer static.
1539         (xref_tag_1): Check constraints.
1540         (finish_function): Call check_function_concept.
1541         (cp_tree_node_structure): Handle CONSTRAINT_INFO.
1542         (check_concept_refinement, is_concept_var, check_concept_fn): New.
1543         * decl2.c (check_classfn): Compare constraints.
1544         (mark_used): Don't instantiate concepts.
1545         * error.c (dump_template_decl): Print constraints.
1546         (dump_function_decl): Likewise.
1547         (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
1548         * lex.c (init_reswords): Set D_CXX_CONCEPTS.
1549         * method.c (implicitly_declare_fn): Copy constraints from
1550         inherited ctor.
1551         * parser.h (struct cp_parser): Add in_result_type_constraint_p and
1552         prevent_constrained_type_specifiers fields.
1553         * parser.c (make_call_declarator): Add requires_clause parm.
1554         (cp_parser_new): Clear prevent_constrained_type_specifiers.
1555         (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
1556         (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
1557         (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
1558         (cp_parser_declaration): Handle concept introduction.
1559         (cp_parser_member_declaration): Likewise.
1560         (cp_parser_template_parameter): Handle constrained parameter.
1561         (cp_parser_type_parameter): Handle constraints.
1562         (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
1563         (cp_parser_template_id): Handle partial concept id.
1564         (cp_parser_type_name): Add overload that takes typename_keyword_p.
1565         Handle constrained parameter.
1566         (cp_parser_nonclass_name): Handle concept names.
1567         (cp_parser_alias_declaration): Handle constraints.
1568         (cp_parser_late_return_type_opt): Also handle requires-clause.
1569         (cp_parser_type_id_1): Handle deduction constraint.
1570         (cp_parser_parameter_declaration): Handle constrained parameters.
1571         (cp_parser_class_specifier_1): Handle constraints.
1572         (cp_parser_template_declaration_after_parameters): Split out from
1573         cp_parser_template_declaration_after_export.
1574         (cp_parser_single_declaration): Handle constraints.
1575         (synthesize_implicit_template_parm): Handle constraints.
1576         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1577         (cp_parser_introduction_list, get_id_declarator)
1578         (get_unqualified_id, is_constrained_parameter)
1579         (cp_parser_check_constrained_type_parm)
1580         (cp_parser_constrained_type_template_parm)
1581         (cp_parser_constrained_template_template_parm)
1582         (constrained_non_type_template_parm, finish_constrained_parameter)
1583         (declares_constrained_type_template_parameter)
1584         (declares_constrained_template_template_parameter)
1585         (check_type_concept, cp_parser_maybe_constrained_type_specifier)
1586         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
1587         (cp_parser_requires_clause, cp_parser_requires_clause_opt)
1588         (cp_parser_requires_expression)
1589         (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
1590         (cp_parser_requirement_list, cp_parser_requirement)
1591         (cp_parser_simple_requirement, cp_parser_type_requirement)
1592         (cp_parser_compound_requirement, cp_parser_nested_requirement)
1593         (cp_parser_template_introduction)
1594         (cp_parser_explicit_template_declaration)
1595         (get_concept_from_constraint): New.
1596         * pt.c (local_specialization_stack): Implement.
1597         (maybe_new_partial_specialization): New.
1598         (maybe_process_partial_specialization): Use it.
1599         (retrieve_local_specialization, register_local_specialization)
1600         (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
1601         (tsubst_expr): No longer static.
1602         (spec_hasher::equal): Compare constraints.
1603         (determine_specialization): Handle constraints.
1604         (check_explicit_specialization): Handle concepts.
1605         (process_template_parm): Handle constraints.
1606         (end_template_parm_list): Add overload taking no arguments.
1607         (process_partial_specialization): Handle concepts and constraints.
1608         Register partial specializations of variable templates.
1609         (redeclare_class_template): Handle constraints.
1610         (convert_template_argument): Handle WILDCARD_DECL.  Check
1611         is_compatible_template_arg.
1612         (coerce_template_parameter_pack): Handle wildcard packs.
1613         (coerce_template_parms): DR 1430 also applies to concepts.  Add
1614         overloads taking fewer parameters.
1615         (lookup_template_class_1): Handle constraints.
1616         (lookup_template_variable): Concepts are always bool.
1617         (finish_template_variable): Handle concepts and constraints.
1618         (tsubst_friend_class): Handle constraints.
1619         (gen_elem_of_pack_expansion_instantiation): Handle constraints.
1620         (tsubst_pack_expansion): Handle local parameters.
1621         (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
1622         (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
1623         (tsubst_copy_and_build): Handle REQUIRES_EXPR.
1624         (more_specialized_fn, more_specialized_partial_spec): Check constraints.
1625         (more_specialized_inst): Split out from most_specialized_instantiation.
1626         (most_specialized_partial_spec): Check constraints.
1627         (instantiate_decl): Never instantiate a concept.
1628         (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
1629         variable concepts.
1630         (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
1631         (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
1632         (do_auto_deduction): Add overload taking tsubst flags and context enum.
1633         Handle constraints.
1634         (get_template_for_ordering, most_constrained_function)
1635         (is_compatible_template_arg, convert_wildcard_argument)
1636         (struct constr_entry, struct constr_hasher, decl_constraints)
1637         (valid_constraints_p, get_constraints, set_constraints)
1638         (remove_constraints, init_constraint_processing): New.
1639         * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
1640         * search.c (lookup_member): Do lookup in the open partial
1641         instantiation.
1642         * semantics.c (finish_template_template_parm): Handle constraints.
1643         (fixup_template_type): New.
1644         (finish_template_type): Call it.
1645         (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
1646         * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
1647         (cp_walk_subtrees): Handle REQUIRES_EXPR.
1648         * typeck.c (cp_build_function_call_vec): Check constraints.
1650 2015-08-06  Jason Merrill  <jason@redhat.com>
1652         PR c++/66533
1653         * parser.c (cp_parser_primary_expression): Don't skip to the end
1654         of the statement if we're parsing tentatively.
1656         PR c++/67130
1657         PR c++/67131
1658         PR c++/66260
1659         * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
1660         templates.
1661         * pt.c (tsubst_copy_and_build): Check for argument substitution
1662         failure.
1664 2015-08-05  Jason Merrill  <jason@redhat.com>
1666         * pt.c (determine_specialization): Print candidates after 'no
1667         match' error.
1669         * decl.c (cp_finish_decl): Tidy.
1670         * typeck.c (finish_class_member_access_expr): Use
1671         type_dependent_expression_p.
1672         * semantics.c (finish_id_expression): Use
1673         type_dependent_expression_p.  Don't build_qualified_name for a
1674         decl in non-dependent scope.
1675         * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
1676         identifier is dependent.  Remove variable_template_p check.
1678         PR c++/66260
1679         PR c++/66596
1680         PR c++/66649
1681         PR c++/66923
1682         * pt.c (lookup_template_variable): Use NULL_TREE for type.
1683         (instantiate_template_1): Also set DECL_TI_ARGS based on
1684         the immediate parent.
1685         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
1686         (finish_template_variable): Add complain parm.
1687         * cp-tree.h: Adjust.
1689         PR c++/65195
1690         PR c++/66619
1691         * semantics.c (finish_id_expression): Call convert_from_reference
1692         for variable template.
1694 2015-08-04  Jason Merrill  <jason@redhat.com>
1696         * pt.c (lookup_template_class_1): Clear elt.spec.
1698         * tree.c (build_target_expr): Copy the location from value.
1700 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
1702         * parser.c (cp_parser_selection_statement): Move handling of
1703         semicolon body to ...
1704         (cp_parser_implicitly_scoped_statement): .. here.  Call
1705         warn_for_misleading_indentation even when the body is a
1706         semicolon.  Extract token_indent_infos corresponding to the
1707         guard, body and next tokens.  Adjust call to
1708         warn_for_misleading_indentation accordingly.  Take
1709         token_indent_info argument.
1710         (cp_parser_already_scoped_statement): Likewise.
1711         (cp_parser_selection_statement, cp_parser_iteration_statement):
1712         Extract a token_indent_info corresponding to the guard token.
1714 2015-08-01  Caroline Tice  <cmtice@google.com>
1716         PR 66521
1717         * mangle.c : Add vtable-verify.h to include files.
1718         (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
1719         is "<anon>" get the real mangled name for the class instead, and
1720         also store the real mangled name in a vector for use later.
1722 2015-07-31  Marek Polacek  <polacek@redhat.com>
1724         PR sanitizer/66977
1725         * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
1726         RSHIFT_EXPR.
1728 2015-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1730         * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
1731         in warning_at instead of "%q+D" in warning.
1732         (warn_hidden): Likewise but use location_of.
1733         (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
1734         (check_bitfield_decl, check_field_decls): Likewise in warning_at.
1735         (check_field_decls): Likewise for permerror.
1736         (explain_non_literal_class): Likewise for inform.
1737         (check_bases_and_members, layout_class_type): Likewise for warning_at.
1738         (note_name_declared_in_class): Use location_of in permerror.
1739         * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
1740         (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
1741         inform, and warning_at.
1742         (check_for_out_of_scope_variable): Likewise for warning_at and
1743         permerror.
1745 2015-07-30  Jason Merrill  <jason@redhat.com>
1747         DR 1558
1748         PR c++/67021
1749         * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
1751 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
1753         * call.c (build_op_delete_call, convert_like_real, build_over_call):
1754         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
1755         of "%q+D".
1756         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
1757         * decl.c (duplicate_decls): Likewise for warning/warning_at.
1758         * except.c (maybe_noexcept_warning): Likewise.
1759         * friend.c (make_friend_class): Likewise for inform.
1760         * mangle.c (mangle_decl): Likewise for warning/warning_at.
1761         * method.c (process_subob_fn, walk_field_subobs,
1762         maybe_explain_implicit_delete): Likewise for inform.
1763         * parser.c (cp_parser_lambda_introducer): Likewise.
1764         * pt.c (check_specialization_namespace,
1765         maybe_process_partial_specialization): Likewise for permerror.
1766         (redeclare_class_template): Likewise for inform_n.
1767         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
1768         * search.c (check_final_overrider): Likewise.
1769         * semantics.c (process_outer_var_ref): Likewise.
1771 2015-07-27  Jason Merrill  <jason@redhat.com>
1773         * constexpr.c (cxx_eval_call_expression): Don't add this call to
1774         the hash table if !depth_ok.
1776 2015-07-27  Marek Polacek  <polacek@redhat.com>
1778         PR c++/66555
1779         PR c/54979
1780         * call.c (build_new_op_1): Call warn_tautological_cmp.
1781         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
1782         compare warnings.
1784 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
1786         PR c++/18969
1787         * typeck.c (check_return_expr): Also do the basic return-value
1788         validity checking if processing_template_decl and yet types are
1789         not dependent.  Remove obsolete code.
1791 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
1793         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
1794         in warning_at instead of "%q+D" in warning.
1795         (warn_extern_redeclared_static): Likewise for inform.
1796         (check_redeclaration_no_default_args): Likewise for permerror.
1797         (duplicate_decls): Likewise.
1798         (check_previous_goto_1): Likewise for inform.
1799         (check_goto, start_decl, check_for_uninitialized_const_var,
1800         start_preparsed_function, finish_function§): Likewise.
1801         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
1802         * init.c (sort_mem_initializers): Likewise.
1803         * typeck.c (convert_for_initialization): Likewise for inform.
1804         (maybe_warn_about_returning_address_of_local): Likewise.
1805         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
1806         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
1808 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
1810         PR c++/66857
1811         * cvt.c (ocp_convert): Don't call scalar_constant_value when
1812         converting to a class type.
1814 2015-07-24  Jason Merrill  <jason@redhat.com>
1816         PR c++/64969
1817         * pt.c (splice_late_return_type): Correct deduced return type for
1818         abbreviated function template.
1820 2015-07-24  Richard Biener  <rguenther@suse.de>
1822         * init.c (build_vec_init): Build iterator bound in the same
1823         type as the iterator.
1825 2015-07-23  Marek Polacek  <polacek@redhat.com>
1827         PR c++/66572
1828         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
1830 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
1832         PR c++/52987
1833         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
1834         redundant error messages.
1836 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
1838         * decl.c (grokdeclarator): For an erroneous template parameter
1839         propagate error_mark_node as type.
1841 2015-07-20  Marek Polacek  <polacek@redhat.com>
1843         PR c++/55095
1844         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
1846 2015-07-15  Jason Merrill  <jason@redhat.com>
1848         PR c++/65091
1849         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
1850         template if there is no type x in scope.
1852 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
1854         PR c++/66850
1855         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
1856         template template parm in the redeclaration.
1857         (lookup_template_class_1): Peel off irrelevant template levels
1858         from current_template_parms before augmenting the argument
1859         list.
1861 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
1863         PR c++/65071
1864         * parser.c (cp_parser_sizeof_pack): Also consider template template
1865         parameters.
1867 2015-07-14  Jason Merrill  <jason@redhat.com>
1869         * call.c (build_new_method_call_1): Call reshape_init.
1871 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
1873         * pt.c (check_template_shadow): Emit error + inform instead of
1874         two errors.
1876 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
1878         PR c++/65186
1879         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
1880         template parm type under C++11 and later.
1882 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
1884         * call.c: Fix double word typos.
1885         * cp-array-notation.c: Same.
1886         * cp-tree.h: Same.
1887         * init.c: Same.
1888         * name-lookup.c: Same.
1889         * parser.c: Same.
1891 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
1893         PR c++/30044
1894         * pt.c (begin_template_parm_list): Add a dummy parameter level
1895         to current_template_parms.
1896         (end_template_parm_list): Remove the dummy parameter level
1897         before adding the real one.
1898         (tsubst): Don't attempt to substitute for template parameters
1899         corresponding to a dummy argument level.
1900         (template_parms_to_args): Remove obsolete hack for
1901         giving template template arguments the proper level.
1902         (splite_late_return_type): Remove obsolete hack for giving
1903         template template arguments the proper level.
1904         * error.c (dump_template_decl): Don't print dummy template
1905         levels.
1907 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
1909         PR c++/54521
1910         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1911         the second step of copy-initialization.
1913 2015-07-10  Jason Merrill  <jason@redhat.com>
1915         * pt.c (find_parameter_packs_r): Handle variable templates.
1916         (variable_template_specialization_p): New.
1917         * cp-tree.h: Declare it.
1919         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1921 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
1923         * decl2.c (cpp_check): Revert latest change.
1925 2015-07-09  Jason Merrill  <jason@redhat.com>
1927         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1928         value_dependent_expression_p.
1930         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1931         template_parameter_pack_p.
1932         * parser.c (declarator_can_be_parameter_pack): False if
1933         parameter_pack_p is set.
1934         (make_parameter_declarator): Add template_parameter_pack_p parm.
1935         (cp_parser_template_parameter): Remove parameter pack parsing.
1936         (cp_parser_parameter_declaration): Handle all parameter packs.
1937         Tweak default argument permerror.
1939 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1941         * parser.c (cp_parser_default_type_template_argument)
1942         (cp_parser_default_template_template_argument): Factor out from
1943         cp_parser_type_parameter.
1945 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1947         * typeck.c (warn_args_num): Rename to error_args_num.
1948         (convert_arguments): Adjust calls.
1950 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1952         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1954 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1956         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1958 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
1960         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1961         * pt.c (apply_late_template_attributes): Likewise.
1963 2015-07-08  Marek Polacek  <polacek@redhat.com>
1965         PR c++/66748
1966         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1967         accessing TYPE_LANG_SPECIFIC node.
1969 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1971         * call.c: Adjust includes.
1972         * class.c: Likewise.
1973         * constexpr.c: Likewise.
1974         * cp-array-notation.c: Likewise.
1975         * cp-gimplify.c: Likewise.
1976         * cp-lang.c: Likewise.
1977         * cp-objcp-common.c: Likewise.
1978         * cp-ubsan.c: Likewise.
1979         * cvt.c: Likewise.
1980         * decl.c: Likewise.
1981         * decl2.c: Likewise.
1982         * dump.c: Likewise.
1983         * error.c: Likewise.
1984         * except.c: Likewise.
1985         * expr.c: Likewise.
1986         * friend.c: Likewise.
1987         * init.c: Likewise.
1988         * lambda.c: Likewise.
1989         * lex.c: Likewise.
1990         * mangle.c: Likewise.
1991         * method.c: Likewise.
1992         * name-lookup.c: Likewise.
1993         * optimize.c: Likewise.
1994         * parser.c: Likewise.
1995         * pt.c: Likewise.
1996         * ptree.c: Likewise.
1997         * repo.c: Likewise.
1998         * rtti.c: Likewise.
1999         * search.c: Likewise.
2000         * semantics.c: Likewise.
2001         * tree.c: Likewise.
2002         * typeck.c: Likewise.
2003         * typeck2.c: Likewise.
2005 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
2007         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
2009 2015-07-06  Jason Merrill  <jason@redhat.com>
2011         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
2012         for a template template parameter.
2013         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
2014         by reduce_template_parm_level.
2016         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
2017         expansion.
2019 2015-07-02  Jason Merrill  <jason@redhat.com>
2021         PR c++/66743
2022         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
2023         TYPE_VALUES_RAW rather than TYPE_FIELDS.
2025 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
2027         * pt.c (type_dependent_expression_p): Handle expressions
2028         that refer to variable templates.
2030 2015-07-01  Jason Merrill  <jason@redhat.com>
2032         * lex.c (init_reswords): s/CXX0X/CXX11/.
2033         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
2035         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
2036         Attribute mangling is now -fabi-version=10.
2038         PR c++/65945
2039         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
2040         * class.c (layout_nonempty_base_or_field): Warn if that affects
2041         the offset of a field.
2043 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
2045         PR c++/60365
2046         * parser.c (cp_parser_check_std_attribute): New.
2047         (cp_parser_std_attribute_list): Call it.
2049 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
2051         PR c++/66686
2052         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
2053         return 0 if tsubst returns a dependent type.
2055 2015-06-30  Jason Merrill  <jason@redhat.com>
2057         PR debug/66653
2058         * decl2.c (is_late_template_attribute): True for tls_model.
2060         PR debug/66653
2061         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
2062         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
2063         (SET_DECL_GNU_TLS_P): New.
2064         * call.c (make_temporary_var_for_ref_to_temp): Use
2065         CP_DECL_THREAD_LOCAL_P.
2066         (set_up_extended_ref_temp): Likewise.
2067         * decl.c (duplicate_decls, expand_static_init): Likewise.
2068         (redeclaration_error_message, grokvardecl): Likewise.
2069         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
2070         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
2071         (handle_tls_init): Likewise.
2072         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2073         * semantics.c (finish_id_expression): Likewise.
2074         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
2075         (finish_omp_threadprivate): Likewise.
2076         * tree.c (decl_storage_duration): Likewise.
2077         * cp-gimplify.c (omp_var_to_track): Likewise.
2078         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
2079         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
2080         already set.
2082 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
2084         Implement N4197 - Adding u8 character literals
2085         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
2086         and CPP_UTF8CHAR_USERDEF tokens;
2087         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
2089 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
2091         PR c++/65977
2092         * decl.c (grokfndecl): Allow constexpr declarations of friend
2093         template specializations.
2095 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2097         PR fortran/66605
2098         * decl.c (finish_function): Call do_warn_unused_parameter.
2100 2015-06-29  Marek Polacek  <polacek@redhat.com>
2102         PR c/66322
2103         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
2104         (push_switch): Set OUTSIDE_RANGE_P.
2105         (pop_switch): Update c_do_switch_warnings call.
2106         (finish_case_label): Update c_add_case_label call.
2107         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
2108         here.
2110 2015-06-27  Marek Polacek  <polacek@redhat.com>
2112         * call.c: Use VECTOR_TYPE_P.
2113         * constexpr.c: Likewise.
2114         * cvt.c: Likewise.
2115         * decl.c: Likewise.
2116         * decl2.c: Likewise.
2117         * init.c: Likewise.
2118         * semantics.c: Likewise.
2119         * tree.c: Likewise.
2120         * typeck.c: Likewise.
2121         * typeck2.c: Likewise.
2123 2015-06-27  Marek Polacek  <polacek@redhat.com>
2125         * call.c (set_up_extended_ref_temp): Use VAR_P.
2126         * class.c: Use VAR_P throughout.
2127         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
2128         * cp-array-notation.c (make_triplet_val_inv): Likewise.
2129         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
2130         throughout.
2131         * decl2.c: Likewise.
2132         * error.c (dump_decl): Use VAR_P.
2133         * mangle.c (decl_implicit_alias_p): Likewise.
2134         * parser.c: Use VAR_P throughout.
2135         * pt.c: Likewise.
2136         * semantics.c: Likewise.
2137         * vtable-class-hierarchy.c: Likewise.
2138         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
2140 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
2142         * pt.c (check_unstripped_args): Mark parameter as unused.
2144 2015-06-26  Jason Merrill  <jason@redhat.com>
2146         PR c++/66216
2147         * class.c (finish_struct): Call fixup_attribute_variants.
2149         PR c++/66684
2150         * typeck2.c (merge_exception_specifiers): Allow different
2151         noexcept-specifiers if we've had errors.
2153         PR c++/66255
2154         * pt.c (check_unstripped_args): Split out from...
2155         (retrieve_specialization): ...here.  Allow typedefs in the type of
2156         a non-type argument.
2158         PR c++/66067
2159         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
2160         TYPE_DECLs.
2161         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
2163         PR c++/66654
2164         * typeck2.c (digest_init_r): Only expect reshaping if the class is
2165         aggregate.
2167 2015-06-26  Marek Polacek  <polacek@redhat.com>
2169         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
2170         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
2172 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
2174         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
2175         * class.c: Likewise.
2176         * cp-ubsan.c: Likewise.
2177         * decl.c: Likewise.
2178         * decl2.c: Likewise.
2179         * lambda.c: Likewise.
2180         * mangle.c: Likewise.
2181         * method.c: Likewise.
2182         * optimize.c: Likewise.
2183         * parser.c: Likewise.
2184         * semantics.c: Likewise.
2185         * tree.c: Likewise.
2186         * vtable-class-hierarchy.c: Likewise.
2188 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2190         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
2191         rather than ggc_hasher.
2192         (constexpr_call_hasher): Likewise.
2193         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
2194         * decl.c (typename_hasher): Likewise.
2195         * mangle.c (conv_type_hasher): Likewise.
2196         * pt.c (spec_hasher): Likewise.
2197         * tree.c (cplus_array_hasher, list_hasher): Likewise.
2198         * typeck2.c (abstract_type_hasher): Likewise.
2200 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
2202         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
2203         rather than pointer_hash.
2204         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
2205         * semantics.c (nrv_data): Likewise.
2206         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
2208 2015-06-24  Jason Merrill  <jason@redhat.com>
2210         PR c++/66647
2211         * pt.c (dependent_type_p_r): Check for dependent alias template
2212         specialization sooner.
2214         PR c++/66501
2215         * class.c (type_has_nontrivial_assignment): Remove.
2216         * cp-tree.h: Remove declaration.
2217         * init.c (vec_copy_assign_is_trivial): New.
2218         (build_vec_init): Use it.
2220 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
2222         Implement N3928 - Extending static_assert
2223         * parser.c (cp_parser_static_assert): Support static_assert with
2224         no message string.  Supply an empty string in this case.
2225         * semantics.c (finish_static_assert): Don't try to print a message if
2226         the message strnig is empty.
2228 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
2230         PR c++/65750
2231         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
2232         implicit template parm if 'auto' is a placeholder for trailing
2233         return type.
2235 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
2237         Revert:
2238         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
2240         PR c++/30044
2241         * parser.c (cp_parser_template_parameter_list): Update
2242         current_template_parms right after processing a paramater.
2243         * pt.c (template_parms_to_args): Remove obsolete hack for
2244         giving template template arguments the proper level.
2245         (check_default_tmpl_args): Account for tested template
2246         parameter_lists.
2247         (splite_late_return_type): Remove obsolete hack for giving
2248         template template arguments the proper level.
2250 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
2252         PR c++/65811
2253         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2255 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
2257         PR c++/30044
2258         * parser.c (cp_parser_template_parameter_list): Update
2259         current_template_parms right after processing a paramater.
2260         * pt.c (template_parms_to_args): Remove obsolete hack for
2261         giving template template arguments the proper level.
2262         (check_default_tmpl_args): Account for tested template
2263         parameter_lists.
2264         (splite_late_return_type): Remove obsolete hack for giving
2265         template template arguments the proper level.
2267 2015-06-23  Jason Merrill  <jason@redhat.com>
2269         PR c++/65879
2270         * decl.c (grokfndecl): Check the linkage of ctype, not just
2271         TYPE_ANONYMOUS_P.
2272         * tree.c (no_linkage_check): Skip the 'this' pointer.
2274         PR c++/66501
2275         * class.c (type_has_nontrivial_assignment): New.
2276         * init.c (build_vec_init): Use it.
2277         * cp-tree.h: Declare it.
2278         * method.c (trivial_fn_p): Templates aren't trivial.
2280         PR c++/66542
2281         * decl.c (expand_static_init): Make sure the destructor is callable
2282         here even if we have an initializer.
2284 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
2286         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
2287         -fdump-ada-spec is passed.
2289 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
2291         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
2293 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
2295         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
2297 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
2299         * decl.c (grokdeclarator): Remove pointless code.
2301 2015-06-22  Jason Merrill  <jason@redhat.com>
2303         PR c++/66515
2304         * call.c (implicit_conversion): Only reshape for classes.
2306 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
2308         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
2309         manually swapping.
2310         * semantics.c (finish_omp_atomic): Likewise.
2311         * typeck.c (cp_build_array_ref): Likewise.
2313 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
2315         PR c++/65882
2316         * call.c (build_new_op_1): Check tf_warning flag in all cases.
2318 2015-06-19  Jason Merrill  <jason@redhat.com>
2320         PR c++/66585
2321         * pt.c (instantiate_class_template_1): Clear
2322         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
2324         PR c++/65880
2325         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
2326         cv-qualifiers.
2327         * typeck.c (merge_types): build_ptrmemfunc_type before applying
2328         quals and attributes.
2330         PR c++/65973
2331         * constexpr.c (build_constexpr_constructor_member_initializers):
2332         Handle an empty STATEMENT_LIST.
2334         PR c++/65843
2335         * pt.c (tsubst_copy_and_build): Register a capture proxy in
2336         local_specializations.
2338 2015-06-17  Jason Merrill  <jason@redhat.com>
2340         PR c++/66001
2341         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
2342         TRY_FINALLY_EXPR.
2343         (potential_constant_expression_1): Likewise.
2345 2015-06-17  Jason Merrill  <jason@redhat.com>
2347         PR c++/66515
2348         * call.c (implicit_conversion): Call reshape_init here, early.
2349         (build_aggr_conv): Not here.
2351 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
2353         PR c++/66571
2354         * pt.c (tsubst_omp_clause_decl): New function.
2355         (tsubst_omp_clauses): Use it or tsubst_copy instead of
2356         tsubst_expr on OMP_CLAUSE_DECL.
2358 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2360         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
2361         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
2362         * decl.c (grokdeclarator, xref_tag_1): Likewise.
2363         * error.c (dump_aggr_type): likewise.
2364         * pt.c (push_template_decl_real): Likewise.
2365         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
2367 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
2369         * call.c: Do not include input.h, line-map.h or is-a.h.
2370         * class.c: Likewise.
2371         * constexpr.c: Likewise.
2372         * cp-array-notation.c: Likewise.
2373         * cp-gimplify.c: Likewise.
2374         * cp-lang.c: Likewise.
2375         * cp-objcp-common.c: Likewise.
2376         * cp-tree.h: Likewise.
2377         * cp-ubsan.c: Likewise.
2378         * cvt.c: Likewise.
2379         * decl.c: Likewise.
2380         * decl2.c: Likewise.
2381         * dump.c: Likewise.
2382         * error.c: Likewise.
2383         * except.c: Likewise.
2384         * expr.c: Likewise.
2385         * friend.c: Likewise.
2386         * init.c: Likewise.
2387         * lambda.c: Likewise.
2388         * lex.c: Likewise.
2389         * mangle.c: Likewise.
2390         * method.c: Likewise.
2391         * name-lookup.c: Likewise.
2392         * optimize.c: Likewise.
2393         * parser.c: Likewise.
2394         * pt.c: Likewise.
2395         * ptree.c: Likewise.
2396         * repo.c: Likewise.
2397         * rtti.c: Likewise.
2398         * search.c: Likewise.
2399         * semantics.c: Likewise.
2400         * tree.c: Likewise.
2401         * typeck.c: Likewise.
2402         * typeck2.c: Likewise.
2403         * vtable-class-hierarchy.c: Likewise.
2405 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
2407         PR c++/59682
2408         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
2410 2015-06-16  Jason Merrill  <jason@redhat.com>
2412         PR c++/66536
2413         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
2414         mismatch.
2416         PR c++/58063
2417         * tree.c (bot_manip): Remap SAVE_EXPR.
2419         PR c++/66387
2420         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
2422 2015-06-15  Nathan Sidwell  <nathan@acm.org>
2424         PR c++/58583
2425         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
2426         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
2427         protect it from recursive instantiation.
2429 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
2431         PR c++/51048
2432         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
2433         using a local type is pure virtual.
2435 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
2437         * call.c: Remove comment documenting the long-deleted
2438         function build_method_call.
2440 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
2442         PR c++/65168
2443         * typeck.c (cp_build_binary_op): Warn when comparing an address
2444         of a reference against NULL.
2446 2015-06-12  Jason Merrill  <jason@redhat.com>
2448         PR c++/65719
2449         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
2450         variables as DECL_NOT_REALLY_EXTERN.
2452 2015-06-11  Jason Merrill  <jason@redhat.com>
2454         PR c++/66445
2455         * constexpr.c (potential_constant_expression_1): Handle a
2456         DECL_EXPR of TYPE_DECL.
2458         PR c++/66450
2459         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
2460         ctx->ctor.
2462 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
2464         * decl.c (cxx_init_decl_processing): Register the main
2465         translation unit through the new debug hook.
2467 2015-06-10  Jason Merrill  <jason@redhat.com>
2469         PR c++/66289
2470         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
2471         * pt.c (push_template_decl_real): Set it.
2472         (dependent_alias_template_spec_p): Use it.
2473         (dependent_type_p_r): Use dependent_alias_template_spec_p.
2474         (uses_all_template_parms_data, uses_all_template_parms_r)
2475         (complex_alias_template_p): New.
2476         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
2478 2015-06-09  Jason Merrill  <jason@redhat.com>
2480         DR 1467
2481         PR c++/51747
2482         * typeck2.c (digest_init_r): Replace previous change with
2483         gcc_unreachable.
2485         PR c++/66387
2486         * semantics.c (process_outer_var_ref): Make sure the value is
2487         actually constant before returning it.
2488         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
2489         array.
2491 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
2493         PR c++/65815
2494         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
2495         * init.c (expand_default_init): Likewise.
2497 2015-06-09  Jason Merrill  <jason@redhat.com>
2499         PR c++/66383
2500         * tree.c (replace_placeholders_r): Handle placeholders for an
2501         outer object.
2502         * typeck2.c (store_init_value): Only replace_placeholders for
2503         objects of class type.
2505 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
2507         * call.c : Adjust include files.
2508         * class.c : Likewise.
2509         * constexpr.c : Likewise.
2510         * cp-array-notation.c : Likewise.
2511         * cp-cilkplus.c : Likewise.
2512         * cp-gimplify.c : Likewise.
2513         * cp-lang.c : Likewise.
2514         * cp-objcp-common.c : Likewise.
2515         * cp-tree.h : Likewise.
2516         * cp-ubsan.c : Likewise.
2517         * cvt.c : Likewise.
2518         * decl.c : Likewise.
2519         * decl2.c : Likewise.
2520         * dump.c : Likewise.
2521         * error.c : Likewise.
2522         * except.c : Likewise.
2523         * expr.c : Likewise.
2524         * friend.c : Likewise.
2525         * init.c : Likewise.
2526         * lambda.c : Likewise.
2527         * lex.c : Likewise.
2528         * mangle.c : Likewise.
2529         * method.c : Likewise.
2530         * name-lookup.c : Likewise.
2531         * optimize.c : Likewise.
2532         * parser.c : Likewise.
2533         * pt.c : Likewise.
2534         * ptree.c : Likewise.
2535         * repo.c : Likewise.
2536         * rtti.c : Likewise.
2537         * search.c : Likewise.
2538         * semantics.c : Likewise.
2539         * tree.c : Likewise.
2540         * typeck.c : Likewise.
2541         * typeck2.c : Likewise.
2542         * vtable-class-hierarchy.c : Likewise.
2544 2015-06-05  Jason Merrill  <jason@redhat.com>
2546         PR c++/66405
2547         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
2548         the expansion has extra args.
2549         (use_pack_expansion_extra_args_p): Return true in that case.
2551         PR c++/66405
2552         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
2553         dependent even if it has a type.
2555 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
2557         * cp-objcp-common.c: Adjust comment for
2558         cxx_warn_unused_global_decl.
2559         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
2560         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
2561         * cp-tree.h (note_mangling_alias): Protoize.
2562         (cp_write_global_declarations): Remove.
2563         (cxx_post_compilation_parsing_cleanups): Protoize.
2564         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
2565         argument.
2566         * decl2.c (mangling_aliases): New global.
2567         (build_java_method_aliases): New.  Adapted from
2568         collect_candidates_for_java_method_aliases.
2569         (collect_candidates_for_java_method_aliases): Remove.
2570         (build_java_method_aliases): Remove.
2571         (generate_mangling_aliases): New.
2572         (note_mangling_alias): New.  Moved from mangle_decl.
2573         (locus_at_end_of_parsing): New global.
2574         (c_parse_final_cleanups): Rename from
2575         cp_write_global_declarations.
2576         Use locus_at_end_of_parsing.
2577         Call generate_mangling_aliases.
2578         Rename call to collect_candidates_for_java_method_aliases into
2579         build_java_method_aliases.
2580         Remove call to finalize_compilation_unit.
2581         Move vtable handling into cxx_post_compilation_parsing_cleanups.
2582         Do not call check_global_declarations or
2583         emit_debug_global_declarations.
2584         (cxx_post_compilation_parsing_cleanups): New.
2585         * mangle.c (mangle_decl): Move code to note_mangling_alias.
2586         * name-lookup.c (do_namespace_alias): Call early_global_decl.
2588 2015-06-05  Nathan Sidwell  <nathan@acm.org>
2590         PR c++/52595
2591         * parser.c (cp_parser_cache_defarg): Continue looking for
2592         declarators when scanning a potential template argument list of an
2593         NSDMI.
2595 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
2597         * call.c: Adjust includes for restructured coretypes.h.
2598         * class.c: Likewise.
2599         * constexpr.c: Likewise.
2600         * cp-array-notation.c: Likewise.
2601         * cp-gimplify.c: Likewise.
2602         * cp-lang.c: Likewise.
2603         * cp-objcp-common.c: Likewise.
2604         * cp-tree.h: Likewise.
2605         * cp-ubsan.c: Likewise.
2606         * cvt.c: Likewise.
2607         * decl.c: Likewise.
2608         * decl2.c: Likewise.
2609         * dump.c: Likewise.
2610         * error.c: Likewise.
2611         * except.c: Likewise.
2612         * expr.c: Likewise.
2613         * friend.c: Likewise.
2614         * init.c: Likewise.
2615         * lambda.c: Likewise.
2616         * lex.c: Likewise.
2617         * mangle.c: Likewise.
2618         * method.c: Likewise.
2619         * name-lookup.c: Likewise.
2620         * optimize.c: Likewise.
2621         * parser.c: Likewise.
2622         * pt.c: Likewise.
2623         * ptree.c: Likewise.
2624         * repo.c: Likewise.
2625         * rtti.c: Likewise.
2626         * search.c: Likewise.
2627         * semantics.c: Likewise.
2628         * tree.c: Likewise.
2629         * typeck.c: Likewise.
2630         * typeck2.c: Likewise.
2631         * vtable-class-hierarchy.c: Likewise.
2633 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2635         PR c++/66192
2636         PR target/66200
2637         * cp-tree.h (get_guard_cond): Adjust declaration
2638         * decl.c (expand_static_init): Use atomic load acquire
2639         and adjust call to get_guard_cond.
2640         * decl2.c (build_atomic_load_byte): New function.
2641         (get_guard_cond): Handle thread_safety.
2642         (one_static_initialization_or_destruction): Adjust call to
2643         get_guard_cond.
2645 2015-06-03  Jason Merrill  <jason@redhat.com>
2647         PR c++/44282
2648         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
2649         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
2650         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
2651         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
2653 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2654             Paolo Carlini  <paolo.carlini@oracle.com>
2656         PR c++/66130
2657         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
2658         use it in the diagnostic.
2659         (decay_conversion): Adjust call.
2660         * semantics.c (finish_decltype_type): Likewise.
2661         * call.c (resolve_args, build_new_op_1,
2662         perform_implicit_conversion_flags): Adjust calls.
2663         * cvt.c (ocp_convert, convert_to_void): Likewise.
2664         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
2666 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
2668         * decl.c (check_tag_decl): Use declspecs->locations as locations in
2669         error_at and warning_at calls.
2671 2015-06-03  Marek Polacek  <polacek@redhat.com>
2673         PR sanitizer/66190
2674         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
2675         (cp_genericize_r): Don't instrument static initializers.
2676         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
2678 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
2680         * decl.c (start_function): Call plugin before parsing.
2681         (finish_function): Call plugin after parsing.
2683 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
2685         * cp-tree.h (init_error): Remove declaration.
2686         * error.c (scratch_pretty_printer): Rename to ...
2687         (actual_pretty_printer): ... this.
2688         (cxx_pp): Constify and update accordingly.
2689         (init_error): Remove definition.
2690         * lex.c (cxx_init): Do not call init_error.
2692 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
2694         PR c++/61683
2695         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
2697 2015-06-01  Jason Merrill  <jason@redhat.com>
2699         PR c++/65942
2700         * decl2.c (mark_used): Don't always instantiate constexpr fns.
2701         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
2703         PR c++/44282
2704         * mangle.c (attr_strcmp): New.
2705         (write_CV_qualifiers_for_type): Also write out attributes that
2706         affect type identity.
2707         (write_type): Strip all attributes after writing qualifiers.
2709 2015-05-31  Jason Merrill  <jason@redhat.com>
2711         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
2713         PR c++/66320
2714         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
2715         with the wrong type as non-constant.
2717 2015-05-27  Jason Merrill  <jason@redhat.com>
2719         * decl.c (check_redeclaration_exception_specification): Depend on
2720         -Wsystem-headers rather than -pedantic.
2722         * decl.c (warn_extern_redeclared_static): Use the location of
2723         newdecl in diagnostics, not input_location.
2724         (validate_constexpr_redeclaration): Likewise.
2725         (check_redeclaration_no_default_args): Likewise.
2726         (duplicate_decls): Likewise.
2727         (check_redeclaration_exception_specification): Likewise.
2728         Change second diagnostic to inform.
2730 2015-05-24  Nathan Sidwell  <nathan@acm.org>
2732         PR c++/66243
2733         * decl.c (build_enumerator): Don't silently convert scoped enums.
2735 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
2737         PR lto/66180
2738         * mangle.c (mangle_decl): Mangle anonymous namespace types as
2739         "<anon>".
2741 2015-05-23  Nathan Sidwell  <nathan@acm.org>
2743         PR c++/65936
2744         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
2746 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
2748         * Make-lang.in (check_g++_parallelize): Update comment.
2750 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
2752         PR c++/65598
2753         * decl.c (grokdeclarator): Use the correct location in error
2754         messages about 'explicit'.
2756 2015-05-22  Marek Polacek  <polacek@redhat.com>
2757             Edward Smith-Rowland  <3dw4rd@verizon.net>
2759         PR c/47043
2760         * cp-tree.h (build_enumerator): Update declaration.
2761         * decl.c (build_enumerator): Add attributes parameter.  Call
2762         cplus_decl_attributes.
2763         * init.c (constant_value_1): Pass tf_none to mark_used.
2764         * parser.c (cp_parser_enumerator_definition): Parse attributes and
2765         pass them down to build_enumerator.
2766         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
2767         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
2769 2015-05-21  Nathan Sidwell  <nathan@acm.org>
2771         PR c++/60943
2772         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
2774 2015-05-21  Marek Polacek  <polacek@redhat.com>
2776         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
2778 2015-05-20  Jason Merrill  <jason@redhat.com>
2780         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
2781         before register_specialization.
2783         * decl.c (grok_op_properties): Don't complain about size_t
2784         placement delete here.
2785         * call.c (second_parm_is_size_t): Split out from...
2786         (non_placement_deallocation_fn_p): ...here.
2787         (build_op_delete_call): Warn about size_t placement delete with
2788         -Wc++14-compat.
2790 2015-05-19  Nathan Sidwell  <nathan@acm.org>
2792         PR c++/65954
2793         * typeck.c (finish_class_member_access_expr): Diagnose failed
2794         lookup of enum class member.
2796 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
2798         PR middle-end/66199
2799         * parser.c (cp_parser_omp_for_loop): Don't add
2800         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2801         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2802         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2803         constructs.
2805 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
2807         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
2808         swaps.
2810 2015-05-18  Jason Merrill  <jason@redhat.com>
2812         * pt.c (retrieve_specialization): Make sure our arguments have
2813         gone through strip_typedefs.
2815         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
2816         (determine_specialization): Call coerce_template_parms.
2818         DR 1391
2819         * pt.c (type_unification_real): Check convertibility here.
2820         (unify_one_argument): Not here.
2822         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
2823         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
2824         [TREE_LIST]: Fix no-change case.
2826         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
2828 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2830         PR fortran/44054
2831         * error.c (cp_diagnostic_starter): Use diagnostic_location
2832         function.
2833         (cp_print_error_function): Likewise.
2834         (cp_printer): Replace locus pointer with accessor function.
2836 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
2838         * parser.c (cp_parser_selection_statement): Add location and
2839         guard_kind arguments to calls to
2840         cp_parser_implicitly_scoped_statement.
2841         (cp_parser_iteration_statement): Likewise for calls to
2842         cp_parser_already_scoped_statement.
2843         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
2844         "guard_kind" params; use them to warn for misleading
2845         indentation.
2846         (cp_parser_already_scoped_statement): Likewise.
2848 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
2850         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
2851         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
2852         * semantics.c (finish_member_declaration): Likewise.
2853         * method.c (lazily_declare_fn): Allways add method to main variant list.
2855 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
2857         PR bootstrap/66085
2858         * decl2.c (note_mangling_alias): Declare arguments as unused.
2860 2015-05-08  Jason Merrill  <jason@redhat.com>
2862         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
2863         -Wc++0x-compat.
2865 2015-05-08  Jason Merrill  <jason@redhat.com>
2867         * decl2.c (mangling_aliases): New variable.
2868         (note_mangling_alias, generate_mangling_aliases): New.
2869         (cp_write_global_declarations): Call generate_mangling_aliases.
2870         (generate_mangling_alias): Split out from...
2871         * mangle.c (mangle_decl): ...here.
2872         * cp-tree.h: Declare note_mangling_alias.
2874 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
2876         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
2877         (build_java_method_aliases): Adapt to use create_same_body_alias
2878         instead of assemble_alias.  Move variable declarations to
2879         definition and tidy up.
2880         (cp_write_global_declarations): Call build_java_method_aliases
2881         instead of collecting candidates first.
2883 2015-05-07  Jason Merrill  <jason@redhat.com>
2885         PR c++/59012
2886         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
2887         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
2888         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
2889         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
2890         (apply_late_template_attributes): Handle attribute pack expansion.
2892 2015-05-07  Marek Polacek  <polacek@redhat.com>
2894         PR c/65179
2895         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2896         value.
2898 2015-05-07  Jason Merrill  <jason@redhat.com>
2900         DR 1467
2901         PR c++/51747
2902         * typeck2.c (digest_init_r): Fix single element list.
2904 2015-05-05  Jason Merrill  <jason@redhat.com>
2906         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2907         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2908         MUST_NOT_THROW_EXPR.
2909         (cp_genericize_data): Add try_block field.
2910         (cp_genericize_tree): Initialize it.
2911         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2912         implicit rethrow.
2914         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2915         Return false.
2917         * semantics.c (finish_call_expr): Check complain.
2919         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2920         maybe-in-charge constructor.
2922         * decl.c (start_decl): Don't push the plain VAR_DECL for a
2923         variable template.
2925         DR 1518
2926         DR 1630
2927         PR c++/54835
2928         PR c++/60417
2929         * call.c (convert_like_real): Check value-initialization before
2930         explicit.
2931         * typeck2.c (process_init_constructor_record): Don't set
2932         CONSTRUCTOR_IS_DIRECT_INIT.
2933         (process_init_constructor_array): Likewise.
2934         * init.c (build_vec_init): Likewise.
2936 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
2938         * parser.c (cp_parser_asm_definition): Only test for
2939         error_mark_node if "outputs" was just set.  Likewise for "inputs".
2941 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
2942             Jakub Jelinek  <jakub@redhat.com>
2944         PR c++/66007
2945         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2946         result in an actual error.
2948 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2949             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
2951         PR c++/65858
2952         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2953         false.
2955 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
2957         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2958         trailing semicolon.
2960 2015-04-29  Jason Merrill  <jason@redhat.com>
2962         PR c++/50800
2963         * tree.c (apply_identity_attributes): Fix handling of classes.
2965 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2967         * parser.c (cp_parser_oacc_enter_exit_data): Use
2968         OMP_STANDALONE_CLAUSES.
2970 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
2972         PR c++/64667
2973         * init.c (perform_member_init): Handle references for -Winit-self.
2975 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2977         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2978         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2980 2015-04-28  Jason Merrill  <jason@redhat.com>
2982         PR c++/65896
2983         * constexpr.c (cxx_eval_store_expression): Don't try to actually
2984         store an empty class.
2986         PR c++/65656
2987         * constexpr.c (cxx_eval_builtin_function_call): Fix
2988         __builtin_constant_p.
2990         PR c++/50800
2991         * tree.c (strip_typedefs): Add remove_attributes parm.
2992         (strip_typedefs_expr): Likewise.
2993         (apply_identity_attributes): New subroutine of strip_typedefs.
2994         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2995         (convert_nontype_argument, unify): Likewise.
2996         * cp-tree.h: Adjust.
2998         PR c++/65734
2999         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
3001 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
3003         * class.c (layout_class_type): Remove check if
3004         PCC_BITFIELD_TYPE_MATTERS is defined.
3006 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
3008         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
3010 2015-04-24  Jason Merrill  <jason@redhat.com>
3012         PR c++/50800
3013         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
3015         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
3016         Remove obsolete code.
3017         [NE_EXPR]: Likewise.
3019 2015-04-23  Jason Merrill  <jason@redhat.com>
3021         PR c++/65646
3022         * pt.c (check_explicit_specialization): Don't
3023         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
3024         headers.
3025         * decl.c (grokvardecl): Revert earlier fix.
3027 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
3029         PR c++/65801
3030         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
3031         suppresses the diagnostic.
3033 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
3035         Reject trailing return type for an operator auto().
3036         * decl.c (grokdeclarator): Reject trailing return types for
3037         all conversion operators, don't handle conversion operators
3038         in the previous checks that deal with auto.
3040 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
3042         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
3044 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3046         * class.c (resolve_address_of_overloaded_function, instantiate_type):
3047         Rename tsubst_flags_t parameter flags -> complain.
3049 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3051         * call.c (build_op_delete_call, build_over_call): Check mark_used
3052         return value.
3053         * class.c (resolve_address_of_overloaded_function): Likewise.
3054         * decl.c (cxx_maybe_build_cleanup): Likewise.
3055         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
3056         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
3057         * rtti.c (build_dynamic_cast_1): Likewise.
3058         * semantics.c (process_outer_var_ref): Likewise.
3059         * typeck.c (build_class_member_access_expr,
3060         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
3062 2015-04-15  Jason Merrill  <jason@redhat.com>
3064         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
3065         (build_constexpr_constructor_member_initializers): Loop to find
3066         the BIND_EXPR.
3067         * decl.c (start_preparsed_function): Clobber the object at the
3068         beginning of a constructor.
3070         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
3071         * method.c (implicitly_declare_fn): Likewise.
3072         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
3074         * decl2.c (determine_visibility): Use get_template_info.
3076 2015-04-15  Jason Merrill  <jason@redhat.com>
3077             Marek Polacek  <polacek@redhat.com>
3079         PR c++/65727
3080         * lambda.c (lambda_expr_this_capture): In unevaluated context go
3081         through the normal loop, just don't capture.
3082         (maybe_resolve_dummy): Handle null return.
3084 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
3086         * call.c (enforce_access): Emit error + inform.
3088 2015-04-15  Marek Polacek  <polacek@redhat.com>
3090         * constexpr.c (use_new_call): Remove #define.
3091         (lookup_parameter_binding): Remove function.
3092         (cxx_bind_parameters_in_call): Remove unused code.
3093         (cxx_eval_call_expression): Likewise.
3094         (cxx_eval_constant_expression): Likewise.
3096 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
3098         * tree.c (replace_placeholders_t): Remove unused type.
3099         (replace_placeholders): Remove unused pset.
3101 2015-04-14  Jason Merrill  <jason@redhat.com>
3103         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
3105         PR c++/65695
3106         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
3108         PR c++/65721
3109         * name-lookup.c (do_class_using_decl): Complain about specifying
3110         the current class even if there are dependent bases.
3112 2015-04-14  David Krauss  <david_work@me.com>
3114         PR c++/59766
3115         * decl.c (grokdeclarator): Do not flag friends with deduced return.
3117 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
3118             Jason Merrill  <jason@redhat.com>
3120         PR c++/60994
3121         * parser.c (cp_parser_class_name): Add enum_ok parameter.
3122         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
3123         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
3124         a class template.
3126 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
3128         PR c++/65736
3129         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
3130         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
3131         the expression to the original type at the end.
3133 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
3135         PR c++/65690
3136         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
3137         TYPE_USER_ALIGN.
3139         PR c++/65690
3140         * tree.c (build_cplus_array_type): Layout type before variants are
3141         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
3142         variant.
3144 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
3146         PR c++/64085
3147         * lambda.c (add_capture): Use dependent_type_p for capture by
3148         reference too.
3150 2015-04-02  Marek Polacek  <polacek@redhat.com>
3152         PR c++/65642
3153         * constexpr.c (cxx_eval_pointer_plus_expression): Call
3154         cxx_eval_constant_expression on the first operand.
3156 2015-04-01  Jason Merrill  <jason@redhat.com>
3158         PR c++/65625
3159         * decl.c (make_typename_type): Handle seeing a variable template.
3161 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
3163         PR c++/56100
3164         * pt.c (instantiating_current_function_p): New.
3165         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
3166         * cp-tree.h (instantiating_current_function_p): Declare.
3168 2015-04-01  Jason Merrill  <jason@redhat.com>
3170         PR c++/65646
3171         * decl.c (grokvardecl): Don't call check_explicit_specialization
3172         for non-template members of a class template.
3174 2015-04-01  Marek Polacek  <polacek@redhat.com>
3176         PR c++/65554
3177         * class.c (finish_struct): Require that the second field of a
3178         user-defined initializer_list be of size type.
3180 2015-03-31  Marek Polacek  <polacek@redhat.com>
3182         PR c++/65390
3183         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
3184         checking for constness.
3186 2015-03-30  Marek Polacek  <polacek@redhat.com>
3188         PR c++/65398
3189         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
3190          *(&A[i] p+ j) => A[i + j] transformation here.
3191         (cxx_eval_pointer_plus_expression): New function.
3192         (cxx_eval_constant_expression): Use it here.
3194 2015-03-27  Tobias Burnus  <burnus@net-b.de>
3196         PR c/65586
3197         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
3198         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
3199         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
3200         -fopenmp-simd.
3202 2015-03-27  Marek Polacek  <polacek@redhat.com>
3204         PR c++/65556
3205         * semantics.c (finish_switch_cond): If the unlowered type is not an
3206         enum, use the type of the condition.
3208 2015-03-27  Jason Merrill  <jason@redhat.com>
3210         PR c++/65509
3211         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
3212         constants.
3214 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
3216         PR c++/65154
3217         * init.c (build_vec_init): Fix initializing aggregates
3218         with empty init list.
3220 2015-03-26  Jason Merrill  <jason@redhat.com>
3222         PR c++/65525
3223         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
3225 2015-03-25  Marek Polacek  <polacek@redhat.com>
3227         PR c++/65558
3228         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
3229         on an anonymous namespace.
3231 2015-03-25  Marek Polacek  <polacek@redhat.com>
3233         PR c++/61670
3234         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
3236 2015-03-24  Jason Merrill  <jason@redhat.com>
3238         PR c++/65046
3239         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
3240         * parser.c (cp_parser_namespace_definition): Don't set it.
3241         * name-lookup.c (handle_namespace_attrs): Check
3242         DECL_NAMESPACE_ASSOCIATIONS instead.
3244         PR c++/65498
3245         * pt.c (get_mostly_instantiated_function_type): Just return the
3246         type of the partially instantiated template in DECL_TI_TEMPLATE.
3248 2015-03-20  Marek Polacek  <polacek@redhat.com>
3250         PR c++/65398
3251         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
3252         A[i + j].
3254 2015-03-20  Marek Polacek  <polacek@redhat.com>
3256         PR c++/65072
3257         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
3258         variant.
3260 2015-03-19  Jason Merrill  <jason@redhat.com>
3262         PR c++/65046
3263         Automatically propagate ABI tags to variables and functions
3264         from their (return) type.
3265         * class.c (check_tag): Handle variables and functions.
3266         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
3267         (mark_or_check_tags): Likewise.
3268         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
3269         (check_abi_tags): Add single argument overload for decls.
3270         Handle inheriting tags for decls.
3271         * mangle.c (write_mangled_name): Call it.
3272         (mangle_return_type_p): Split out from write_encoding.
3273         (unmangled_name_p): Split out from write_mangled_name.
3274         (write_mangled_name): Ignore abi_tag on namespace.
3275         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
3276         * parser.c (cp_parser_namespace_definition): Set it.
3277         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
3278         about abi_tag attribute on non-inline namespace.
3279         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
3280         (handle_abi_tag_attribute): Allow tags on variables.
3282 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
3284         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
3285         attribute for DECL_EXTERNAL VAR_DECLs.
3287 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
3289         PR c++/65340
3290         * call.c (build_over_call): Pass the tsubst_flags_t argument to
3291         mark_used.
3292         * decl2.c (mark_used): Inline the require_deduced_type call and
3293         guard the error call.
3295 2015-03-16  Jason Merrill  <jason@redhat.com>
3297         PR c++/65061
3298         * parser.c (cp_parser_template_name): Call strip_using_decl.
3300 2015-03-16  Marek Polacek  <polacek@redhat.com>
3302         DR 1688
3303         PR c++/65327
3304         * decl.c (grokdeclarator): Allow volatile and constexpr together.
3306 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
3308         PR c++/65323
3309         * decl.c (check_default_argument): Don't call
3310         maybe_warn_zero_as_null_pointer_constant.
3312 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
3314         * cp-gimplify.c (simple_empty_class_p): New.
3315         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
3316         the code for empty class copies into simple_empty_class_p, and
3317         adapt it to handle COMPOUND_EXPRs.
3319 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
3321         PR c++/65370
3322         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
3323         only if the location of newdecl doesn't match the location of olddecl.
3325 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3327         PR c++/65127
3328         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
3329         is not a PARM_DECL.
3331 2015-03-10  Jason Merrill  <jason@redhat.com>
3333         PR c++/65333
3334         DR 1558
3335         * pt.c (dependent_type_p_r): Check both class and alias template args.
3337 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
3339         PR c/65120
3340         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
3341         before preparing arguments to warn_logical_not_parentheses.
3342         Use maybe_constant_value on rhs.
3344 2015-03-09  Jason Merrill  <jason@redhat.com>
3346         PR c++/65339
3347         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
3349 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
3351         PR c/65120
3352         * parser.c (cp_parser_binary_expression): Don't warn for
3353         !!x == y or !b == y where b is bool.
3355 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
3357         * ptree.c (cxx_print_lambda_node): New.
3358         (cxx_print_xnode): Handle LAMBDA_EXPR.
3360 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
3362         PR c++/65295
3363         * constexpr.c (cxx_eval_constant_expression): Remove assert in
3364         RESULT_DECL handling.
3366 2015-02-26  Marek Polacek  <polacek@redhat.com>
3368         PR c++/65202
3369         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
3370         a RETURN_EXPR if its operand is null.
3372 2015-02-25  Jason Merrill  <jason@redhat.com>
3374         PR c++/65209
3375         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
3376         DECL_COMDAT.
3377         (constrain_visibility_for_template): Handle reference arguments.
3379         PR debug/58315
3380         * decl.c (start_preparsed_function): Use create_artificial_label
3381         for cdtor_label.
3383 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
3384             Jakub Jelinek  <jakub@redhat.com>
3386         PR c++/65075
3387         * constexpr.c (check_constexpr_bind_expr_vars): Allow
3388         implicit typedefs for lambda types.
3390 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
3392         PR c++/60894
3393         * decl.c (lookup_and_check_tag): Use strip_using_decl.
3395 2015-02-13  Jason Merrill  <jason@redhat.com>
3397         PR c++/65054
3398         * pt.c (template_args_equal): Look through conversions here.
3399         * tree.c (cp_tree_equal): Not here.
3401 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
3403         PR c++/60211
3404         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
3405         pragma_external context.
3407 2015-02-13  Jason Merrill  <jason@redhat.com>
3409         PR c++/65051
3410         * call.c (reference_binding): Don't look for bad conversion
3411         if TO is incomplete.
3413 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
3415         PR c++/64970
3416         * decl.c (make_typename_type): Pass tsubst_flags_t argument
3417         to lookup_template_class.
3419 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
3421         PR ipa/65034
3422         * decl.c (start_preparsed_function): Use void_type_node instead
3423         of NULL_TREE as LABEL_DECL type.
3425 2015-02-12  Jason Merrill  <jason@redhat.com>
3427         PR c++/64898
3428         * mangle.c (write_mangled_name): Fix test for variable template
3429         instantiation.
3431         * decl.c (begin_destructor_body): Condition clobber on
3432         -flifetime-dse.
3434 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
3436         PR c++/64959
3437         * parser.c (lookup_literal_operator): Return all candidates.
3438         (cp_parser_userdef_char_literal): Simplify error handling.
3439         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
3440         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
3441         Also give higher priority to standard string UDL operator.
3443 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
3445         PR debug/55541
3446         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
3447         * decl.c (poplevel): If functionbody, try not to create an extra
3448         BLOCK for function body and use subblocks as that, if it is non-NULL
3449         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
3450         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
3452         PR sanitizer/64984
3453         * except.c (check_noexcept_r): Return NULL for internal
3454         calls.
3456 2015-02-10  Jason Merrill  <jason@redhat.com>
3458         PR c++/64994
3459         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
3461 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
3463         PR ipa/64982
3464         * method.c (use_thunk): Do not check for stdarg thunks.
3466 2015-02-06  Jason Merrill  <jason@redhat.com>
3468         PR c++/64899
3469         * init.c (build_vec_init): Handle default-initialized array with
3470         constexpr default constructor.
3472 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
3474         PR c/64824
3475         PR c/64868
3476         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
3478 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
3480         PR c++/64877
3481         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
3482         for generated expressions.
3484 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
3486         PR c++/64901
3487         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
3488         DECL_OVERRIDE_P.
3490 2015-02-02  Jason Merrill  <jason@redhat.com>
3492         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
3494 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
3496         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
3497         changed to pass input_location as first argument.
3499 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
3501         PR c++/64717
3502         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
3503         into SAVE_EXPR.
3505 2015-01-29  Jason Merrill  <jason@redhat.com>
3507         PR c++/49508
3508         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
3509         erroneous return statement.
3511         PR c++/64521
3512         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
3513         point.
3515 2015-01-27  Caroline Tice  <cmtice@google.com>
3517         Committing VTV Cywin/Ming patch for Patrick Wollgast
3518         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
3519         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
3521 2015-01-27  Jason Merrill  <jason@redhat.com>
3523         PR c++/58597
3524         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
3525         current_function_decl.
3527         PR c++/63889
3528         * pt.c (finish_template_variable): Move from semantics.c.
3529         Handle multiple template arg levels.  Handle coercion here.
3530         (lookup_template_variable): Not here.
3532 2015-01-23  Jason Merrill  <jason@redhat.com>
3534         PR c++/64314
3535         PR c++/57510
3536         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
3537         that has been completely split out.
3539         PR c++/64701
3540         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
3541         statement codes.
3543         PR c++/64727
3544         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
3545         of CONST_DECL.
3547 2015-01-21  Jason Merrill  <jason@redhat.com>
3549         PR c++/64603
3550         * constexpr.c (cxx_eval_constant_expression): Only shortcut
3551         constant CONSTRUCTORs.
3553         PR c++/64647
3554         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
3555         give a hard error in a template instantiation.
3557 2015-01-21  Richard Biener  <rguenther@suse.de>
3559         PR middle-end/64313
3560         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
3561         for builtins the user declared correctly.
3563 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
3565         PR c++/58614
3566         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
3567         TREE_TYPE (elt) == error_mark_node.
3569 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
3571         PR tree-optimization/62053
3572         * tree.c (build_cplus_array_type): Layout type after variants are set.
3574 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
3576         * cp-gimplify.c (cp_genericize_r): Call
3577         cp_ubsan_maybe_instrument_member_call for member calls.
3578         (cp_ubsan_check_member_access_r): New function.
3579         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
3580         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
3581         cp_ubsan_instrument_member_accesses,
3582         cp_ubsan_maybe_instrument_downcast,
3583         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
3584         * cp-ubsan.c: New file.
3585         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
3586         * constexpr.c (cxx_eval_call_expression): Return void_node
3587         for IFN_UBSAN_VPTR.
3588         (potential_constant_expression_1): Return true for
3589         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
3590         * typeck.c (build_class_member_access_expr): Provide locus
3591         for COMPONENT_REFs.
3592         (build_static_cast_1): Instrument downcasts.
3593         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
3594         add ubsan instrumentation for virtual_access.
3595         * call.c: Include internal-fn.h.
3596         (set_flags_from_callee): Handle internal calls.
3598 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
3600         PR c++/59366
3601         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
3602         and function templates, declared only in the class.
3603         * decl.c (duplicate_decls): Reveal hidden friend functions or
3604         function templates, if they are redeclared outside the class.
3606 2015-01-15  Jason Merrill  <jason@redhat.com>
3608         PR c++/64356
3609         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
3611         PR c++/63283
3612         * constexpr.c (potential_constant_expression_1): Handle reference
3613         args in templates.
3615 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
3616             James Norris  <jnorris@codesourcery.com>
3617             Cesar Philippidis  <cesar@codesourcery.com>
3618             Ilmir Usmanov  <i.usmanov@samsung.com>
3619             Jakub Jelinek  <jakub@redhat.com>
3621         * parser.c: Include "gomp-constants.h".
3622         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3623         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3624         Use OMP_CLAUSE_SET_MAP_KIND.
3625         (cp_parser_omp_construct, cp_parser_pragma): Handle
3626         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
3627         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
3628         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3629         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
3630         "create", "delete", "deviceptr", "host", "num_gangs",
3631         "num_workers", "present", "present_or_copy", "pcopy",
3632         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3633         "present_or_create", "pcreate", "vector_length", "wait".
3634         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
3635         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3636         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3637         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3638         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
3639         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
3640         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
3641         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
3642         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
3643         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
3644         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
3645         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
3646         (cp_parser_oacc_parallel, cp_parser_oacc_update)
3647         (cp_parser_oacc_wait): New functions.
3648         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
3649         (finish_oacc_parallel): New prototypes.
3650         * semantics.c: Include "gomp-constants.h".
3651         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
3652         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
3653         OMP_CLAUSE_SET_MAP_KIND.
3654         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
3655         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
3656         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3657         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
3658         functions.
3660 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
3662         PR c++/58671
3663         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
3664         self-initialization.
3666 2015-01-13  Jason Merrill  <jason@redhat.com>
3668         PR c++/64356
3669         PR libstdc++/58777
3670         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
3671         pointer expressions.
3672         (cxx_eval_increment_expression): Likewise.
3674         PR c++/64514
3675         * pt.c (coerce_template_parameter_pack): Return NULL for a
3676         zero-length fixed parameter pack with a pack expansion arg.
3678         PR c++/64520
3679         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
3681 2015-01-12  Jason Merrill  <jason@redhat.com>
3683         PR c++/64547
3684         * constexpr.c (cxx_eval_call_expression): A call to a void
3685         function doesn't need to return a value.
3687 2015-01-09  Michael Collison  <michael.collison@linaro.org>
3689         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
3690         input.h, alias.h, symtab.h, options.h, fold-const.h,
3691         wide-int.h, and inchash.h due to flattening of tree.h.
3692         * class.c: Ditto.
3693         * constexpr.c: Ditto.
3694         * cp-array-notation.c: Ditto.
3695         * cp-gimplify.c: Ditto.
3696         * cp-lang.c: Ditto.
3697         * cp-objcp-common.c: Ditto.
3698         * cvt.c: Ditto.
3699         * decl2.c: Ditto.
3700         * decl.c: Ditto.
3701         * dump.c: Ditto.
3702         * error.c: Ditto.
3703         * except.c: Ditto.
3704         * expr.c: Ditto.
3705         * friend.c: Ditto.
3706         * init.c: Ditto.
3707         * lambda.c: Ditto.
3708         * lex.c: Ditto.
3709         * mangle.c: Ditto.
3710         * name-lookup.c: Ditto.
3711         * optimize.c: Ditto.
3712         * parser.c: Ditto.
3713         * pt.c: Ditto.
3714         * ptree.c: Ditto.
3715         * repo.c: Ditto.
3716         * rtti.c: Ditto.
3717         * search.c: Ditto.
3718         * semantics.c: Ditto.
3719         * tree.c: Ditto.
3720         * typeck2.c: Ditto.
3721         * typeck.c: Ditto.
3723 2015-01-08  Jason Merrill  <jason@redhat.com>
3725         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
3726         * decl.c (compute_array_index_type): Likewise.
3727         * init.c (build_vec_init): Likewise.
3728         * typeck.c (cp_build_binary_op): Likewise.
3730 2015-01-08  Jason Merrill  <jason@redhat.com>
3732         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
3733         whether an initializer-list is too big for a VLA.
3734         (throw_bad_array_length): Remove.
3735         * cp-tree.h: Remove prototype.
3737 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
3739         PR c++/60753
3740         * decl.c (grokfndecl): Add bool parameter.
3741         (grokdeclarator): Adjust calls.
3742         (start_decl): Don't set DECL_DELETED_FN here.
3744 2015-01-06  Jason Merrill  <jason@redhat.com>
3746         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
3747         template-ids.
3749         PR c++/64455
3750         * pt.c (type_dependent_expression_p): Handle variable templates.
3751         * constexpr.c (potential_constant_expression_1): Use it.
3753         PR c++/64487
3754         * semantics.c (finish_offsetof): Handle templates here.
3755         * parser.c (cp_parser_builtin_offsetof): Not here.
3757         PR c++/64496
3758         * semantics.c (process_outer_var_ref): Diagnose lambda in local
3759         class NSDMI.
3761 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
3763         PR c++/64489
3764         * class.c (check_field_decls): Make copy assignment operators
3765         complex only in c++98 mode.
3767 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
3769         PR c++/31397
3770         * class.c (check_for_override): Warn when a virtual function is an
3771         override not marked override.
3773 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
3775         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
3776         hold base_fndecls.
3777         (get_basefndecls): Adjust.
3779 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
3781         Update copyright years.
3783 2015-01-05  Marek Polacek  <polacek@redhat.com>
3785         PR c/64423
3786         * typeck.c (cp_build_array_ref): Pass loc down to
3787         warn_array_subscript_with_type_char.
3790 Copyright (C) 2015 Free Software Foundation, Inc.
3792 Copying and distribution of this file, with or without modification,
3793 are permitted in any medium without royalty provided the copyright
3794 notice and this notice are preserved.