2015-10-18 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / cp / ChangeLog
blob6664cf939d4cbccb689eeacc6baaface9cded926
1 2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
3         PR c++/67926
4         * constexpr.c (potential_constant_expression_1): Handle
5         UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
6         BINARY_RIGHT_FOLD_EXPR.
8 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
9             Aldy Hernandez  <aldyh@redhat.com>
11         * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
12         * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
13         (cp_genericize_r): Likewise.
14         (cxx_omp_finish_clause): Don't diagnose references.
15         (cxx_omp_disregard_value_expr): New function.
16         * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
17         * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
18         (DECL_OMP_PRIVATIZED_MEMBER): Define.
19         (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
20         pop_omp_privatization_clauses, save_omp_privatization_clauses,
21         restore_omp_privatization_clauses, omp_privatize_field,
22         cxx_omp_disregard_value_expr): New prototypes.
23         (finish_omp_clauses): Add two new arguments.
24         (finish_omp_for): Add ORIG_DECLV argument.
25         * parser.c (cp_parser_lambda_body): Call
26         save_omp_privatization_clauses and restore_omp_privatization_clauses.
27         (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
28         (cp_parser_omp_var_list_no_open): Handle structure elements for
29         map, to and from clauses.  Handle array sections in reduction
30         clause.  Parse this keyword.  Formatting fixes.
31         (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
32         if clause modifiers.
33         (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
34         cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
35         cp_parser_omp_clause_defaultmap): New functions.
36         (cp_parser_omp_clause_ordered): Parse optional parameter.
37         (cp_parser_omp_clause_reduction): Handle array reductions.
38         (cp_parser_omp_clause_schedule): Parse optional simd modifier.
39         (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
40         New functions.
41         (cp_parser_omp_clause_linear): Parse linear clause modifiers.
42         (cp_parser_omp_clause_depend_sink): New function.
43         (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
44         (cp_parser_omp_clause_map): Parse release/delete map kinds and
45         optional always modifier.
46         (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
47         and finish_omp_clauses callers.
48         (cp_parser_omp_all_clauses): Likewise.  Parse OpenMP 4.5 clauses.
49         Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
50         (OMP_CRITICAL_CLAUSE_MASK): Define.
51         (cp_parser_omp_critical): Parse critical clauses.
52         (cp_parser_omp_for_incr): Use cp_tree_equal if
53         processing_template_decl.
54         (cp_parser_omp_for_loop_init): Return tree instead of bool.  Handle
55         non-static data member iterators.
56         (cp_parser_omp_for_loop): Handle doacross loops, adjust
57         finish_omp_for and finish_omp_clauses callers.
58         (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
59         (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
60         (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
61         (OMP_FOR_CLAUSE_MASK): Add linear clause.
62         (cp_parser_omp_for): Disallow ordered clause when combined with
63         distribute.  Disallow linear clause when combined with distribute
64         and not combined with simd.
65         (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
66         (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
67         of tree, parse clauses and if depend clause is found, don't parse
68         a body.
69         (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
70         Allow target parallel without for after it.
71         (OMP_TASK_CLAUSE_MASK): Add priority clause.
72         (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
73         (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
74         invalid kinds.
75         (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
76         (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
77         OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
78         (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
79         functions.
80         (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
81         defaultmap and is_device_ptr clauses.
82         (cp_parser_omp_target): Parse target parallel and target simd.  Set
83         OMP_TARGET_COMBINED on combined constructs.  Parse target enter data
84         and target exit data.  Diagnose invalid map kinds.
85         (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
86         (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
87         (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
88         construct.
89         (OMP_TASKLOOP_CLAUSE_MASK): Define.
90         (cp_parser_omp_taskloop): New function.
91         (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
92         handle PRAGMA_OMP_TASKLOOP.
93         (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
94         handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
95         and pop_omp_privatization_clauses around parsing calls.
96         (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
97         * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
98         and finish_omp_clauses callers.
99         (tsubst_omp_clause_decl): Return NULL if decl is NULL.
100         For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
101         Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
102         effects.
103         (tsubst_omp_clauses): Add ALLOW_FIELDS argument.  Handle new
104         OpenMP 4.5 clauses.  Use tsubst_omp_clause_decl for more clauses.
105         If ALLOW_FIELDS, handle non-static data members in the clauses.
106         Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
107         (omp_parallel_combined_clauses): New variable.
108         (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
109         OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
110         Improve handling of clauses on combined constructs.
111         (tsubst_expr): Call push_omp_privatization_clauses and
112         pop_omp_privatization_clauses around instantiation of certain
113         OpenMP constructs, improve handling of clauses on combined
114         constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
115         tsubst_omp_clauses and finish_omp_for callers, handle clauses on
116         critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
117         (instantiate_decl): Call save_omp_privatization_clauses and
118         restore_omp_privatization_clauses around instantiation.
119         (dependent_omp_for_p): Fix up comment typo.  Handle SCOPE_REF.
120         * semantics.c (omp_private_member_map, omp_private_member_vec,
121         omp_private_member_ignore_next): New variables.
122         (finish_non_static_data_member): Return dummy decl for privatized
123         non-static data members.
124         (omp_clause_decl_field, omp_clause_printable_decl,
125         omp_note_field_privatization, omp_privatize_field): New functions.
126         (handle_omp_array_sections_1): Fix comment typo.
127         Add IS_OMP argument, handle structure element bases, diagnose
128         bitfields, pass IS_OMP recursively, diagnose known zero length
129         array sections in depend clauses, handle array sections in reduction
130         clause, diagnose negative length even for pointers.
131         (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
132         types, pass IS_OMP down to handle_omp_array_sections_1, handle
133         array sections in reduction clause, set
134         OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
135         length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
136         (finish_omp_reduction_clause): Handle array sections and arrays.
137         Use omp_clause_printable_decl.
138         (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
139         New functions.
140         (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
141         Handle new OpenMP 4.5 clauses and new restrictions for the old
142         ones, handle non-static data members, reject this keyword when not
143         allowed.
144         (push_omp_privatization_clauses, pop_omp_privatization_clauses,
145         save_omp_privatization_clauses, restore_omp_privatization_clauses):
146         New functions.
147         (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
148         Add collapse and ordered arguments.  Fix handling of lastprivate
149         iterators in doacross loops.
150         (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
151         adjust c_finish_omp_for, handle_omp_for_class_iterator and
152         finish_omp_clauses callers.  Fill in OMP_CLAUSE_LINEAR_STEP on simd
153         loops with non-static data member iterators.
155 2015-10-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
157         PR c++/58566
158         * lambda.c (lambda_return_type): Return error_mark_node
159         instead of void_type_node for the error cases.
161 2015-10-08  Jason Merrill  <jason@redhat.com>
163         * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
164         * init.c (get_nsdmi): Use it.
165         * typeck2.c (massage_init_elt): Use it.
167 2015-10-07  Jason Merrill  <jason@redhat.com>
169         PR c++/67557
170         * call.c (is_base_field_ref): New.
171         (unsafe_copy_elision_p): New.
172         (build_over_call): Use it.
174 2015-10-07  Marek Polacek  <polacek@redhat.com>
176         PR sanitizer/67867
177         * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
179 2015-10-07  Marek Polacek  <polacek@redhat.com>
181         * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
182         (genericize_cp_loop): Likewise.
183         * decl.c (cxx_maybe_build_cleanup): Likewise.
184         * parser.c (cp_parser_binary_expression): Likewise.
185         (cp_parser_omp_for_loop): Likewise.
186         (cp_parser_omp_construct): Likewise.
187         * semantics.c (finish_transaction_stmt): Likewise.
188         (build_transaction_expr): Likewise.
190 2015-10-06  Jason Merrill  <jason@redhat.com>
192         PR c++/67810
193         * parser.c (cp_parser_fold_expr_p): Remove.
194         (is_binary_op): New.
195         (cp_parser_fold_expression): Take LHS as parameter.
196         (cp_parser_primary_expression): Call it after parsing an expression.
197         (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
198         (cp_parser_expression): Ignore an operator followed by '...'.
199         (is_binary_op): New.
200         * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
201         (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
203 2015-10-06  Marek Polacek  <polacek@redhat.com>
205         PR c++/67863
206         * call.c (build_conditional_expr_1): Build the COND_EXPR with
207         a location.
209 2015-10-05  Paolo Carlini  <paolo.carlini@oracle.com>
211         PR c++/53856
212         * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
213         reject default template arguments in out of class definitions
214         of members of non-template classes.
216 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
218         * tree.c (cp_tree_equal): Use real_equal instead of
219         REAL_VALUES_EQUAL.
221 2015-10-04  Jason Merrill  <jason@redhat.com>
223         Implement N4514, C++ Extensions for Transactional Memory.
224         * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
225         (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
226         * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
227         * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
228         (make_call_declarator): Take tx_qualifier.
229         (cp_parser_tx_qualifier_opt): New.
230         (cp_parser_lambda_declarator_opt): Use it.
231         (cp_parser_direct_declarator): Likewise.
232         (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
233         (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
234         (cp_parser_std_attribute): Map optimize_for_synchronized to
235         transaction_callable.
236         (cp_parser_transaction): Take the token.  Handle atomic_noexcept.
237         * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
238         * call.c (enum conversion_kind): Add ck_tsafe.
239         (standard_conversion): Handle transaction-safety conversion.
240         (convert_like_real, resolve_address_of_overloaded_function): Likewise.
241         (check_methods): Diagnose transaction_safe_dynamic on non-virtual
242         function.
243         (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
244         * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
245         (can_convert_tx_safety): New.
246         * typeck.c (composite_pointer_type): Handle transaction-safety.
247         * name-lookup.h (enum scope_kind): Add sk_transaction.
248         * name-lookup.c (begin_scope): Handle it.
249         * semantics.c (begin_compound_stmt): Pass it.
250         * decl.c (check_previous_goto_1): Check it.
251         (struct named_label_entry): Add in_transaction_scope.
252         (poplevel_named_label_1): Set it.
253         (check_goto): Check it.
254         (duplicate_decls): A specialization can be transaction_safe
255         independently of its template.
256         (grokdeclarator): Handle tx-qualifier.
257         * rtti.c (ptr_initializer): Handle transaction-safe.
258         * search.c (check_final_overrider): Check transaction_safe_dynamic.
259         Don't check transaction_safe.
260         * mangle.c (write_function_type): Mangle transaction_safe here.
261         (write_CV_qualifiers_for_type): Not here.
262         (write_type): Preserve transaction_safe when stripping attributes.
263         * error.c (dump_type_suffix): Print transaction_safe.
265 2015-10-02  Marek Polacek  <polacek@redhat.com>
267         PR c/64249
268         * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
269         down to cp_parser_selection_statement.
270         (cp_parser_selection_statement): Add CHAIN parameter.  Add code to
271         warn about duplicated if-else-if conditions.
272         (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
273         it down to cp_parser_statement.
275 2015-10-01  Ville Voutilainen  <ville.voutilainen@gmail.com>
277         PR c++/54430
278         * name-lookup.c (push_binding): Make non-static.
279         * name-lookup.h (push_binding): Declare it.
280         * parser.c (cp_parser_range_for): Use it, get the range
281         declaration away from the scope until the range expression
282         has been parsed, then restore the declaration.
284 2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>
286         Fix small typos in the coding rule enforcement warnings.
287         * parser.c (cp_parser_namespace_definition): Replace 'namepace'
288         with 'namespace'.
290 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
292         * decl.c (xref_basetypes): Check virtual and/or multiple
293         inheritance warning.
294         * parser.c (cp_parser_namespace_definition): Check namespaces
295         warning.
296         * pt.c (push_template_decl_real): Check templates warning.
298 2015-09-22  Jason Merrill  <jason@redhat.com>
300         * mangle.c (abi_warn_or_compat_version_crosses): New.
301         Use it instead of abi_version_crosses.
302         (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
304 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
306         Complete the implementation of N4230, Nested namespace definition.
307         * parser.c (cp_parser_namespace_definition): Support namespace
308         attributes both before and after the namespace identifier.
310 2015-09-19  Trevor Saunders  <tbsaunde@tbsaunde.org>
312         * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
314 2015-09-18  Ville Voutilainen  <ville.voutilainen@gmail.com>
316         Implement nested namespace definitions.
317         * parser.c (cp_parser_namespace_definition): Grok nested namespace
318         definitions.
320 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
322         * parser.c (pragma_lex): Add loc argument. Rearrange the code to
323         make it more similar to the C version.
325 2015-09-17  Andrew Sutton  <andrew.n.sutton@gmail.com>
326             Jason Merrill  <jason@redhat.com>
328         Implement N4295 fold-expressions.
329         * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
330         BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
331         * cp-objcp-common.c (cp_common_init_ts): Handle them.
332         * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
333         (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
334         * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
335         (cp_parser_skip_to_closing_parenthesis_1): This function.  Change
336         or_comma parameter to or_ttype.
337         (cp_parser_fold_operator, cp_parser_fold_expr_p)
338         (cp_parser_fold_expression): New.
339         (cp_parser_primary_expression): Use them.
340         * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
341         (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
342         (tsubst_binary_left_fold, expand_right_fold)
343         (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
344         (tsubst_copy): Use them.
345         (type_dependent_expression_p): Handle fold-expressions.
346         * semantics.c (finish_unary_fold_expr)
347         (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
348         (finish_binary_fold_expr): New.
350 2015-09-17  Richard Biener  <rguenther@suse.de>
352         * cp-tree.h (note_decl_for_pch): Remove.
353         * class.c (build_clone): Do not call note_decl_for_pch.
354         * semantics.c (finish_member_declaration): Likewise.
355         (note_decl_for_pch): Remove.
356         * decl2.c (c_parse_final_cleanups): Mangle all globals before
357         writing the PCH.
359 2015-09-14  Jason Merrill  <jason@redhat.com>
361         PR c++/44282
362         * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
363         mangling with lower -fabi-version.
365 2015-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
367         PR c++/51911
368         * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
369         per the spirit of DR 1467).
371 2015-09-11  Mark Wielaard  <mjw@redhat.com>
373         PR c/28901
374         * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
375         VAR_P TREE_READONLY override.
377 2015-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
379         PR c++/67318
380         * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
381         and set template_parameter_pack_p also when the type is null.
383 2015-09-09  Mark Wielaard  <mjw@redhat.com>
385         * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
386         parm against NULL.
388 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
390         PR c++/67522
391         * semantics.c (handle_omp_array_sections_1): Only run
392         type_dependent_expression_p on VAR_DECL/PARM_DECLs.
393         (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
394         Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
395         is not a VAR_DECL/PARM_DECL.
397         PR c++/67511
398         * semantics.c (handle_omp_for_class_iterator): Don't wrap
399         error_mark_node into a NOP_EXPR to void_type_node.
401 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
403         PR c++/53184
404         * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
406 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
408         PR c++/67504
409         * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
410         before INTEGRAL_TYPE_P test.
412 2015-09-08  Jason Merrill  <jason@redhat.com>
414         PR c++/67041
415         * pt.c (tsubst_copy_and_build): Handle variables like functions.
417 2015-09-08  Paolo Carlini  <paolo.carlini@oracle.com>
419         PR c++/67369
420         * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
421         if the first argument isn't a template.
423 2015-09-03  Martin Sebor  <msebor@redhat.com>
425         PR c/66516
426         * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
427         argument(s).
428         * expr.c (mark_rvalue_use): Use new argument.
429         * call.c (build_addr_func): Call decay_conversion with new
430         argument.
431         * pt.c (convert_template_argument): Call reject_gcc_builtin.
432         * typeck.c (decay_conversion): Use new argument.
433         (c_decl_implicit): Define.
435 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
437         PR middle-end/60586
438         * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
439         function.
440         (cp_gimplify_expr): Added a call to the function
441         cilk_cp_gimplify_call_params_in_spawned_fn.
443 2015-09-01  Paolo Carlini  <paolo.carlini@oracle.com>
445         PR c++/61753
446         * decl.c (smallest_type_quals_location): New.
447         (check_special_function_return_type): Use the latter; add int and
448         const location_t* parameters.
449         (grokdeclarator): Adjust check_special_function_return_type call.
451 2015-08-29  Markus Trippelsdorf  <markus@trippelsdorf.de>
453         PR c++/67371
454         * constexpr.c (potential_constant_expression_1): Remove IF_STMT
455         case. Move label to COND_EXPR case. Remove checking of
456         SWITCH_STMT_BODY.
458 2015-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
460         PR c++/63693
461         * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
462         only on class types.
464 2015-08-21  Jason Merrill  <jason@redhat.com>
466         PR c++/67240
467         * constraint.cc (satisfy_implicit_conversion_constraint): Also
468         check for NULL_TREE.
470 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
472         * decl.c (grokvardecl): Simplify the latter.
474 2015-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
476         * decl.c (grokvardecl): Complete check added for c++/67065.
478 2015-08-20  Jason Merrill  <jason@redhat.com>
480         * name-lookup.c (hidden_name_p): Handle OVERLOAD.
482 2015-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
484         PR c++/67065
485         * decl.c (grokvardecl): Reject 'main' as global variable.
487 2015-08-19  Jason Merrill  <jason@redhat.com>
489         PR c++/66957
490         * search.c (protected_accessible_p): Remove redundant access_in_type.
491         Add otype parm instead of walking binfo.
492         (friend_accessible_p): Check SCOPE itself.  Handle class
493         templates.  Pass through otype.
494         (dfs_accessible_post): Handle all accessibility cases.
495         (dfs_accessible_pre): New.
496         (accessible_p): Use it.  Don't check protected access here.  Pass
497         decl and otype to dfs_walk.
498         (member_declared_in_type, dfs_access_in_type_pre): New.
499         (access_in_type): Use dfs_access_in_type_pre.
500         * friend.c (add_friend): Fix multiple friends with the same name.
502         * lambda.c (current_nonlambda_scope): New.
504 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
506         * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
507         method.c, name-lookup.h, parser.c, parser.h, rtti.c,
508         semantics.c, typeck2.c: Remove useless typedefs.
510 2015-08-18  Jason Merrill  <jason@redhat.com>
512         DR 1155
513         * pt.c (convert_nontype_argument): Allow internal linkage in C++11
514         and up.
516 2015-08-17  Paolo Carlini  <paolo.carlini@oracle.com>
518         PR c++/67216
519         * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
521 2015-08-17  Jason Merrill  <jason@redhat.com>
523         PR c++/67244
524         * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
526         PR c++/67104
527         * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
528         (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
530         * constexpr.c (cxx_eval_store_expression): Don't set
531         CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
532         without it.
533         (cxx_eval_array_reference): Check it.
535         * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
537 2015-08-14  Jason Merrill  <jason@redhat.com>
539         PR c++/65974
540         * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
542 2015-08-12  Jason Merrill  <jason@redhat.com>
544         PR c++/67104
545         * constexpr.c (cxx_eval_array_reference): Fix typo.
547         PR c++/67104
548         * constexpr.c (cxx_eval_array_reference): Handle sparse
549         CONSTRUCTORs.
551         PR c++/67108
552         * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
553         * error.c (dump_template_bindings): Don't tsubst in that case.
555         PR c++/67161
556         * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
557         TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
559 2015-08-08  Jason Merrill  <jason@redhat.com>
561         PR c++/67152
562         * pt.c (process_partial_specialization): Call
563         associate_classtype_constraints.
565         PR c++/67159
566         * constraint.cc (finish_template_introduction):
567         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
569         PR c++/67142
570         * pt.c (equal): Make sure tmpl is actually a template.
572         PR c++/67144
573         * call.c (joust): Only call more_constrained on decls.
575 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
576             Braden Obrzut  <admin@maniacsvault.net>
577             Jason Merrill  <jason@redhat.com>
578             Ville Voutilainen  <ville.voutilainen@gmail.com>
580         Add C++ Concepts TS support.
581         * constraint.cc, logic.cc: New files.
582         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
583         (c++.tags): Also process .cc files.
584         * call.c (enum rejection_reason_code): Add rr_constraint_failure.
585         (print_z_candidate): Handle it.
586         (constraint_failure): New.
587         (add_function_candidate): Check constraints.
588         (build_new_function_call): Handle evaluating concepts.
589         (joust): Check more_constrained.
590         * class.c (add_method): Check equivalently_constrained.
591         (build_clone): Copy constraints.
592         (currently_open_class): Return tree.
593         (resolve_address_of_overloaded_function): Check constraints.
594         * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
595         (potential_constant_expression_1): Likewise.
596         * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
597         (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
598         * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
599         SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
600         EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
601         EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
602         * cp-tree.h (struct tree_constraint_info, check_nonnull)
603         (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
604         (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
605         (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
606         (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
607         (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
608         (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
609         (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
610         (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
611         (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
612         (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
613         (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
614         (struct local_specialization_stack, enum auto_deduction_context)
615         (variable_concept_p, concept_template_p)
616         (struct deferring_access_check_sentinel): New.
617         (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
618         (union lang_tree_node): Add constraint_info field.
619         (struct lang_decl_base): Add concept_p flag.
620         (enum cp_decl_spec): Add ds_concept.
621         (struct cp_declarator): Add requires_clause.
622         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
623         (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
624         TRAIT_EXPR, *_CONSTR.
625         (pp_cxx_parameter_declaration_clause): Accept a chain of
626         PARM_DECLs.
627         (cxx_pretty_printer::declarator): Print requires-clause.
628         (pp_cxx_template_declaration): Likewise.
629         (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
630         (pp_cxx_requires_clause, pp_cxx_requirement)
631         (pp_cxx_requirement_list, pp_cxx_requirement_body)
632         (pp_cxx_requires_expr, pp_cxx_simple_requirement)
633         (pp_cxx_type_requirement, pp_cxx_compound_requirement)
634         (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
635         (pp_cxx_expression_constraint, pp_cxx_type_constraint)
636         (pp_cxx_implicit_conversion_constraint)
637         (pp_cxx_argument_deduction_constraint)
638         (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
639         (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
640         * cxx-pretty-print.h: Declare them.
641         * decl.c (decls_match): Compare constraints.
642         (duplicate_decls): Likewise.  Remove constraints before freeing.
643         (cxx_init_decl_processing): Call init_constraint_processing.
644         (cp_finish_decl): Diagnose concept without initializer.
645         (grokfndecl, grokvardecl): Handle concepts and constraints.
646         (grokdeclarator): Handle concept, requires-clause.
647         (grokparms): No longer static.
648         (xref_tag_1): Check constraints.
649         (finish_function): Call check_function_concept.
650         (cp_tree_node_structure): Handle CONSTRAINT_INFO.
651         (check_concept_refinement, is_concept_var, check_concept_fn): New.
652         * decl2.c (check_classfn): Compare constraints.
653         (mark_used): Don't instantiate concepts.
654         * error.c (dump_template_decl): Print constraints.
655         (dump_function_decl): Likewise.
656         (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
657         * lex.c (init_reswords): Set D_CXX_CONCEPTS.
658         * method.c (implicitly_declare_fn): Copy constraints from
659         inherited ctor.
660         * parser.h (struct cp_parser): Add in_result_type_constraint_p and
661         prevent_constrained_type_specifiers fields.
662         * parser.c (make_call_declarator): Add requires_clause parm.
663         (cp_parser_new): Clear prevent_constrained_type_specifiers.
664         (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
665         (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
666         (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
667         (cp_parser_declaration): Handle concept introduction.
668         (cp_parser_member_declaration): Likewise.
669         (cp_parser_template_parameter): Handle constrained parameter.
670         (cp_parser_type_parameter): Handle constraints.
671         (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
672         (cp_parser_template_id): Handle partial concept id.
673         (cp_parser_type_name): Add overload that takes typename_keyword_p.
674         Handle constrained parameter.
675         (cp_parser_nonclass_name): Handle concept names.
676         (cp_parser_alias_declaration): Handle constraints.
677         (cp_parser_late_return_type_opt): Also handle requires-clause.
678         (cp_parser_type_id_1): Handle deduction constraint.
679         (cp_parser_parameter_declaration): Handle constrained parameters.
680         (cp_parser_class_specifier_1): Handle constraints.
681         (cp_parser_template_declaration_after_parameters): Split out from
682         cp_parser_template_declaration_after_export.
683         (cp_parser_single_declaration): Handle constraints.
684         (synthesize_implicit_template_parm): Handle constraints.
685         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
686         (cp_parser_introduction_list, get_id_declarator)
687         (get_unqualified_id, is_constrained_parameter)
688         (cp_parser_check_constrained_type_parm)
689         (cp_parser_constrained_type_template_parm)
690         (cp_parser_constrained_template_template_parm)
691         (constrained_non_type_template_parm, finish_constrained_parameter)
692         (declares_constrained_type_template_parameter)
693         (declares_constrained_template_template_parameter)
694         (check_type_concept, cp_parser_maybe_constrained_type_specifier)
695         (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
696         (cp_parser_requires_clause, cp_parser_requires_clause_opt)
697         (cp_parser_requires_expression)
698         (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
699         (cp_parser_requirement_list, cp_parser_requirement)
700         (cp_parser_simple_requirement, cp_parser_type_requirement)
701         (cp_parser_compound_requirement, cp_parser_nested_requirement)
702         (cp_parser_template_introduction)
703         (cp_parser_explicit_template_declaration)
704         (get_concept_from_constraint): New.
705         * pt.c (local_specialization_stack): Implement.
706         (maybe_new_partial_specialization): New.
707         (maybe_process_partial_specialization): Use it.
708         (retrieve_local_specialization, register_local_specialization)
709         (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
710         (tsubst_expr): No longer static.
711         (spec_hasher::equal): Compare constraints.
712         (determine_specialization): Handle constraints.
713         (check_explicit_specialization): Handle concepts.
714         (process_template_parm): Handle constraints.
715         (end_template_parm_list): Add overload taking no arguments.
716         (process_partial_specialization): Handle concepts and constraints.
717         Register partial specializations of variable templates.
718         (redeclare_class_template): Handle constraints.
719         (convert_template_argument): Handle WILDCARD_DECL.  Check
720         is_compatible_template_arg.
721         (coerce_template_parameter_pack): Handle wildcard packs.
722         (coerce_template_parms): DR 1430 also applies to concepts.  Add
723         overloads taking fewer parameters.
724         (lookup_template_class_1): Handle constraints.
725         (lookup_template_variable): Concepts are always bool.
726         (finish_template_variable): Handle concepts and constraints.
727         (tsubst_friend_class): Handle constraints.
728         (gen_elem_of_pack_expansion_instantiation): Handle constraints.
729         (tsubst_pack_expansion): Handle local parameters.
730         (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
731         (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
732         (tsubst_copy_and_build): Handle REQUIRES_EXPR.
733         (more_specialized_fn, more_specialized_partial_spec): Check constraints.
734         (more_specialized_inst): Split out from most_specialized_instantiation.
735         (most_specialized_partial_spec): Check constraints.
736         (instantiate_decl): Never instantiate a concept.
737         (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
738         variable concepts.
739         (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
740         (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
741         (do_auto_deduction): Add overload taking tsubst flags and context enum.
742         Handle constraints.
743         (get_template_for_ordering, most_constrained_function)
744         (is_compatible_template_arg, convert_wildcard_argument)
745         (struct constr_entry, struct constr_hasher, decl_constraints)
746         (valid_constraints_p, get_constraints, set_constraints)
747         (remove_constraints, init_constraint_processing): New.
748         * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
749         * search.c (lookup_member): Do lookup in the open partial
750         instantiation.
751         * semantics.c (finish_template_template_parm): Handle constraints.
752         (fixup_template_type): New.
753         (finish_template_type): Call it.
754         (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
755         * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
756         (cp_walk_subtrees): Handle REQUIRES_EXPR.
757         * typeck.c (cp_build_function_call_vec): Check constraints.
759 2015-08-06  Jason Merrill  <jason@redhat.com>
761         PR c++/66533
762         * parser.c (cp_parser_primary_expression): Don't skip to the end
763         of the statement if we're parsing tentatively.
765         PR c++/67130
766         PR c++/67131
767         PR c++/66260
768         * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
769         templates.
770         * pt.c (tsubst_copy_and_build): Check for argument substitution
771         failure.
773 2015-08-05  Jason Merrill  <jason@redhat.com>
775         * pt.c (determine_specialization): Print candidates after 'no
776         match' error.
778         * decl.c (cp_finish_decl): Tidy.
779         * typeck.c (finish_class_member_access_expr): Use
780         type_dependent_expression_p.
781         * semantics.c (finish_id_expression): Use
782         type_dependent_expression_p.  Don't build_qualified_name for a
783         decl in non-dependent scope.
784         * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
785         identifier is dependent.  Remove variable_template_p check.
787         PR c++/66260
788         PR c++/66596
789         PR c++/66649
790         PR c++/66923
791         * pt.c (lookup_template_variable): Use NULL_TREE for type.
792         (instantiate_template_1): Also set DECL_TI_ARGS based on
793         the immediate parent.
794         (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
795         (finish_template_variable): Add complain parm.
796         * cp-tree.h: Adjust.
798         PR c++/65195
799         PR c++/66619
800         * semantics.c (finish_id_expression): Call convert_from_reference
801         for variable template.
803 2015-08-04  Jason Merrill  <jason@redhat.com>
805         * pt.c (lookup_template_class_1): Clear elt.spec.
807         * tree.c (build_target_expr): Copy the location from value.
809 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
811         * parser.c (cp_parser_selection_statement): Move handling of
812         semicolon body to ...
813         (cp_parser_implicitly_scoped_statement): .. here.  Call
814         warn_for_misleading_indentation even when the body is a
815         semicolon.  Extract token_indent_infos corresponding to the
816         guard, body and next tokens.  Adjust call to
817         warn_for_misleading_indentation accordingly.  Take
818         token_indent_info argument.
819         (cp_parser_already_scoped_statement): Likewise.
820         (cp_parser_selection_statement, cp_parser_iteration_statement):
821         Extract a token_indent_info corresponding to the guard token.
823 2015-08-01  Caroline Tice  <cmtice@google.com>
825         PR 66521
826         * mangle.c : Add vtable-verify.h to include files.
827         (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
828         is "<anon>" get the real mangled name for the class instead, and
829         also store the real mangled name in a vector for use later.
831 2015-07-31  Marek Polacek  <polacek@redhat.com>
833         PR sanitizer/66977
834         * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
835         RSHIFT_EXPR.
837 2015-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
839         * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
840         in warning_at instead of "%q+D" in warning.
841         (warn_hidden): Likewise but use location_of.
842         (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
843         (check_bitfield_decl, check_field_decls): Likewise in warning_at.
844         (check_field_decls): Likewise for permerror.
845         (explain_non_literal_class): Likewise for inform.
846         (check_bases_and_members, layout_class_type): Likewise for warning_at.
847         (note_name_declared_in_class): Use location_of in permerror.
848         * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
849         (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
850         inform, and warning_at.
851         (check_for_out_of_scope_variable): Likewise for warning_at and
852         permerror.
854 2015-07-30  Jason Merrill  <jason@redhat.com>
856         DR 1558
857         PR c++/67021
858         * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
860 2015-07-28  Paolo Carlini  <paolo.carlini@oracle.com>
862         * call.c (build_op_delete_call, convert_like_real, build_over_call):
863         Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
864         of "%q+D".
865         * constexpr.c (explain_invalid_constexpr_fn): Likewise.
866         * decl.c (duplicate_decls): Likewise for warning/warning_at.
867         * except.c (maybe_noexcept_warning): Likewise.
868         * friend.c (make_friend_class): Likewise for inform.
869         * mangle.c (mangle_decl): Likewise for warning/warning_at.
870         * method.c (process_subob_fn, walk_field_subobs,
871         maybe_explain_implicit_delete): Likewise for inform.
872         * parser.c (cp_parser_lambda_introducer): Likewise.
873         * pt.c (check_specialization_namespace,
874         maybe_process_partial_specialization): Likewise for permerror.
875         (redeclare_class_template): Likewise for inform_n.
876         (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
877         * search.c (check_final_overrider): Likewise.
878         * semantics.c (process_outer_var_ref): Likewise.
880 2015-07-27  Jason Merrill  <jason@redhat.com>
882         * constexpr.c (cxx_eval_call_expression): Don't add this call to
883         the hash table if !depth_ok.
885 2015-07-27  Marek Polacek  <polacek@redhat.com>
887         PR c++/66555
888         PR c/54979
889         * call.c (build_new_op_1): Call warn_tautological_cmp.
890         * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
891         compare warnings.
893 2015-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
895         PR c++/18969
896         * typeck.c (check_return_expr): Also do the basic return-value
897         validity checking if processing_template_decl and yet types are
898         not dependent.  Remove obsolete code.
900 2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>
902         * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
903         in warning_at instead of "%q+D" in warning.
904         (warn_extern_redeclared_static): Likewise for inform.
905         (check_redeclaration_no_default_args): Likewise for permerror.
906         (duplicate_decls): Likewise.
907         (check_previous_goto_1): Likewise for inform.
908         (check_goto, start_decl, check_for_uninitialized_const_var,
909         start_preparsed_function, finish_function§): Likewise.
910         * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
911         * init.c (sort_mem_initializers): Likewise.
912         * typeck.c (convert_for_initialization): Likewise for inform.
913         (maybe_warn_about_returning_address_of_local): Likewise.
914         * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
915         (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
917 2015-07-25  Patrick Palka  <ppalka@gcc.gnu.org>
919         PR c++/66857
920         * cvt.c (ocp_convert): Don't call scalar_constant_value when
921         converting to a class type.
923 2015-07-24  Jason Merrill  <jason@redhat.com>
925         PR c++/64969
926         * pt.c (splice_late_return_type): Correct deduced return type for
927         abbreviated function template.
929 2015-07-24  Richard Biener  <rguenther@suse.de>
931         * init.c (build_vec_init): Build iterator bound in the same
932         type as the iterator.
934 2015-07-23  Marek Polacek  <polacek@redhat.com>
936         PR c++/66572
937         * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
939 2015-07-23  Paolo Carlini  <paolo.carlini@oracle.com>
941         PR c++/52987
942         * parser.c (cp_parser_simple_declaration): Robustify check avoiding
943         redundant error messages.
945 2015-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
947         * decl.c (grokdeclarator): For an erroneous template parameter
948         propagate error_mark_node as type.
950 2015-07-20  Marek Polacek  <polacek@redhat.com>
952         PR c++/55095
953         * typeck.c (cp_build_binary_op): Warn about left shift overflows.
955 2015-07-15  Jason Merrill  <jason@redhat.com>
957         PR c++/65091
958         * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
959         template if there is no type x in scope.
961 2015-07-14  Patrick Palka  <ppalka@gcc.gnu.org>
963         PR c++/66850
964         * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
965         template template parm in the redeclaration.
966         (lookup_template_class_1): Peel off irrelevant template levels
967         from current_template_parms before augmenting the argument
968         list.
970 2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>
972         PR c++/65071
973         * parser.c (cp_parser_sizeof_pack): Also consider template template
974         parameters.
976 2015-07-14  Jason Merrill  <jason@redhat.com>
978         * call.c (build_new_method_call_1): Call reshape_init.
980 2015-07-14  Paolo Carlini  <paolo.carlini@oracle.com>
982         * pt.c (check_template_shadow): Emit error + inform instead of
983         two errors.
985 2015-07-13  Patrick Palka  <ppalka@gcc.gnu.org>
987         PR c++/65186
988         * pt.c (invalid_nontype_parm_type_p): Accept a bound template
989         template parm type under C++11 and later.
991 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
993         * call.c: Fix double word typos.
994         * cp-array-notation.c: Same.
995         * cp-tree.h: Same.
996         * init.c: Same.
997         * name-lookup.c: Same.
998         * parser.c: Same.
1000 2015-07-10  Patrick Palka  <ppalka@gcc.gnu.org>
1002         PR c++/30044
1003         * pt.c (begin_template_parm_list): Add a dummy parameter level
1004         to current_template_parms.
1005         (end_template_parm_list): Remove the dummy parameter level
1006         before adding the real one.
1007         (tsubst): Don't attempt to substitute for template parameters
1008         corresponding to a dummy argument level.
1009         (template_parms_to_args): Remove obsolete hack for
1010         giving template template arguments the proper level.
1011         (splite_late_return_type): Remove obsolete hack for giving
1012         template template arguments the proper level.
1013         * error.c (dump_template_decl): Don't print dummy template
1014         levels.
1016 2015-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
1018         PR c++/54521
1019         * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
1020         the second step of copy-initialization.
1022 2015-07-10  Jason Merrill  <jason@redhat.com>
1024         * pt.c (find_parameter_packs_r): Handle variable templates.
1025         (variable_template_specialization_p): New.
1026         * cp-tree.h: Declare it.
1028         * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
1030 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
1032         * decl2.c (cpp_check): Revert latest change.
1034 2015-07-09  Jason Merrill  <jason@redhat.com>
1036         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
1037         value_dependent_expression_p.
1039         * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
1040         template_parameter_pack_p.
1041         * parser.c (declarator_can_be_parameter_pack): False if
1042         parameter_pack_p is set.
1043         (make_parameter_declarator): Add template_parameter_pack_p parm.
1044         (cp_parser_template_parameter): Remove parameter pack parsing.
1045         (cp_parser_parameter_declaration): Handle all parameter packs.
1046         Tweak default argument permerror.
1048 2015-07-09  Andrew Sutton  <andrew.n.sutton@gmail.com>
1050         * parser.c (cp_parser_default_type_template_argument)
1051         (cp_parser_default_template_template_argument): Factor out from
1052         cp_parser_type_parameter.
1054 2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1056         * typeck.c (warn_args_num): Rename to error_args_num.
1057         (convert_arguments): Adjust calls.
1059 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1061         * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
1063 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1065         * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
1067 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
1069         * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
1070         * pt.c (apply_late_template_attributes): Likewise.
1072 2015-07-08  Marek Polacek  <polacek@redhat.com>
1074         PR c++/66748
1075         * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
1076         accessing TYPE_LANG_SPECIFIC node.
1078 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1080         * call.c: Adjust includes.
1081         * class.c: Likewise.
1082         * constexpr.c: Likewise.
1083         * cp-array-notation.c: Likewise.
1084         * cp-gimplify.c: Likewise.
1085         * cp-lang.c: Likewise.
1086         * cp-objcp-common.c: Likewise.
1087         * cp-ubsan.c: Likewise.
1088         * cvt.c: Likewise.
1089         * decl.c: Likewise.
1090         * decl2.c: Likewise.
1091         * dump.c: Likewise.
1092         * error.c: Likewise.
1093         * except.c: Likewise.
1094         * expr.c: Likewise.
1095         * friend.c: Likewise.
1096         * init.c: Likewise.
1097         * lambda.c: Likewise.
1098         * lex.c: Likewise.
1099         * mangle.c: Likewise.
1100         * method.c: Likewise.
1101         * name-lookup.c: Likewise.
1102         * optimize.c: Likewise.
1103         * parser.c: Likewise.
1104         * pt.c: Likewise.
1105         * ptree.c: Likewise.
1106         * repo.c: Likewise.
1107         * rtti.c: Likewise.
1108         * search.c: Likewise.
1109         * semantics.c: Likewise.
1110         * tree.c: Likewise.
1111         * typeck.c: Likewise.
1112         * typeck2.c: Likewise.
1114 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
1116         * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
1118 2015-07-06  Jason Merrill  <jason@redhat.com>
1120         * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
1121         for a template template parameter.
1122         (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
1123         by reduce_template_parm_level.
1125         * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
1126         expansion.
1128 2015-07-02  Jason Merrill  <jason@redhat.com>
1130         PR c++/66743
1131         * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
1132         TYPE_VALUES_RAW rather than TYPE_FIELDS.
1134 2015-07-02  Andrew Sutton  <andrew.n.sutton@gmail.com>
1136         * pt.c (type_dependent_expression_p): Handle expressions
1137         that refer to variable templates.
1139 2015-07-01  Jason Merrill  <jason@redhat.com>
1141         * lex.c (init_reswords): s/CXX0X/CXX11/.
1142         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1144         * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
1145         Attribute mangling is now -fabi-version=10.
1147         PR c++/65945
1148         * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
1149         * class.c (layout_nonempty_base_or_field): Warn if that affects
1150         the offset of a field.
1152 2015-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
1154         PR c++/60365
1155         * parser.c (cp_parser_check_std_attribute): New.
1156         (cp_parser_std_attribute_list): Call it.
1158 2015-07-01  Patrick Palka  <ppalka@gcc.gnu.org>
1160         PR c++/66686
1161         * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
1162         return 0 if tsubst returns a dependent type.
1164 2015-06-30  Jason Merrill  <jason@redhat.com>
1166         PR debug/66653
1167         * decl2.c (is_late_template_attribute): True for tls_model.
1169         PR debug/66653
1170         * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
1171         (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
1172         (SET_DECL_GNU_TLS_P): New.
1173         * call.c (make_temporary_var_for_ref_to_temp): Use
1174         CP_DECL_THREAD_LOCAL_P.
1175         (set_up_extended_ref_temp): Likewise.
1176         * decl.c (duplicate_decls, expand_static_init): Likewise.
1177         (redeclaration_error_message, grokvardecl): Likewise.
1178         (start_decl, register_dtor_fn, grokdeclarator): Likewise.
1179         * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
1180         (handle_tls_init): Likewise.
1181         * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1182         * semantics.c (finish_id_expression): Likewise.
1183         (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
1184         (finish_omp_threadprivate): Likewise.
1185         * tree.c (decl_storage_duration): Likewise.
1186         * cp-gimplify.c (omp_var_to_track): Likewise.
1187         (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
1188         * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
1189         already set.
1191 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
1193         Implement N4197 - Adding u8 character literals
1194         * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
1195         and CPP_UTF8CHAR_USERDEF tokens;
1196         (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
1198 2015-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
1200         PR c++/65977
1201         * decl.c (grokfndecl): Allow constexpr declarations of friend
1202         template specializations.
1204 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1206         PR fortran/66605
1207         * decl.c (finish_function): Call do_warn_unused_parameter.
1209 2015-06-29  Marek Polacek  <polacek@redhat.com>
1211         PR c/66322
1212         * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
1213         (push_switch): Set OUTSIDE_RANGE_P.
1214         (pop_switch): Update c_do_switch_warnings call.
1215         (finish_case_label): Update c_add_case_label call.
1216         * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
1217         here.
1219 2015-06-27  Marek Polacek  <polacek@redhat.com>
1221         * call.c: Use VECTOR_TYPE_P.
1222         * constexpr.c: Likewise.
1223         * cvt.c: Likewise.
1224         * decl.c: Likewise.
1225         * decl2.c: Likewise.
1226         * init.c: Likewise.
1227         * semantics.c: Likewise.
1228         * tree.c: Likewise.
1229         * typeck.c: Likewise.
1230         * typeck2.c: Likewise.
1232 2015-06-27  Marek Polacek  <polacek@redhat.com>
1234         * call.c (set_up_extended_ref_temp): Use VAR_P.
1235         * class.c: Use VAR_P throughout.
1236         * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
1237         * cp-array-notation.c (make_triplet_val_inv): Likewise.
1238         * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
1239         throughout.
1240         * decl2.c: Likewise.
1241         * error.c (dump_decl): Use VAR_P.
1242         * mangle.c (decl_implicit_alias_p): Likewise.
1243         * parser.c: Use VAR_P throughout.
1244         * pt.c: Likewise.
1245         * semantics.c: Likewise.
1246         * vtable-class-hierarchy.c: Likewise.
1247         * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
1249 2015-06-27  Andreas Schwab  <schwab@linux-m68k.org>
1251         * pt.c (check_unstripped_args): Mark parameter as unused.
1253 2015-06-26  Jason Merrill  <jason@redhat.com>
1255         PR c++/66216
1256         * class.c (finish_struct): Call fixup_attribute_variants.
1258         PR c++/66684
1259         * typeck2.c (merge_exception_specifiers): Allow different
1260         noexcept-specifiers if we've had errors.
1262         PR c++/66255
1263         * pt.c (check_unstripped_args): Split out from...
1264         (retrieve_specialization): ...here.  Allow typedefs in the type of
1265         a non-type argument.
1267         PR c++/66067
1268         * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
1269         TYPE_DECLs.
1270         * mangle.c (write_template_args): Handle 0 length TREE_VEC.
1272         PR c++/66654
1273         * typeck2.c (digest_init_r): Only expect reshaping if the class is
1274         aggregate.
1276 2015-06-26  Marek Polacek  <polacek@redhat.com>
1278         * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
1279         * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
1281 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1283         * call.c: Remove ipa-ref.h and plugin-api.h from include list.
1284         * class.c: Likewise.
1285         * cp-ubsan.c: Likewise.
1286         * decl.c: Likewise.
1287         * decl2.c: Likewise.
1288         * lambda.c: Likewise.
1289         * mangle.c: Likewise.
1290         * method.c: Likewise.
1291         * optimize.c: Likewise.
1292         * parser.c: Likewise.
1293         * semantics.c: Likewise.
1294         * tree.c: Likewise.
1295         * vtable-class-hierarchy.c: Likewise.
1297 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1299         * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
1300         rather than ggc_hasher.
1301         (constexpr_call_hasher): Likewise.
1302         * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
1303         * decl.c (typename_hasher): Likewise.
1304         * mangle.c (conv_type_hasher): Likewise.
1305         * pt.c (spec_hasher): Likewise.
1306         * tree.c (cplus_array_hasher, list_hasher): Likewise.
1307         * typeck2.c (abstract_type_hasher): Likewise.
1309 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1311         * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
1312         rather than pointer_hash.
1313         (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
1314         * semantics.c (nrv_data): Likewise.
1315         * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
1317 2015-06-24  Jason Merrill  <jason@redhat.com>
1319         PR c++/66647
1320         * pt.c (dependent_type_p_r): Check for dependent alias template
1321         specialization sooner.
1323         PR c++/66501
1324         * class.c (type_has_nontrivial_assignment): Remove.
1325         * cp-tree.h: Remove declaration.
1326         * init.c (vec_copy_assign_is_trivial): New.
1327         (build_vec_init): Use it.
1329 2015-06-24  Edward Smith-Rowland  <3dw4rd@verizon.net>
1331         Implement N3928 - Extending static_assert
1332         * parser.c (cp_parser_static_assert): Support static_assert with
1333         no message string.  Supply an empty string in this case.
1334         * semantics.c (finish_static_assert): Don't try to print a message if
1335         the message strnig is empty.
1337 2015-06-24  Adam Butcher  <adam@jessamine.co.uk>
1339         PR c++/65750
1340         * parser.c (cp_parser_simple_type_specifier): Don't synthesize
1341         implicit template parm if 'auto' is a placeholder for trailing
1342         return type.
1344 2015-06-24  Patrick Palka  <ppalka@gcc.gnu.org>
1346         Revert:
1347         2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
1349         PR c++/30044
1350         * parser.c (cp_parser_template_parameter_list): Update
1351         current_template_parms right after processing a paramater.
1352         * pt.c (template_parms_to_args): Remove obsolete hack for
1353         giving template template arguments the proper level.
1354         (check_default_tmpl_args): Account for tested template
1355         parameter_lists.
1356         (splite_late_return_type): Remove obsolete hack for giving
1357         template template arguments the proper level.
1359 2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
1361         PR c++/65811
1362         * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
1364 2015-06-23  Patrick Palka  <ppalka@gcc.gnu.org>
1366         PR c++/30044
1367         * parser.c (cp_parser_template_parameter_list): Update
1368         current_template_parms right after processing a paramater.
1369         * pt.c (template_parms_to_args): Remove obsolete hack for
1370         giving template template arguments the proper level.
1371         (check_default_tmpl_args): Account for tested template
1372         parameter_lists.
1373         (splite_late_return_type): Remove obsolete hack for giving
1374         template template arguments the proper level.
1376 2015-06-23  Jason Merrill  <jason@redhat.com>
1378         PR c++/65879
1379         * decl.c (grokfndecl): Check the linkage of ctype, not just
1380         TYPE_ANONYMOUS_P.
1381         * tree.c (no_linkage_check): Skip the 'this' pointer.
1383         PR c++/66501
1384         * class.c (type_has_nontrivial_assignment): New.
1385         * init.c (build_vec_init): Use it.
1386         * cp-tree.h: Declare it.
1387         * method.c (trivial_fn_p): Templates aren't trivial.
1389         PR c++/66542
1390         * decl.c (expand_static_init): Make sure the destructor is callable
1391         here even if we have an initializer.
1393 2015-06-04  Pierre-Marie de Rodat  <derodat@adacore.com>
1395         * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
1396         -fdump-ada-spec is passed.
1398 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
1400         * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
1402 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
1404         * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
1406 2015-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
1408         * decl.c (grokdeclarator): Remove pointless code.
1410 2015-06-22  Jason Merrill  <jason@redhat.com>
1412         PR c++/66515
1413         * call.c (implicit_conversion): Only reshape for classes.
1415 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
1417         * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
1418         manually swapping.
1419         * semantics.c (finish_omp_atomic): Likewise.
1420         * typeck.c (cp_build_array_ref): Likewise.
1422 2015-06-20  Mikhail Maltsev  <maltsevm@gmail.com>
1424         PR c++/65882
1425         * call.c (build_new_op_1): Check tf_warning flag in all cases.
1427 2015-06-19  Jason Merrill  <jason@redhat.com>
1429         PR c++/66585
1430         * pt.c (instantiate_class_template_1): Clear
1431         cp_unevaluated_operand and c_inhibit_evaluation_warnings.
1433         PR c++/65880
1434         * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
1435         cv-qualifiers.
1436         * typeck.c (merge_types): build_ptrmemfunc_type before applying
1437         quals and attributes.
1439         PR c++/65973
1440         * constexpr.c (build_constexpr_constructor_member_initializers):
1441         Handle an empty STATEMENT_LIST.
1443         PR c++/65843
1444         * pt.c (tsubst_copy_and_build): Register a capture proxy in
1445         local_specializations.
1447 2015-06-17  Jason Merrill  <jason@redhat.com>
1449         PR c++/66001
1450         * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
1451         TRY_FINALLY_EXPR.
1452         (potential_constant_expression_1): Likewise.
1454 2015-06-17  Jason Merrill  <jason@redhat.com>
1456         PR c++/66515
1457         * call.c (implicit_conversion): Call reshape_init here, early.
1458         (build_aggr_conv): Not here.
1460 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
1462         PR c++/66571
1463         * pt.c (tsubst_omp_clause_decl): New function.
1464         (tsubst_omp_clauses): Use it or tsubst_copy instead of
1465         tsubst_expr on OMP_CLAUSE_DECL.
1467 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1469         * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
1470         * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
1471         * decl.c (grokdeclarator, xref_tag_1): Likewise.
1472         * error.c (dump_aggr_type): likewise.
1473         * pt.c (push_template_decl_real): Likewise.
1474         * name-lookup.c (make_anon_name): Use anon_aggrname_format.
1476 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1478         * call.c: Do not include input.h, line-map.h or is-a.h.
1479         * class.c: Likewise.
1480         * constexpr.c: Likewise.
1481         * cp-array-notation.c: Likewise.
1482         * cp-gimplify.c: Likewise.
1483         * cp-lang.c: Likewise.
1484         * cp-objcp-common.c: Likewise.
1485         * cp-tree.h: Likewise.
1486         * cp-ubsan.c: Likewise.
1487         * cvt.c: Likewise.
1488         * decl.c: Likewise.
1489         * decl2.c: Likewise.
1490         * dump.c: Likewise.
1491         * error.c: Likewise.
1492         * except.c: Likewise.
1493         * expr.c: Likewise.
1494         * friend.c: Likewise.
1495         * init.c: Likewise.
1496         * lambda.c: Likewise.
1497         * lex.c: Likewise.
1498         * mangle.c: Likewise.
1499         * method.c: Likewise.
1500         * name-lookup.c: Likewise.
1501         * optimize.c: Likewise.
1502         * parser.c: Likewise.
1503         * pt.c: Likewise.
1504         * ptree.c: Likewise.
1505         * repo.c: Likewise.
1506         * rtti.c: Likewise.
1507         * search.c: Likewise.
1508         * semantics.c: Likewise.
1509         * tree.c: Likewise.
1510         * typeck.c: Likewise.
1511         * typeck2.c: Likewise.
1512         * vtable-class-hierarchy.c: Likewise.
1514 2015-06-16  Paolo Carlini  <paolo.carlini@oracle.com>
1516         PR c++/59682
1517         * parser.c (cp_parser_new_placement): Reject an empty expression-list.
1519 2015-06-16  Jason Merrill  <jason@redhat.com>
1521         PR c++/66536
1522         * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
1523         mismatch.
1525         PR c++/58063
1526         * tree.c (bot_manip): Remap SAVE_EXPR.
1528         PR c++/66387
1529         * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
1531 2015-06-15  Nathan Sidwell  <nathan@acm.org>
1533         PR c++/58583
1534         * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
1535         * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
1536         protect it from recursive instantiation.
1538 2015-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
1540         PR c++/51048
1541         * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
1542         using a local type is pure virtual.
1544 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1546         * call.c: Remove comment documenting the long-deleted
1547         function build_method_call.
1549 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
1551         PR c++/65168
1552         * typeck.c (cp_build_binary_op): Warn when comparing an address
1553         of a reference against NULL.
1555 2015-06-12  Jason Merrill  <jason@redhat.com>
1557         PR c++/65719
1558         * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
1559         variables as DECL_NOT_REALLY_EXTERN.
1561 2015-06-11  Jason Merrill  <jason@redhat.com>
1563         PR c++/66445
1564         * constexpr.c (potential_constant_expression_1): Handle a
1565         DECL_EXPR of TYPE_DECL.
1567         PR c++/66450
1568         * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
1569         ctx->ctor.
1571 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1573         * decl.c (cxx_init_decl_processing): Register the main
1574         translation unit through the new debug hook.
1576 2015-06-10  Jason Merrill  <jason@redhat.com>
1578         PR c++/66289
1579         * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
1580         * pt.c (push_template_decl_real): Set it.
1581         (dependent_alias_template_spec_p): Use it.
1582         (dependent_type_p_r): Use dependent_alias_template_spec_p.
1583         (uses_all_template_parms_data, uses_all_template_parms_r)
1584         (complex_alias_template_p): New.
1585         (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
1587 2015-06-09  Jason Merrill  <jason@redhat.com>
1589         DR 1467
1590         PR c++/51747
1591         * typeck2.c (digest_init_r): Replace previous change with
1592         gcc_unreachable.
1594         PR c++/66387
1595         * semantics.c (process_outer_var_ref): Make sure the value is
1596         actually constant before returning it.
1597         * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
1598         array.
1600 2015-06-09  Paolo Carlini  <paolo.carlini@oracle.com>
1602         PR c++/65815
1603         * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
1604         * init.c (expand_default_init): Likewise.
1606 2015-06-09  Jason Merrill  <jason@redhat.com>
1608         PR c++/66383
1609         * tree.c (replace_placeholders_r): Handle placeholders for an
1610         outer object.
1611         * typeck2.c (store_init_value): Only replace_placeholders for
1612         objects of class type.
1614 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1616         * call.c : Adjust include files.
1617         * class.c : Likewise.
1618         * constexpr.c : Likewise.
1619         * cp-array-notation.c : Likewise.
1620         * cp-cilkplus.c : Likewise.
1621         * cp-gimplify.c : Likewise.
1622         * cp-lang.c : Likewise.
1623         * cp-objcp-common.c : Likewise.
1624         * cp-tree.h : Likewise.
1625         * cp-ubsan.c : Likewise.
1626         * cvt.c : Likewise.
1627         * decl.c : Likewise.
1628         * decl2.c : Likewise.
1629         * dump.c : Likewise.
1630         * error.c : Likewise.
1631         * except.c : Likewise.
1632         * expr.c : Likewise.
1633         * friend.c : Likewise.
1634         * init.c : Likewise.
1635         * lambda.c : Likewise.
1636         * lex.c : Likewise.
1637         * mangle.c : Likewise.
1638         * method.c : Likewise.
1639         * name-lookup.c : Likewise.
1640         * optimize.c : Likewise.
1641         * parser.c : Likewise.
1642         * pt.c : Likewise.
1643         * ptree.c : Likewise.
1644         * repo.c : Likewise.
1645         * rtti.c : Likewise.
1646         * search.c : Likewise.
1647         * semantics.c : Likewise.
1648         * tree.c : Likewise.
1649         * typeck.c : Likewise.
1650         * typeck2.c : Likewise.
1651         * vtable-class-hierarchy.c : Likewise.
1653 2015-06-05  Jason Merrill  <jason@redhat.com>
1655         PR c++/66405
1656         * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1657         the expansion has extra args.
1658         (use_pack_expansion_extra_args_p): Return true in that case.
1660         PR c++/66405
1661         * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1662         dependent even if it has a type.
1664 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1666         * cp-objcp-common.c: Adjust comment for
1667         cxx_warn_unused_global_decl.
1668         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
1669         (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
1670         * cp-tree.h (note_mangling_alias): Protoize.
1671         (cp_write_global_declarations): Remove.
1672         (cxx_post_compilation_parsing_cleanups): Protoize.
1673         * decl.c (wrapup_globals_for_namespace): Remove use of DATA
1674         argument.
1675         * decl2.c (mangling_aliases): New global.
1676         (build_java_method_aliases): New.  Adapted from
1677         collect_candidates_for_java_method_aliases.
1678         (collect_candidates_for_java_method_aliases): Remove.
1679         (build_java_method_aliases): Remove.
1680         (generate_mangling_aliases): New.
1681         (note_mangling_alias): New.  Moved from mangle_decl.
1682         (locus_at_end_of_parsing): New global.
1683         (c_parse_final_cleanups): Rename from
1684         cp_write_global_declarations.
1685         Use locus_at_end_of_parsing.
1686         Call generate_mangling_aliases.
1687         Rename call to collect_candidates_for_java_method_aliases into
1688         build_java_method_aliases.
1689         Remove call to finalize_compilation_unit.
1690         Move vtable handling into cxx_post_compilation_parsing_cleanups.
1691         Do not call check_global_declarations or
1692         emit_debug_global_declarations.
1693         (cxx_post_compilation_parsing_cleanups): New.
1694         * mangle.c (mangle_decl): Move code to note_mangling_alias.
1695         * name-lookup.c (do_namespace_alias): Call early_global_decl.
1697 2015-06-05  Nathan Sidwell  <nathan@acm.org>
1699         PR c++/52595
1700         * parser.c (cp_parser_cache_defarg): Continue looking for
1701         declarators when scanning a potential template argument list of an
1702         NSDMI.
1704 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1706         * call.c: Adjust includes for restructured coretypes.h.
1707         * class.c: Likewise.
1708         * constexpr.c: Likewise.
1709         * cp-array-notation.c: Likewise.
1710         * cp-gimplify.c: Likewise.
1711         * cp-lang.c: Likewise.
1712         * cp-objcp-common.c: Likewise.
1713         * cp-tree.h: Likewise.
1714         * cp-ubsan.c: Likewise.
1715         * cvt.c: Likewise.
1716         * decl.c: Likewise.
1717         * decl2.c: Likewise.
1718         * dump.c: Likewise.
1719         * error.c: Likewise.
1720         * except.c: Likewise.
1721         * expr.c: Likewise.
1722         * friend.c: Likewise.
1723         * init.c: Likewise.
1724         * lambda.c: Likewise.
1725         * lex.c: Likewise.
1726         * mangle.c: Likewise.
1727         * method.c: Likewise.
1728         * name-lookup.c: Likewise.
1729         * optimize.c: Likewise.
1730         * parser.c: Likewise.
1731         * pt.c: Likewise.
1732         * ptree.c: Likewise.
1733         * repo.c: Likewise.
1734         * rtti.c: Likewise.
1735         * search.c: Likewise.
1736         * semantics.c: Likewise.
1737         * tree.c: Likewise.
1738         * typeck.c: Likewise.
1739         * typeck2.c: Likewise.
1740         * vtable-class-hierarchy.c: Likewise.
1742 2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1744         PR c++/66192
1745         PR target/66200
1746         * cp-tree.h (get_guard_cond): Adjust declaration
1747         * decl.c (expand_static_init): Use atomic load acquire
1748         and adjust call to get_guard_cond.
1749         * decl2.c (build_atomic_load_byte): New function.
1750         (get_guard_cond): Handle thread_safety.
1751         (one_static_initialization_or_destruction): Adjust call to
1752         get_guard_cond.
1754 2015-06-03  Jason Merrill  <jason@redhat.com>
1756         PR c++/44282
1757         * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
1758         (write_CV_qualifiers_for_type): Set G.need_abi_warning.
1759         (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
1760         * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
1762 2015-06-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1763             Paolo Carlini  <paolo.carlini@oracle.com>
1765         PR c++/66130
1766         * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
1767         use it in the diagnostic.
1768         (decay_conversion): Adjust call.
1769         * semantics.c (finish_decltype_type): Likewise.
1770         * call.c (resolve_args, build_new_op_1,
1771         perform_implicit_conversion_flags): Adjust calls.
1772         * cvt.c (ocp_convert, convert_to_void): Likewise.
1773         * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
1775 2015-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1777         * decl.c (check_tag_decl): Use declspecs->locations as locations in
1778         error_at and warning_at calls.
1780 2015-06-03  Marek Polacek  <polacek@redhat.com>
1782         PR sanitizer/66190
1783         * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1784         (cp_genericize_r): Don't instrument static initializers.
1785         (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1787 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
1789         * decl.c (start_function): Call plugin before parsing.
1790         (finish_function): Call plugin after parsing.
1792 2015-06-02  Patrick Palka <patrick@parcs.ath.cx>
1794         * cp-tree.h (init_error): Remove declaration.
1795         * error.c (scratch_pretty_printer): Rename to ...
1796         (actual_pretty_printer): ... this.
1797         (cxx_pp): Constify and update accordingly.
1798         (init_error): Remove definition.
1799         * lex.c (cxx_init): Do not call init_error.
1801 2015-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
1803         PR c++/61683
1804         * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
1806 2015-06-01  Jason Merrill  <jason@redhat.com>
1808         PR c++/65942
1809         * decl2.c (mark_used): Don't always instantiate constexpr fns.
1810         * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1812         PR c++/44282
1813         * mangle.c (attr_strcmp): New.
1814         (write_CV_qualifiers_for_type): Also write out attributes that
1815         affect type identity.
1816         (write_type): Strip all attributes after writing qualifiers.
1818 2015-05-31  Jason Merrill  <jason@redhat.com>
1820         * constexpr.c (cxx_eval_indirect_ref): Try folding first.
1822         PR c++/66320
1823         * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1824         with the wrong type as non-constant.
1826 2015-05-27  Jason Merrill  <jason@redhat.com>
1828         * decl.c (check_redeclaration_exception_specification): Depend on
1829         -Wsystem-headers rather than -pedantic.
1831         * decl.c (warn_extern_redeclared_static): Use the location of
1832         newdecl in diagnostics, not input_location.
1833         (validate_constexpr_redeclaration): Likewise.
1834         (check_redeclaration_no_default_args): Likewise.
1835         (duplicate_decls): Likewise.
1836         (check_redeclaration_exception_specification): Likewise.
1837         Change second diagnostic to inform.
1839 2015-05-24  Nathan Sidwell  <nathan@acm.org>
1841         PR c++/66243
1842         * decl.c (build_enumerator): Don't silently convert scoped enums.
1844 2015-05-24  Jan Hubicka  <hubicka@ucw.cz>
1846         PR lto/66180
1847         * mangle.c (mangle_decl): Mangle anonymous namespace types as
1848         "<anon>".
1850 2015-05-23  Nathan Sidwell  <nathan@acm.org>
1852         PR c++/65936
1853         * pt.c (lookup_template_class_1): Copy may_alias attribute too.
1855 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1857         * Make-lang.in (check_g++_parallelize): Update comment.
1859 2015-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1861         PR c++/65598
1862         * decl.c (grokdeclarator): Use the correct location in error
1863         messages about 'explicit'.
1865 2015-05-22  Marek Polacek  <polacek@redhat.com>
1866             Edward Smith-Rowland  <3dw4rd@verizon.net>
1868         PR c/47043
1869         * cp-tree.h (build_enumerator): Update declaration.
1870         * decl.c (build_enumerator): Add attributes parameter.  Call
1871         cplus_decl_attributes.
1872         * init.c (constant_value_1): Pass tf_none to mark_used.
1873         * parser.c (cp_parser_enumerator_definition): Parse attributes and
1874         pass them down to build_enumerator.
1875         * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
1876         * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
1878 2015-05-21  Nathan Sidwell  <nathan@acm.org>
1880         PR c++/60943
1881         * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
1883 2015-05-21  Marek Polacek  <polacek@redhat.com>
1885         * typeck.c (warn_args_num): Don't print "declare here" for builtins.
1887 2015-05-20  Jason Merrill  <jason@redhat.com>
1889         * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1890         before register_specialization.
1892         * decl.c (grok_op_properties): Don't complain about size_t
1893         placement delete here.
1894         * call.c (second_parm_is_size_t): Split out from...
1895         (non_placement_deallocation_fn_p): ...here.
1896         (build_op_delete_call): Warn about size_t placement delete with
1897         -Wc++14-compat.
1899 2015-05-19  Nathan Sidwell  <nathan@acm.org>
1901         PR c++/65954
1902         * typeck.c (finish_class_member_access_expr): Diagnose failed
1903         lookup of enum class member.
1905 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1907         PR middle-end/66199
1908         * parser.c (cp_parser_omp_for_loop): Don't add
1909         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1910         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1911         (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1912         constructs.
1914 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1916         * typeck.c (composite_pointer_type): Use std::swap instead of explicit
1917         swaps.
1919 2015-05-18  Jason Merrill  <jason@redhat.com>
1921         * pt.c (retrieve_specialization): Make sure our arguments have
1922         gone through strip_typedefs.
1924         * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1925         (determine_specialization): Call coerce_template_parms.
1927         DR 1391
1928         * pt.c (type_unification_real): Check convertibility here.
1929         (unify_one_argument): Not here.
1931         * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1932         (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1933         [TREE_LIST]: Fix no-change case.
1935         * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
1937 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1939         PR fortran/44054
1940         * error.c (cp_diagnostic_starter): Use diagnostic_location
1941         function.
1942         (cp_print_error_function): Likewise.
1943         (cp_printer): Replace locus pointer with accessor function.
1945 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
1947         * parser.c (cp_parser_selection_statement): Add location and
1948         guard_kind arguments to calls to
1949         cp_parser_implicitly_scoped_statement.
1950         (cp_parser_iteration_statement): Likewise for calls to
1951         cp_parser_already_scoped_statement.
1952         (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
1953         "guard_kind" params; use them to warn for misleading
1954         indentation.
1955         (cp_parser_already_scoped_statement): Likewise.
1957 2015-05-11  Jan Hubicka  <hubicka@ucw.cz>
1959         * class.c (fixup_type_variants): Do not copy TYPE_METHODS
1960         (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
1961         * semantics.c (finish_member_declaration): Likewise.
1962         * method.c (lazily_declare_fn): Allways add method to main variant list.
1964 2015-05-09  Aldy Hernandez  <aldyh@redhat.com>
1966         PR bootstrap/66085
1967         * decl2.c (note_mangling_alias): Declare arguments as unused.
1969 2015-05-08  Jason Merrill  <jason@redhat.com>
1971         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
1972         -Wc++0x-compat.
1974 2015-05-08  Jason Merrill  <jason@redhat.com>
1976         * decl2.c (mangling_aliases): New variable.
1977         (note_mangling_alias, generate_mangling_aliases): New.
1978         (cp_write_global_declarations): Call generate_mangling_aliases.
1979         (generate_mangling_alias): Split out from...
1980         * mangle.c (mangle_decl): ...here.
1981         * cp-tree.h: Declare note_mangling_alias.
1983 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
1985         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
1986         (build_java_method_aliases): Adapt to use create_same_body_alias
1987         instead of assemble_alias.  Move variable declarations to
1988         definition and tidy up.
1989         (cp_write_global_declarations): Call build_java_method_aliases
1990         instead of collecting candidates first.
1992 2015-05-07  Jason Merrill  <jason@redhat.com>
1994         PR c++/59012
1995         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1996         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1997         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1998         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1999         (apply_late_template_attributes): Handle attribute pack expansion.
2001 2015-05-07  Marek Polacek  <polacek@redhat.com>
2003         PR c/65179
2004         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
2005         value.
2007 2015-05-07  Jason Merrill  <jason@redhat.com>
2009         DR 1467
2010         PR c++/51747
2011         * typeck2.c (digest_init_r): Fix single element list.
2013 2015-05-05  Jason Merrill  <jason@redhat.com>
2015         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
2016         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
2017         MUST_NOT_THROW_EXPR.
2018         (cp_genericize_data): Add try_block field.
2019         (cp_genericize_tree): Initialize it.
2020         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
2021         implicit rethrow.
2023         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
2024         Return false.
2026         * semantics.c (finish_call_expr): Check complain.
2028         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
2029         maybe-in-charge constructor.
2031         * decl.c (start_decl): Don't push the plain VAR_DECL for a
2032         variable template.
2034         DR 1518
2035         DR 1630
2036         PR c++/54835
2037         PR c++/60417
2038         * call.c (convert_like_real): Check value-initialization before
2039         explicit.
2040         * typeck2.c (process_init_constructor_record): Don't set
2041         CONSTRUCTOR_IS_DIRECT_INIT.
2042         (process_init_constructor_array): Likewise.
2043         * init.c (build_vec_init): Likewise.
2045 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
2047         * parser.c (cp_parser_asm_definition): Only test for
2048         error_mark_node if "outputs" was just set.  Likewise for "inputs".
2050 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
2051             Jakub Jelinek  <jakub@redhat.com>
2053         PR c++/66007
2054         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
2055         result in an actual error.
2057 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2058             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
2060         PR c++/65858
2061         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
2062         false.
2064 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
2066         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
2067         trailing semicolon.
2069 2015-04-29  Jason Merrill  <jason@redhat.com>
2071         PR c++/50800
2072         * tree.c (apply_identity_attributes): Fix handling of classes.
2074 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2076         * parser.c (cp_parser_oacc_enter_exit_data): Use
2077         OMP_STANDALONE_CLAUSES.
2079 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
2081         PR c++/64667
2082         * init.c (perform_member_init): Handle references for -Winit-self.
2084 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
2086         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
2087         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
2089 2015-04-28  Jason Merrill  <jason@redhat.com>
2091         PR c++/65896
2092         * constexpr.c (cxx_eval_store_expression): Don't try to actually
2093         store an empty class.
2095         PR c++/65656
2096         * constexpr.c (cxx_eval_builtin_function_call): Fix
2097         __builtin_constant_p.
2099         PR c++/50800
2100         * tree.c (strip_typedefs): Add remove_attributes parm.
2101         (strip_typedefs_expr): Likewise.
2102         (apply_identity_attributes): New subroutine of strip_typedefs.
2103         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
2104         (convert_nontype_argument, unify): Likewise.
2105         * cp-tree.h: Adjust.
2107         PR c++/65734
2108         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
2110 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
2112         * class.c (layout_class_type): Remove check if
2113         PCC_BITFIELD_TYPE_MATTERS is defined.
2115 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
2117         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
2119 2015-04-24  Jason Merrill  <jason@redhat.com>
2121         PR c++/50800
2122         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
2124         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
2125         Remove obsolete code.
2126         [NE_EXPR]: Likewise.
2128 2015-04-23  Jason Merrill  <jason@redhat.com>
2130         PR c++/65646
2131         * pt.c (check_explicit_specialization): Don't
2132         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
2133         headers.
2134         * decl.c (grokvardecl): Revert earlier fix.
2136 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
2138         PR c++/65801
2139         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
2140         suppresses the diagnostic.
2142 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
2144         Reject trailing return type for an operator auto().
2145         * decl.c (grokdeclarator): Reject trailing return types for
2146         all conversion operators, don't handle conversion operators
2147         in the previous checks that deal with auto.
2149 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2151         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
2153 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
2155         * class.c (resolve_address_of_overloaded_function, instantiate_type):
2156         Rename tsubst_flags_t parameter flags -> complain.
2158 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
2160         * call.c (build_op_delete_call, build_over_call): Check mark_used
2161         return value.
2162         * class.c (resolve_address_of_overloaded_function): Likewise.
2163         * decl.c (cxx_maybe_build_cleanup): Likewise.
2164         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
2165         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
2166         * rtti.c (build_dynamic_cast_1): Likewise.
2167         * semantics.c (process_outer_var_ref): Likewise.
2168         * typeck.c (build_class_member_access_expr,
2169         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
2171 2015-04-15  Jason Merrill  <jason@redhat.com>
2173         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
2174         (build_constexpr_constructor_member_initializers): Loop to find
2175         the BIND_EXPR.
2176         * decl.c (start_preparsed_function): Clobber the object at the
2177         beginning of a constructor.
2179         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
2180         * method.c (implicitly_declare_fn): Likewise.
2181         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
2183         * decl2.c (determine_visibility): Use get_template_info.
2185 2015-04-15  Jason Merrill  <jason@redhat.com>
2186             Marek Polacek  <polacek@redhat.com>
2188         PR c++/65727
2189         * lambda.c (lambda_expr_this_capture): In unevaluated context go
2190         through the normal loop, just don't capture.
2191         (maybe_resolve_dummy): Handle null return.
2193 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
2195         * call.c (enforce_access): Emit error + inform.
2197 2015-04-15  Marek Polacek  <polacek@redhat.com>
2199         * constexpr.c (use_new_call): Remove #define.
2200         (lookup_parameter_binding): Remove function.
2201         (cxx_bind_parameters_in_call): Remove unused code.
2202         (cxx_eval_call_expression): Likewise.
2203         (cxx_eval_constant_expression): Likewise.
2205 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
2207         * tree.c (replace_placeholders_t): Remove unused type.
2208         (replace_placeholders): Remove unused pset.
2210 2015-04-14  Jason Merrill  <jason@redhat.com>
2212         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
2214         PR c++/65695
2215         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
2217         PR c++/65721
2218         * name-lookup.c (do_class_using_decl): Complain about specifying
2219         the current class even if there are dependent bases.
2221 2015-04-14  David Krauss  <david_work@me.com>
2223         PR c++/59766
2224         * decl.c (grokdeclarator): Do not flag friends with deduced return.
2226 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
2227             Jason Merrill  <jason@redhat.com>
2229         PR c++/60994
2230         * parser.c (cp_parser_class_name): Add enum_ok parameter.
2231         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
2232         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
2233         a class template.
2235 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
2237         PR c++/65736
2238         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
2239         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
2240         the expression to the original type at the end.
2242 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
2244         PR c++/65690
2245         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
2246         TYPE_USER_ALIGN.
2248         PR c++/65690
2249         * tree.c (build_cplus_array_type): Layout type before variants are
2250         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
2251         variant.
2253 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
2255         PR c++/64085
2256         * lambda.c (add_capture): Use dependent_type_p for capture by
2257         reference too.
2259 2015-04-02  Marek Polacek  <polacek@redhat.com>
2261         PR c++/65642
2262         * constexpr.c (cxx_eval_pointer_plus_expression): Call
2263         cxx_eval_constant_expression on the first operand.
2265 2015-04-01  Jason Merrill  <jason@redhat.com>
2267         PR c++/65625
2268         * decl.c (make_typename_type): Handle seeing a variable template.
2270 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2272         PR c++/56100
2273         * pt.c (instantiating_current_function_p): New.
2274         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
2275         * cp-tree.h (instantiating_current_function_p): Declare.
2277 2015-04-01  Jason Merrill  <jason@redhat.com>
2279         PR c++/65646
2280         * decl.c (grokvardecl): Don't call check_explicit_specialization
2281         for non-template members of a class template.
2283 2015-04-01  Marek Polacek  <polacek@redhat.com>
2285         PR c++/65554
2286         * class.c (finish_struct): Require that the second field of a
2287         user-defined initializer_list be of size type.
2289 2015-03-31  Marek Polacek  <polacek@redhat.com>
2291         PR c++/65390
2292         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
2293         checking for constness.
2295 2015-03-30  Marek Polacek  <polacek@redhat.com>
2297         PR c++/65398
2298         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
2299          *(&A[i] p+ j) => A[i + j] transformation here.
2300         (cxx_eval_pointer_plus_expression): New function.
2301         (cxx_eval_constant_expression): Use it here.
2303 2015-03-27  Tobias Burnus  <burnus@net-b.de>
2305         PR c/65586
2306         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
2307         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
2308         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
2309         -fopenmp-simd.
2311 2015-03-27  Marek Polacek  <polacek@redhat.com>
2313         PR c++/65556
2314         * semantics.c (finish_switch_cond): If the unlowered type is not an
2315         enum, use the type of the condition.
2317 2015-03-27  Jason Merrill  <jason@redhat.com>
2319         PR c++/65509
2320         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
2321         constants.
2323 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
2325         PR c++/65154
2326         * init.c (build_vec_init): Fix initializing aggregates
2327         with empty init list.
2329 2015-03-26  Jason Merrill  <jason@redhat.com>
2331         PR c++/65525
2332         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
2334 2015-03-25  Marek Polacek  <polacek@redhat.com>
2336         PR c++/65558
2337         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
2338         on an anonymous namespace.
2340 2015-03-25  Marek Polacek  <polacek@redhat.com>
2342         PR c++/61670
2343         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
2345 2015-03-24  Jason Merrill  <jason@redhat.com>
2347         PR c++/65046
2348         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
2349         * parser.c (cp_parser_namespace_definition): Don't set it.
2350         * name-lookup.c (handle_namespace_attrs): Check
2351         DECL_NAMESPACE_ASSOCIATIONS instead.
2353         PR c++/65498
2354         * pt.c (get_mostly_instantiated_function_type): Just return the
2355         type of the partially instantiated template in DECL_TI_TEMPLATE.
2357 2015-03-20  Marek Polacek  <polacek@redhat.com>
2359         PR c++/65398
2360         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
2361         A[i + j].
2363 2015-03-20  Marek Polacek  <polacek@redhat.com>
2365         PR c++/65072
2366         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
2367         variant.
2369 2015-03-19  Jason Merrill  <jason@redhat.com>
2371         PR c++/65046
2372         Automatically propagate ABI tags to variables and functions
2373         from their (return) type.
2374         * class.c (check_tag): Handle variables and functions.
2375         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
2376         (mark_or_check_tags): Likewise.
2377         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
2378         (check_abi_tags): Add single argument overload for decls.
2379         Handle inheriting tags for decls.
2380         * mangle.c (write_mangled_name): Call it.
2381         (mangle_return_type_p): Split out from write_encoding.
2382         (unmangled_name_p): Split out from write_mangled_name.
2383         (write_mangled_name): Ignore abi_tag on namespace.
2384         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
2385         * parser.c (cp_parser_namespace_definition): Set it.
2386         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
2387         about abi_tag attribute on non-inline namespace.
2388         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
2389         (handle_abi_tag_attribute): Allow tags on variables.
2391 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
2393         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
2394         attribute for DECL_EXTERNAL VAR_DECLs.
2396 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
2398         PR c++/65340
2399         * call.c (build_over_call): Pass the tsubst_flags_t argument to
2400         mark_used.
2401         * decl2.c (mark_used): Inline the require_deduced_type call and
2402         guard the error call.
2404 2015-03-16  Jason Merrill  <jason@redhat.com>
2406         PR c++/65061
2407         * parser.c (cp_parser_template_name): Call strip_using_decl.
2409 2015-03-16  Marek Polacek  <polacek@redhat.com>
2411         DR 1688
2412         PR c++/65327
2413         * decl.c (grokdeclarator): Allow volatile and constexpr together.
2415 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
2417         PR c++/65323
2418         * decl.c (check_default_argument): Don't call
2419         maybe_warn_zero_as_null_pointer_constant.
2421 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
2423         * cp-gimplify.c (simple_empty_class_p): New.
2424         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
2425         the code for empty class copies into simple_empty_class_p, and
2426         adapt it to handle COMPOUND_EXPRs.
2428 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
2430         PR c++/65370
2431         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
2432         only if the location of newdecl doesn't match the location of olddecl.
2434 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2436         PR c++/65127
2437         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
2438         is not a PARM_DECL.
2440 2015-03-10  Jason Merrill  <jason@redhat.com>
2442         PR c++/65333
2443         DR 1558
2444         * pt.c (dependent_type_p_r): Check both class and alias template args.
2446 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
2448         PR c/65120
2449         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
2450         before preparing arguments to warn_logical_not_parentheses.
2451         Use maybe_constant_value on rhs.
2453 2015-03-09  Jason Merrill  <jason@redhat.com>
2455         PR c++/65339
2456         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
2458 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
2460         PR c/65120
2461         * parser.c (cp_parser_binary_expression): Don't warn for
2462         !!x == y or !b == y where b is bool.
2464 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
2466         * ptree.c (cxx_print_lambda_node): New.
2467         (cxx_print_xnode): Handle LAMBDA_EXPR.
2469 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
2471         PR c++/65295
2472         * constexpr.c (cxx_eval_constant_expression): Remove assert in
2473         RESULT_DECL handling.
2475 2015-02-26  Marek Polacek  <polacek@redhat.com>
2477         PR c++/65202
2478         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
2479         a RETURN_EXPR if its operand is null.
2481 2015-02-25  Jason Merrill  <jason@redhat.com>
2483         PR c++/65209
2484         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
2485         DECL_COMDAT.
2486         (constrain_visibility_for_template): Handle reference arguments.
2488         PR debug/58315
2489         * decl.c (start_preparsed_function): Use create_artificial_label
2490         for cdtor_label.
2492 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
2493             Jakub Jelinek  <jakub@redhat.com>
2495         PR c++/65075
2496         * constexpr.c (check_constexpr_bind_expr_vars): Allow
2497         implicit typedefs for lambda types.
2499 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2501         PR c++/60894
2502         * decl.c (lookup_and_check_tag): Use strip_using_decl.
2504 2015-02-13  Jason Merrill  <jason@redhat.com>
2506         PR c++/65054
2507         * pt.c (template_args_equal): Look through conversions here.
2508         * tree.c (cp_tree_equal): Not here.
2510 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2512         PR c++/60211
2513         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
2514         pragma_external context.
2516 2015-02-13  Jason Merrill  <jason@redhat.com>
2518         PR c++/65051
2519         * call.c (reference_binding): Don't look for bad conversion
2520         if TO is incomplete.
2522 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
2524         PR c++/64970
2525         * decl.c (make_typename_type): Pass tsubst_flags_t argument
2526         to lookup_template_class.
2528 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
2530         PR ipa/65034
2531         * decl.c (start_preparsed_function): Use void_type_node instead
2532         of NULL_TREE as LABEL_DECL type.
2534 2015-02-12  Jason Merrill  <jason@redhat.com>
2536         PR c++/64898
2537         * mangle.c (write_mangled_name): Fix test for variable template
2538         instantiation.
2540         * decl.c (begin_destructor_body): Condition clobber on
2541         -flifetime-dse.
2543 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
2545         PR c++/64959
2546         * parser.c (lookup_literal_operator): Return all candidates.
2547         (cp_parser_userdef_char_literal): Simplify error handling.
2548         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
2549         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
2550         Also give higher priority to standard string UDL operator.
2552 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
2554         PR debug/55541
2555         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
2556         * decl.c (poplevel): If functionbody, try not to create an extra
2557         BLOCK for function body and use subblocks as that, if it is non-NULL
2558         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
2559         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
2561         PR sanitizer/64984
2562         * except.c (check_noexcept_r): Return NULL for internal
2563         calls.
2565 2015-02-10  Jason Merrill  <jason@redhat.com>
2567         PR c++/64994
2568         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
2570 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
2572         PR ipa/64982
2573         * method.c (use_thunk): Do not check for stdarg thunks.
2575 2015-02-06  Jason Merrill  <jason@redhat.com>
2577         PR c++/64899
2578         * init.c (build_vec_init): Handle default-initialized array with
2579         constexpr default constructor.
2581 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2583         PR c/64824
2584         PR c/64868
2585         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
2587 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
2589         PR c++/64877
2590         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
2591         for generated expressions.
2593 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
2595         PR c++/64901
2596         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
2597         DECL_OVERRIDE_P.
2599 2015-02-02  Jason Merrill  <jason@redhat.com>
2601         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
2603 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
2605         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
2606         changed to pass input_location as first argument.
2608 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
2610         PR c++/64717
2611         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
2612         into SAVE_EXPR.
2614 2015-01-29  Jason Merrill  <jason@redhat.com>
2616         PR c++/49508
2617         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
2618         erroneous return statement.
2620         PR c++/64521
2621         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
2622         point.
2624 2015-01-27  Caroline Tice  <cmtice@google.com>
2626         Committing VTV Cywin/Ming patch for Patrick Wollgast
2627         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
2628         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
2630 2015-01-27  Jason Merrill  <jason@redhat.com>
2632         PR c++/58597
2633         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
2634         current_function_decl.
2636         PR c++/63889
2637         * pt.c (finish_template_variable): Move from semantics.c.
2638         Handle multiple template arg levels.  Handle coercion here.
2639         (lookup_template_variable): Not here.
2641 2015-01-23  Jason Merrill  <jason@redhat.com>
2643         PR c++/64314
2644         PR c++/57510
2645         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
2646         that has been completely split out.
2648         PR c++/64701
2649         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
2650         statement codes.
2652         PR c++/64727
2653         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
2654         of CONST_DECL.
2656 2015-01-21  Jason Merrill  <jason@redhat.com>
2658         PR c++/64603
2659         * constexpr.c (cxx_eval_constant_expression): Only shortcut
2660         constant CONSTRUCTORs.
2662         PR c++/64647
2663         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
2664         give a hard error in a template instantiation.
2666 2015-01-21  Richard Biener  <rguenther@suse.de>
2668         PR middle-end/64313
2669         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
2670         for builtins the user declared correctly.
2672 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
2674         PR c++/58614
2675         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
2676         TREE_TYPE (elt) == error_mark_node.
2678 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
2680         PR tree-optimization/62053
2681         * tree.c (build_cplus_array_type): Layout type after variants are set.
2683 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
2685         * cp-gimplify.c (cp_genericize_r): Call
2686         cp_ubsan_maybe_instrument_member_call for member calls.
2687         (cp_ubsan_check_member_access_r): New function.
2688         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
2689         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
2690         cp_ubsan_instrument_member_accesses,
2691         cp_ubsan_maybe_instrument_downcast,
2692         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
2693         * cp-ubsan.c: New file.
2694         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
2695         * constexpr.c (cxx_eval_call_expression): Return void_node
2696         for IFN_UBSAN_VPTR.
2697         (potential_constant_expression_1): Return true for
2698         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
2699         * typeck.c (build_class_member_access_expr): Provide locus
2700         for COMPONENT_REFs.
2701         (build_static_cast_1): Instrument downcasts.
2702         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
2703         add ubsan instrumentation for virtual_access.
2704         * call.c: Include internal-fn.h.
2705         (set_flags_from_callee): Handle internal calls.
2707 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
2709         PR c++/59366
2710         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
2711         and function templates, declared only in the class.
2712         * decl.c (duplicate_decls): Reveal hidden friend functions or
2713         function templates, if they are redeclared outside the class.
2715 2015-01-15  Jason Merrill  <jason@redhat.com>
2717         PR c++/64356
2718         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
2720         PR c++/63283
2721         * constexpr.c (potential_constant_expression_1): Handle reference
2722         args in templates.
2724 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2725             James Norris  <jnorris@codesourcery.com>
2726             Cesar Philippidis  <cesar@codesourcery.com>
2727             Ilmir Usmanov  <i.usmanov@samsung.com>
2728             Jakub Jelinek  <jakub@redhat.com>
2730         * parser.c: Include "gomp-constants.h".
2731         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2732         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2733         Use OMP_CLAUSE_SET_MAP_KIND.
2734         (cp_parser_omp_construct, cp_parser_pragma): Handle
2735         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
2736         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
2737         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
2738         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
2739         "create", "delete", "deviceptr", "host", "num_gangs",
2740         "num_workers", "present", "present_or_copy", "pcopy",
2741         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2742         "present_or_create", "pcreate", "vector_length", "wait".
2743         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
2744         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2745         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2746         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2747         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
2748         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
2749         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
2750         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
2751         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
2752         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
2753         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
2754         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
2755         (cp_parser_oacc_parallel, cp_parser_oacc_update)
2756         (cp_parser_oacc_wait): New functions.
2757         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
2758         (finish_oacc_parallel): New prototypes.
2759         * semantics.c: Include "gomp-constants.h".
2760         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
2761         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
2762         OMP_CLAUSE_SET_MAP_KIND.
2763         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
2764         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
2765         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2766         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
2767         functions.
2769 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
2771         PR c++/58671
2772         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
2773         self-initialization.
2775 2015-01-13  Jason Merrill  <jason@redhat.com>
2777         PR c++/64356
2778         PR libstdc++/58777
2779         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
2780         pointer expressions.
2781         (cxx_eval_increment_expression): Likewise.
2783         PR c++/64514
2784         * pt.c (coerce_template_parameter_pack): Return NULL for a
2785         zero-length fixed parameter pack with a pack expansion arg.
2787         PR c++/64520
2788         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
2790 2015-01-12  Jason Merrill  <jason@redhat.com>
2792         PR c++/64547
2793         * constexpr.c (cxx_eval_call_expression): A call to a void
2794         function doesn't need to return a value.
2796 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2798         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2799         input.h, alias.h, symtab.h, options.h, fold-const.h,
2800         wide-int.h, and inchash.h due to flattening of tree.h.
2801         * class.c: Ditto.
2802         * constexpr.c: Ditto.
2803         * cp-array-notation.c: Ditto.
2804         * cp-gimplify.c: Ditto.
2805         * cp-lang.c: Ditto.
2806         * cp-objcp-common.c: Ditto.
2807         * cvt.c: Ditto.
2808         * decl2.c: Ditto.
2809         * decl.c: Ditto.
2810         * dump.c: Ditto.
2811         * error.c: Ditto.
2812         * except.c: Ditto.
2813         * expr.c: Ditto.
2814         * friend.c: Ditto.
2815         * init.c: Ditto.
2816         * lambda.c: Ditto.
2817         * lex.c: Ditto.
2818         * mangle.c: Ditto.
2819         * name-lookup.c: Ditto.
2820         * optimize.c: Ditto.
2821         * parser.c: Ditto.
2822         * pt.c: Ditto.
2823         * ptree.c: Ditto.
2824         * repo.c: Ditto.
2825         * rtti.c: Ditto.
2826         * search.c: Ditto.
2827         * semantics.c: Ditto.
2828         * tree.c: Ditto.
2829         * typeck2.c: Ditto.
2830         * typeck.c: Ditto.
2832 2015-01-08  Jason Merrill  <jason@redhat.com>
2834         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
2835         * decl.c (compute_array_index_type): Likewise.
2836         * init.c (build_vec_init): Likewise.
2837         * typeck.c (cp_build_binary_op): Likewise.
2839 2015-01-08  Jason Merrill  <jason@redhat.com>
2841         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
2842         whether an initializer-list is too big for a VLA.
2843         (throw_bad_array_length): Remove.
2844         * cp-tree.h: Remove prototype.
2846 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
2848         PR c++/60753
2849         * decl.c (grokfndecl): Add bool parameter.
2850         (grokdeclarator): Adjust calls.
2851         (start_decl): Don't set DECL_DELETED_FN here.
2853 2015-01-06  Jason Merrill  <jason@redhat.com>
2855         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
2856         template-ids.
2858         PR c++/64455
2859         * pt.c (type_dependent_expression_p): Handle variable templates.
2860         * constexpr.c (potential_constant_expression_1): Use it.
2862         PR c++/64487
2863         * semantics.c (finish_offsetof): Handle templates here.
2864         * parser.c (cp_parser_builtin_offsetof): Not here.
2866         PR c++/64496
2867         * semantics.c (process_outer_var_ref): Diagnose lambda in local
2868         class NSDMI.
2870 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2872         PR c++/64489
2873         * class.c (check_field_decls): Make copy assignment operators
2874         complex only in c++98 mode.
2876 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2878         PR c++/31397
2879         * class.c (check_for_override): Warn when a virtual function is an
2880         override not marked override.
2882 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
2884         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
2885         hold base_fndecls.
2886         (get_basefndecls): Adjust.
2888 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2890         Update copyright years.
2892 2015-01-05  Marek Polacek  <polacek@redhat.com>
2894         PR c/64423
2895         * typeck.c (cp_build_array_ref): Pass loc down to
2896         warn_array_subscript_with_type_char.
2899 Copyright (C) 2015 Free Software Foundation, Inc.
2901 Copying and distribution of this file, with or without modification,
2902 are permitted in any medium without royalty provided the copyright
2903 notice and this notice are preserved.