1 2017-05-24 Nathan Sidwell <nathan@acm.org>
3 * friend.c (do_friend): Remove check for existing decl.
4 * name-lookup.h (lookup_name_innermost_nonclass_level): Delete.
5 * name-lookup.c (push_local_binding): Directly look for binding.
6 (lookup_name_innermost_nonclass_level_1): Delete.
7 (lookup_name_innermost_nonclass_level): Delete.
9 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Alphabetize.
11 * cp-tree.h (cp_free_lang_data): Add extern.
12 (ovl_skip_hidden, is_overloaded_fn, really_overloaded_fn): Add
14 (type_unknown_p): Return bool, make inline, lose TREE_LIST check.
15 * typeck.c (type_unknown_p): Delete.
16 * tree.c (is_overloaded_fn): Use MAYBE_BASELINE_FUNCTIONS, adjust
18 (dependent_name): Likewise.
19 (decl_anon_ns_mem_p): Simplify.
21 2017-05-24 Jonathan Wakely <jwakely@redhat.com>
24 * tree.c (reshape_init): Use unqualified type for direct enum init.
25 * typeck.c (maybe_warn_about_cast_ignoring_quals): New.
26 (build_static_cast_1, build_reinterpret_cast_1): Strip cv-quals from
27 non-class destination types.
28 (build_const_cast_1): Strip cv-quals from destination types.
29 (build_static_cast, build_reinterpret_cast, build_const_cast)
30 (cp_build_c_cast): Add calls to maybe_warn_about_cast_ignoring_quals.
32 2017-05-24 Martin Sebor <msebor@redhat.com>
35 * call.c (fully_fold_internal): Adjust.
37 2017-05-24 Nathan Sidwell <nathan@acm.org>
39 * cp-tree.h (ovl_skip_hidden): Declare.
40 * tree.c (ovl_skip_hidden): New.
41 * name-lookup.c (arg_assoc_namespace): Call ovl_skip_hidden.
42 (lookup_arg_dependent_1): Likewise.
43 (ambiguous_decl): Use DECL_HIDDEN_P, ovl_skip_hidden.
44 (hidden_name_p, remove_hidden_names): Delete.
45 (lookup_name_real_1): Do not strip hidden names.
46 * name-lookup.h (hidden_name_p, remove_hidden_names): Delete.
48 * cp-tree.h (OVL_HIDDEN_P): New.
49 (ovl_iterator::hidden_p, ovl_iterator::reveal_node): New.
50 (ovl_iterator::reveal_node): Declare.
51 * tree.c (ovl_copy): Copy OVL_HIDDEN_P.
52 (ovl_insert): Order on hiddenness.
53 (ovl_iterator::reveal_node): New.
54 * name-lookup.c (anticipated_builtin_p): New.
55 (supplement_binding_1): Use it.
56 (set_local_extern_decl_linkage): Use hidden_p.
57 (do_pushdecl): Deal with unhiding a hidden decl, use
58 anticipated_builtin_p.
59 (do_nonmember_using_decl): Use anticipated_decl_p.
60 (lookup_name_real_1): Use DECL_HIDDEN_P.
62 2017-05-23 Jason Merrill <jason@redhat.com>
64 -Wunused and C++17 structured bindings
65 * decl.c (poplevel): Don't warn about unused structured bindings,
67 * error.c (dump_simple_decl): Handle structured bindings.
68 * expr.c (mark_exp_read): Look through DECL_VALUE_EXPR.
70 2017-05-23 Nathan Sidwell <nathan@acm.org>
72 * cp-tree.h (PUSH_GLOBAL, PUSH_LOCAL, PUSH_USING): Delete.
73 * name-lookup.c (create_local_binding): New.
74 (update_binding): New.
75 (pushdecl_maybe_friend_1): Rename to ...
76 (do_pushdecl): ... this. Reimplement.
78 (push_overloaded_decl_1, push_overloaded_decl): Delete.
80 2017-05-23 Jason Merrill <jason@redhat.com>
82 PR c++/80396 - built-in for make_integer_sequence.
83 * pt.c (builtin_pack_fn_p, builtin_pack_call_p)
84 (expand_integer_pack, expand_builtin_pack_call): New.
85 (find_parameter_packs_r): Check builtin_pack_call_p.
86 (check_for_bare_parameter_packs): Handle it.
87 (tsubst_pack_expansion): Call expand_builtin_pack_call.
88 (declare_integer_pack): New.
89 (init_template_processing): Call it.
90 * decl2.c (mark_used): Check builtin_pack_fn_p.
92 2017-05-23 Nathan Sidwell <nathan@acm.org>
94 * name-lookup.c (find_namespace_binding): New.
95 (pushdecl_maybe_friend_1): Use CP_DECL_CONTEXT.
96 (set_identifier_type_value_with_scope): Use find_namespace_binding.
97 (find_binding, cp_binding_level_find_binding_for_name,
98 binding_for_name, namespace_binding_1): Delete.
99 (push_overloaded_decl_1): Use CP_DECL_CONTEXT.
100 (get_namespace_binding, set_namespace_binding,
101 finish_namespace_using_decl, unqualified_namespace_lookup_1,
102 qualified_lookup_using_namespace, lookup_type_scope_1,
103 lookup_name_innermost_nonclass_level_1): Use find_namespace_binding.
106 * parser.c (cp_parser_template_id): Keep the lookup when stashing
109 * cp-tree.h (DECL_HIDDEN_P): New.
110 * name-lookup.c (set_decl_context,
111 set_local_extern_decl_linkage): New, broken out of ...
112 (pushdecl_maybe_friend_1): ... here. Call them.
114 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
116 * parser.c (OACC_KERNELS_CLAUSE_MASK): Add
117 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
120 2017-05-23 Nathan Sidwell <nathan@acm.org>
122 * cp-tree.h (OVL_P): New.
123 * name-lookup.h (push_local_binding): Delete.
124 (do_toplevel_using_decl, do_local_using_decl): Rename to ...
125 (finish_namespace_using_decl, finish_local_using_decl): ... here
126 * name-lookup.c (add_decl_to_level): Swap args.
127 (pop_bindings_and_leave_scope): Look inside TREE_LIST.
128 (diagnose_name_conflict): Check contexts are same for redecl.
129 (update_local_overload): New.
130 (compparms_for_decl_and_using): Rename to ...
131 (matching_fn_p): ... here.
132 (pushdecl_maybe_friend_1): Adjust add_decl_to_level,
133 push_local_bindings call.
134 (push_local_binding): Make static, replace FLAGS arg with
136 (validate_nonmember_using_decl): Use OVL_FIRST.
137 (do_nonmember_using_decl): Use in/out parameters. Use
138 lkp_iterator and simplify.
139 (do_toplevel_using_decl, do_local_using_decl): Rename to ...
140 (finish_namespace_using_decl, finish_local_using_decl): ... here.
142 (lookup_type_current_level): Delete.
143 * parser.c (cp_parser_using_declaration): Adjust.
144 * pt.c (tsubst_expr): Adjust.
146 2017-05-22 Nathan Sidwell <nathan@acm.org>
148 * name-lookup.h (parse_using_directive): Replace with ...
149 (finish_namespace_using_directive): ... this and ...
150 (finish_local_using_directive): ... this.
151 * name-lookup.c (add_using_namespace_1): Move later.
152 (add_using_namespace): Move later, add namespace_p arg, remove
154 (push_using_directive_1): Directly recurse.
155 (do_using_directive, parse_using_directive): Delete, split into ...
156 (finish_namespace_using_directive): ... this and ...
157 (finish_local_using_directive): ... this.
158 (push_namespace): Use add_using_namespace.
159 * parser.c (cp_parser_using_directive): Call
160 finish_namespace_using_directive or finish_local_using_directive.
161 * pt.c (tsubst_expr): Call finish_local_using_directive.
163 * cp-objcp-common.c (cp_register_dumps): Register raw dumper.
164 * cp-tree.h (raw_dump_id): Declare.
165 * decl2.c (raw_dump_id): Define.
166 (dump_tu): Use raw_dump_id.
168 * config-lang.in (gtfiles): Sort list, break lines.
170 * cp-tree.h (CPTI_TERMINATE, CPTI_CALL_UNEXPECTED): Rename to ...
171 (CPTI_TERMINATE_FN, CPTI_CALL_UNEXPECTED_FN): ... here.
172 ( CPTI_GET_EXCEPTION_PTR_FN, CPTI_BEGIN_CATCH_FN, CPTI_END_CATCH_FN,
173 CPTI_ALLOCATE_EXCEPTION_FN, CPTI_FREE_EXCEPTION_FN, CPTI_THROW_FN,
174 CPTI_RETHROW_FN): New.
175 (noexcept_deferred_spec): New.
176 (terminate_node, call_unexpected_node): Rename to ...
177 (terminate_fn, call_unexpected_fn): ... here.
178 (get_exception_ptr_fn, begin_catch_fn, end_catch_fn,
179 allocate_exception_fn, free_exception_fn, throw_fn, rethrow_fn): New.
180 * except.c (fn1..fn5, throw_fn, rethrow_rn, spec): Delete.
181 (init_exception_processing): Adjust.
182 (declare_library_fn): Create and push the fns here.
183 (do_get_exception_ptr, do_begin_catch, do_end_catch,
184 do_allocate_exception_ptr, do_free_exception_ptr): Adjust
185 declare_library_fn use.
186 (unevaluated_noexcept_spec): Adjust.
187 * cp-gimplify.c (genericize_eh_spec_block,
188 gimplify_most_not_throw_expr): Adjust.
190 * name-lookup.c (pushdecl_top_level,
191 pushdecl_top_level_and_finish): Move after namespace pushing and
193 (push_to_top_level): Rename to ...
194 (do_push_to_top_level): ... here. Remove timing code.
195 (pop_from_top_level_1): Rename to ...
196 (do_pop_from_top_level): ... here.
197 (do_push_nested_namespace, do_pop_nested_namespace)
198 (push_to_top_level): New wrapper for do_push_to_top_level.
199 (pop_from_top_level): Adjust.
200 (push_nested_namepace, pop_nested_namespace): Wrappers for workers.
202 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
204 * config-lang.in (gtfiles): Add c-family/c-format.c,
205 except.c, init.c, lambda.c and friend.c.
206 * class.c (dvirt_fn): Move out of function scope,
208 * except.c (fn1-5, throw_fn, rethrow_fn, spec): Likewise.
209 * init.c (fn): Likewise.
210 * lambda.c (ptr_id, max_id): Likewise.
211 * friend.c (global_friend): Add GTY attribute.
213 2017-05-19 Nathan Sidwell <nathan@acm.org>
215 * call.c (add_list_candidates): Use OVL_FIRST.
216 (build_new_method_call_1): Likewise.
217 * cp-tree.h (OVL_SINGLE_P): New.
218 (TYPE_HIDDEN_P): New.
219 * decl.c (xref_tag_1): Use TYPE_HIDDEN_P.
220 * dump.c (cp_tump_tree): Adjust overload dumping.
221 * error.c (dump_decl): Use OVL_SINGLE_P, simplify context
223 * method.c (lazily_declare_fn): Assert we added it.
224 * parser.c (cp_parser_nested_name_specifier): Use OVL_SINGLE_P,
226 (cp_parser_template_name): Use lkp_iterator.
227 * pt.c (begin_template_parm_list): Fixup comment.
228 (instantiate_class_template_1): Use TYPE_HIDDEN_P.
229 * tree.c (ovl_iterator::remove_node): Cope with inherited ctors.
230 (ovl_scope): Use lkp_iterator.
232 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
234 * parser.c (cp_parser_omp_clause_default): Handle
235 "OMP_CLAUSE_DEFAULT_PRESENT".
237 * parser.c (cp_parser_omp_clause_default): Avoid printing more
238 than one syntax error message.
240 2017-05-19 Nathan Sidwell <nathan@acm.org>
242 * class.c (class_dump_id): Define.
243 (dump_class_hierarchy, dump_vtable, dump_vtt): Use it.
244 * cp-objcp-common.c (cp_register_dumps): New.
245 * cp-objcp-common.h (cp_register_dumps): Declare.
246 (LANG_HOOKS_REGISTER_DUMPS): Override.
247 * cp-tree.h (class_dump_id): Declare.
249 2017-05-18 Nathan Sidwell <nathan@acm.org>
251 * cp-tree.h (OVL_ARG_DEPENDENT): Delete.
253 (lookup_keep): Declare.
254 * name-lookup.c (add_function): Don't set OVL_ARG_DEPENDENT.
255 * pt.c (tsubst_copy): Assert lookup is persistent.
256 * semantics.c (finish_call_expr): Use lkp_iterator, call
258 * tree.c (ovl_copy): New.
259 (ovl_insert, ovl_iterator::remove_node): Copy immutable nodes.
262 * cp-tree.h (OVL_USED): Replace with ...
263 (OVL_USING_P): ... this.
264 (ovl_iterator::using_p): Adjust.
265 * name-lookup.c (push_overloaded_decl_1,
266 do_nonmember_using_decl): Adjust.
267 * search.c (lookup_field_r): Adjust.
268 * tree.c (ovl_insert, ovl_scope): Adjust.
270 * cp-tree.h (lookup_add): Swap args.
271 (ovl_cons, build_overload): Delete.
272 * name-lookup.c (add_function, push_overloaded_decl_1,
273 do_nonmember_using_decl, merge_functions, remove_hidden_names):
274 Use lookup_add, ovl_insert.
275 * pt.c (check_explicit_specialization): Use lookup_add.
276 (do_class_deduction): Likewise. Refactor if.
277 * tree.c (lookup_add): Swap args.
278 (ovl_cons, build_overload): Delete.
280 * name-lookup.c (find_local_binding): New, broken out of ...
281 (lookup_name_innermost_nonclass_level_1): ... here. Call it.
282 (set_namespace_binding): Swap scope & name args.
283 (namespace_binding_1): Likewise.
284 (pushdecl_maybe_friend_1): Adjust set_namespace_binding call.
285 (push_overloaded_decl_1): Likewise.
286 (set_global_binding): Likewise.
287 (get_namespace_binding): Adjust namespace_binding_1 call.
289 2017-05-17 Nathan Sidwell <nathan@acm.org>
291 * cp-tree.h (default_hash_traits <lang_identifier *>): New
293 * name-lookup.c (lookup_extern_c_fun_in_all_ns): Delete.
294 (extern_c_fns): New hash table.
295 (check_extern_c_conflict): New, broken out of ...
296 (pushdecl_maybe_friend_1): ... here. Call it.
297 (c_linkage_bindings): Just look in hash table.
299 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
303 Implement new C++ intrinsics __is_assignable and __is_constructible.
304 * cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New.
306 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
307 CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
308 * method.c (constructible_expr): Set cp_unevaluated.
309 (is_xible_helper): New.
310 (is_trivially_xible): Adjust.
312 * parser.c (cp_parser_primary_expression): Handle
313 RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE.
314 (cp_parser_trait_expr): Likewise.
315 * semantics.c (trait_expr_value): Handle
316 CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
318 2017-05-17 Nathan Sidwell <nathan@acm.org>
320 * cp-tree.h (ovl_iterator::using_p): New predicate.
321 (ovl_iterator::remove_node): New worker.
322 (ovl_insert): Declare.
323 * tree.c (ovl_insert): New.
324 (ovl_iterator::remove_node): New.
325 * class.c (add_method): Use ovl_iterator, ovl_insert.
326 (clone_function_decl): Fix description.
327 (clone_constructors_and_destructors): Use ovl_iterator.
329 * class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator.
330 (maybe_warn_about_overly_private_class): Use ovl_iterator.
331 (method_name_cmp, resort_method_name_cmp): Use OVL_NAME.
332 (resort_type_method_vec, finish_struct_methods): Use OVL_FIRST.
333 (get_base_fndecls): Use ovl_iterator.
334 (warn_hidden): Use OVL_NAME, ovl_iterator.
335 (add_implicitly_declared_members): Use ovl_iterator.
336 * constraint.cc (normalize_template_id_expression): Use OVL_FIRST,
338 (finish_shorthand_constraint): Simplify, use ovl_make.
339 * pt.c (make_constrained_auto): Simplify. Use ovl_make.
340 * search.c (shared_member_p): Use ovl_iterator.
341 (lookup_field_fuzzy_info::fuzzy_lookup_fn): Use OVL_NAME.
342 (lookup_conversion_operator): Use OVL_FIRST.
343 (lookup_fnfiels_idx_nolazy): Use OVL_FIRST, OVL_NAME.
344 (look_for_overrides_here): Use ovl_iterator.
345 (lookup_conversions_r): Use OVL_FIRST, OVL_NAME, ovl_iterator.
346 * typeck.c (build_x_unary_op): Use ovl_make.
348 2017-05-17 Martin Liska <mliska@suse.cz>
350 * class.c (dump_class_hierarchy): Introduce dump_flags_t type and
351 use it instead of int type.
352 (dump_vtable): Likewise.
353 (dump_vtt): Likewise.
354 * decl2.c (dump_tu): Likewise.
356 2017-05-16 David Malcolm <dmalcolm@redhat.com>
358 * call.c (enforce_access): Add access_failure_info * param and use
359 it to record access failures.
360 * cp-tree.h (class access_failure_info): New class.
361 (enforce_access): Add access_failure_info * param, defaulting to
363 (lookup_member): Likewise.
364 (locate_field_accessor): New function decl.
365 (perform_or_defer_access_check): Add access_failure_info * param,
367 * search.c (lookup_member): Add access_failure_info * param and
368 pass it on to call to perform_or_defer_access_check.
369 (matches_code_and_type_p): New function.
370 (field_access_p): New function.
371 (direct_accessor_p): New function.
372 (reference_accessor_p): New function.
373 (field_accessor_p): New function.
374 (struct locate_field_data): New struct.
375 (dfs_locate_field_accessor_pre): New function.
376 (locate_field_accessor): New function.
377 * semantics.c (perform_or_defer_access_check): Add
378 access_failure_info * param, and pass it on to call to
380 * typeck.c (access_failure_info::record_access_failure): New method.
381 (access_failure_info::maybe_suggest_accessor): New method.
382 (finish_class_member_access_expr): Pass an access_failure_info
383 instance to the lookup_member call, and call its
384 maybe_suggest_accessor method afterwards.
386 2017-05-16 Marek Polacek <polacek@redhat.com>
390 * cp-gimplify.c (cp_fold): Handle SAVE_EXPR.
392 2017-05-16 Nathan Sidwell <nathan@acm.org>
394 * name-lookup.c (check_local_shadow): New, broke out of ...
395 (pushdecl_maybe_friend_1): ... here. Call it.
397 * cp-tree.h (OVL_NESTED_P, OVL_LOOKUP_P): New.
398 (ovl_first): Move inline definition to end of file.
399 (ovl_make, lookup_add): Declare.
400 (get_fns, get_first_fn): Make pure.
401 * tree.c (ovl_cache): New.
402 (ovl_make, lookup_add): New.
403 * pt.c (do_class_deduction): Don't add candidates that will be
406 * call.c (build_user_type_conversion_1): Use OVL_FIRST.
407 (print_error_for_call_failure): Use OVL_NAME.
408 (build_op_call_1): Use ovl_iterator.
409 (add_candidates): Use OVL_FIRST & lkp_iterator.
410 (build_op_delete_call): Use MAYBE_BASELINK_FUNCTIONS &
412 * class.c (deduce_noexcept_on_destructors): Use ovl_iterator.
413 (type_has_user_nondefault_constructor,
414 in_class_defaulted_default_constructor,
415 type_has_user_provided_constructor,
416 type_has_user_provided_or_explicit_constructor,
417 type_has_non_user_provided_default_constructor,
418 vbase_has_user_provided_move_assign,
419 type_has_move_constructor, type_has_move_assign,
420 type_has_user_declared_move_constructor,
421 type_has_user_declared_move_assign,
422 type_build_ctor_call, type_build_dtor_call,
423 type_requires_array_cookie, explain_non_literal_class): Likewise.
424 (finish_struct): Use lkp_iterator.
425 (resolve_address_of_overloaded_function): Use OVL_NAME, lkp_iterator.
426 (note_name_declared_in_class): Use OVL_NAME.
427 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use OVL_FIRST.
428 (pp_cxx_qualified_id, cxx_pretty_printer::id_expression,
429 cxx_pretty_printer::expression): Likewise.
430 * decl2.c (check_classfn): Use ovl_iterator.
431 * pt.c (retrieve_specialization): Use ovl_iterator.
432 * tree.c (cp_tree_equal): Use lkp_iterator.
433 (type_has_nontrivial_copy_init): Use ovl_iterator.
435 * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and
436 check is_overloaded_fn.
438 2017-05-16 Martin Liska <mliska@suse.cz>
440 * parser.c (cp_lexer_print_token): Add default value for flags
441 argument of print_gimple_stmt, print_gimple_expr,
442 print_generic_stmt and print_generic_expr.
444 2017-05-16 Nathan Sidwell <nathan@acm.org>
446 * cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD
448 (MAYBE_BASELINK_FUNCTIONS): New.
449 * constraint.cc (resolve_constraint_check): Use lkp_iterator.
450 * decl2.c (maybe_warn_sized_delete): Use ovl_iterator.
451 * lambda.c (maybe_generic_this_capture): Use lkp_iterator.
452 * method.c (inherited_ctor_binfo): Use ovl_iterator.
453 (binfo_inherited_from): Likewise.
454 * parser.c (lookup_literal_operator): Use lkp_iterator.
455 * pt.c (iterative_hash_template_arg): Use lkp_iterator.
456 (print_candidates_1): Likewise.
457 (determine_specialization): Likewise.
458 (resolve_overloaded_unification): Likewise.
459 (resolve_nondeduced_context): Likewise.
460 (type_dependent_expression_p): Likewise.
461 (dependent_template_p): Likewise.
462 * ptree.c (cxx_print_xnode): Likewise.
463 * semantics.c (omp_reduction_lookup): Use lkp_iterator.
464 (classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator.
465 * typeck.c (check_template_keyword): Use lkp_iterator.
467 * cp-tree.h (OVL_FIRST, OVL_NAME): New.
469 * constexpr.c (function_concept_check): Use OVL_FIRST.
470 * cvt.c (build_expr_type_conversion): Likewise.
471 * decl.c (poplevel, grokdeclarator): Use OVL_NAME.
472 * decl2.c (mark_used): Use OVL_FIRST.
473 * error.c (dump_decl): Use OVL_FIRST, OVL_NAME.
474 (dump_expr, location_of): Use OVL_FIRST.
475 * friend.c (do_friend): Use OVL_NAME.
476 * init.c (build_offset_ref): Use OVL_FIRST.
477 * mangle.c (write_member_name): Likewise.
478 (write_expression): Use OVL_NAME.
479 * method.c (strip_inheriting_ctors): Use OVL_FIRST.
480 * name-lookup.c (pushdecl_class_level): Use OVL_NAME.
481 * pt.c (check_explicit_specialization): Use OVL_FIRST.
482 (check_template_shadow): Likewise.
483 (tsubst_template_args): Use OVL_NAME.
484 (tsubst_baselink): Use OVL_FIRST.
485 * semantics.c (perform_koenig_lookup): Use OVL_NAME.
486 * tree.c (get_first_fn): Use OVL_FIRST.
487 * typeck.c (finish_class_member_access_expr): Use OVL_NAME.
488 (cp_build_addr_expr_1): Use OVL_FIRST.
490 * pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF
492 * semantics.c (finish_id_expression): Directly init local var.
493 (finish_omp_reduction_clause): Use really_overloaded_fn.
494 * tree.c (get_fns): Document. Assert we got an overload.
495 (get_first_fn) Document.
496 * typeck.c (cp_build_addr_expr_1): Pass arg directly to
497 really_overloaded_fn.
498 * typeck2.c (cxx_incomplete_type_diagnostic): Use get_first_fn directly.
500 * cp-tree.h (SCOPE_DEPTH): New.
501 * name-lookup.h (is_nested_namespace): Declare.
502 * name-lookup.c (is_nested_namespace): New.
503 (is_ancestor): Use it.
504 (set_decl_namespace): Likewise.
505 (push_namespace): Set SCOPE_DEPTH.
506 * pt.c (check_specialization_namespace): Use is_nested_namespace.
507 (check_unqualigied_spec_or_inst): Likewise.
509 2017-05-15 Nathan Sidwell <nathan@acm.org>
512 * cp-tree.h (DECL_NAMESPACE_INLINE_P): New.
513 * name-lookup.h (push_namespace): Return int, add make_inline arg.
514 * name-lookup.c (push_namespace): Deal with inline directly.
516 * parser.c (cp_parser_namespace_definition): Adjust for
517 push_namespace change.
519 2017-05-11 Nathan Sidwell <nathan@acm.org>
521 * cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS,
522 LANG_HOOKS_PUSHDECL): Move to ...
523 * cp-objcp-common.c (cp_get_global_decls, cp_pushdec,
524 LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here.
525 * cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare.
527 * name-lookup.h (pushdecl): Add default friend parm.
528 (pushdecl_maybe_friend): Delete.
529 (pushdecl_top_level): Add default friend parm.
530 (pushdecl_top_level_maybe_friend): Delete.
531 * name-lookup.c (pushdecl_maybe_friend): Delete.
532 (pushdecl): Add is_friend parm.
533 (pushdecl_top_level): Add is friend_parm.
534 (pushdecl_top_level_maybe_friend, pushdecl_top_level_1): Delete.
535 (pushdecl_top_level_and_finish): Do pushing and finishing directly.
536 * friend.c (do_friend): Adjust.
537 * pt.c (tsubst_friend_class): Adjust.
539 Revert pushdecl_top_level_and_finish name change.
540 * name-lookup.h (pushdecl_top_level_and_finish): Resurrect old name.
541 * name-lookup.c (pushdecl_top_level_and_finish): Likewise.
542 * decl.c (cp_make_fname_decl): Adjust.
543 * decl2.c (get_guard, handle_tls_init): Adjust.
544 * rtti.c (get_tinfo_decl, tinfo_base_init): Adjust.
546 * name-lookup.c (pushdecl_outermost_localscope): Always
547 conditionally stop timer.
549 * decl.c (xref_tag_1): Don't frob ts_lambda scope here.
550 * name-lookup.c (pushtag_1): Deal with ts_lambda scope.
552 * cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag,
553 pushtag_top_level_maybe_friend,
554 pushdecl_top_level_and_finish): Move declarations to ...
555 * name-lookup.h: ... here. Group pushdecl variants.
556 (pushdecl_top_level_and_finish): Rename to ...
557 (pushdecl_top_level_with_init): ... here.
558 * decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init.
559 * decl2.c (get_guard, handle_tls_init): Likewise.
560 * rtti.c (get_tinfo_decl, tinfo_base_init): Likewise.
561 * lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p.
562 * method.c (implicitly_declare_fn): Likewise.
563 * searchc (node_debug_info_needed): Likewise.
564 * name-lookup.c (pushdecl_top_level_and_finish): Rename to ...
565 (pushdecl_top_level_with_init): ... here.
566 (pop_everything): Use namespace_bindings_p.
568 * name-lookup.h (pop_binding): Rename to pop_local_binding.
569 (getdecls): Rename to get_local_decls.
570 * name-lookup.c (pop_binding): Rename to ...
571 (pop_local_binding): ... here.
572 (pop_bindings_and_leave_scope): Adjust.
573 (getdecls): Rename to ...
574 (get_local_decls): ... here. Assert local scope.
575 * decl.c (poplevel): Assert not namespace. Adjust and simplify
577 (store_parm_decls): Adjust get_local_decls call.
578 (parser.c (synthesize_implicit_template_parm): Likewise.
580 2017-05-11 Ville Voutilainen <ville.voutilainen@gmail.com>
583 * method.c (is_trivially_xible): Reject void types.
585 2017-05-10 Nathan Sidwell <nathan@acm.org>
587 * class.c (handle_using_decl): Always use OVL_CURRENT.
588 (resolve_address_of_overloaded_function): Move iterator decl into
589 for scope. Don't strip anticipated decls here.
591 * pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD
593 (print_candidates): Adjust.
595 * cp-tree.h (build_new_function_call): Lose koenig_p arg. Fix
597 * call.c (build_new_function_call): Lose koenig_p arg. Remove
598 koenig_p handling here.
599 * pt.c (push_template_decl_real): Unconditionally retrofit_lang_decl.
600 (tsubst_omp_clauses): Likewise.
601 (do_class_deduction): Adjust buld_new_function_call calls.
602 * semantics.c (finish_call_expr): Likewise.
604 2017-05-10 Jason Merrill <jason@redhat.com>
606 * pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch)
607 (unify_type_mismatch, unify_parameter_pack_mismatch)
608 (unify_ptrmem_cst_mismatch, unify_expression_unequal)
609 (unify_parameter_pack_inconsistent, unify_inconsistency)
610 (unify_vla_arg, unify_method_type_error, unify_arity)
611 (unify_arg_conversion, unify_no_common_base)
612 (unify_inconsistent_template_template_parameters)
613 (unify_template_deduction_failure)
614 (unify_template_argument_mismatch)
615 (unify_overload_resolution_failure): Call unify_invalid.
617 CWG 1847 - Clarifying compatibility during partial ordering
618 * pt.c (more_specialized_fn): No order between two non-deducible
621 * pt.c (dependent_type_p): Make sure we aren't called with
624 PR c++/79549 - C++17 ICE with non-type auto template parameter pack
625 * pt.c (convert_template_argument): Just return an argument pack.
626 (coerce_template_parameter_pack, template_parm_to_arg)
627 (extract_fnparm_pack, make_argument_pack, tsubst_template_args)
628 (tsubst_decl, tsubst, type_unification_real, unify_pack_expansion):
629 Don't set the type of a NONTYPE_ARGUMENT_PACK.
630 * parser.c (make_char_string_pack, make_string_pack): Likewise.
632 2017-05-10 Nathan Sidwell <nathan@acm.org>
634 * cp-tree.h (add_method, clone_function_decl): Change last arg to
636 * class.c (add_method): Change third arg to bool. Adjust.
637 (one_inheriting_sig, one_inherited_ctor): Adjust.
638 (clone_function_decl): Change 2nd arg to bool. Adjust.
639 (clone_constructors_and_destructors): Adjust.
640 * lambda.c (maybe_add_lambda_conv_op): Adjust.
641 * method.c (lazily_declare_fn): Adjust.
642 * pt.c (tsubst_decl, instantiate_template_1): Adjust.
643 * semantics.c (finish_member_declaration): Adjust.
645 2017-05-10 Paolo Carlini <paolo.carlini@oracle.com>
648 * decl.c (finish_function): To improve error recovery, change the
649 logic for calling apply_deduced_return_type.
651 2017-05-09 Jason Merrill <jason@redhat.com>
653 * class.c (check_bases): Ignore empty bases.
655 PR c++/70979 - literal class and closure types
656 * class.c (finalize_literal_type_property): Handle closures
658 (explain_non_literal_class): Likewise.
660 PR c++/66297, DR 1684 - literal class and constexpr member fns
661 * constexpr.c (is_valid_constexpr_fn): Only complain about
662 non-literal enclosing class in C++11.
663 * class.c (finalize_literal_type_property): Likewise.
665 2017-05-09 Paolo Carlini <paolo.carlini@oracle.com>
668 * pt.c (tsubst_decl): Early return error_mark_node if
669 grok_ctor_properties returns false.
671 2017-05-09 Jason Merrill <jason@redhat.com>
673 PR c++/70167 - array prvalue treated as lvalue
674 * cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
676 * semantics.c (finish_compound_literal): Add fcl_context parameter.
677 Only make a static variable for C99 syntax.
678 * parser.c (cp_parser_postfix_expression): Pass it.
679 * pt.c (tsubst_copy_and_build): Likewise.
680 * call.c (extend_ref_init_temps): Set
681 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
683 2017-05-09 Nathan Sidwell <nathan@acm.org>
685 * cp-lang.c (get_global_decls, cxx_pushdecl): New.
686 (LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override.
687 * name-lookup.h (pushdecl_top_level): Declare.
689 2017-05-08 Jason Merrill <jason@redhat.com>
691 PR c++/80178 - parameter passing for uncopyable classes
692 * tree.c (type_has_nontrivial_copy_init): True for classes with only
693 deleted copy/move ctors.
694 (remember_deleted_copy, maybe_warn_parm_abi): New.
695 * decl.c (require_complete_types_for_parms, check_function_type):
696 Call maybe_warn_parm_abi.
697 * call.c (convert_for_arg_passing, build_cxx_call): Likewise.
699 2017-05-08 Nathan Sidwell <nathan@acm.org>
701 * decl.c (builtin_function_1): Set DECL_ANTICIPATED before pushing.
702 (start_preparsed_function): Do decl pushing before setting
703 current_funciton_decl and announcing it.
705 * name-lookup.h (pushdecl_with_scope): Replace with ...
706 (pushdecl_outermost_localscope): ... this.
707 * name-lookup.c (pushdecl_with_scope): Replace with ...
708 (pushdecl_outermost_localscope): ... this.
709 (pushdecl_namespace_level): Adjust.
710 * decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope.
711 * lambda.c (insert_capture_proxy): Likewise.
713 * class.c (build_vtbl_initializer): Don't shadow outer variable
716 Revert _binding -> _value change.
717 * name-lookup.h (get_namespace_value, set_global_value): Rename to ...
718 (get_namespace_binding, set_global_binding): ... these.
719 * name-lookup.c (get_namespace_value, set_global_value): Rename to ...
720 (get_namespace_binding, set_global_binding): ... these.
721 (arg_assoc_namespace, pushdecl_maybe_friend_1,
722 check_for_out_of_scope_variable, push_overloaded_decl_1,
723 lookup_name_innermost_nonclass_level, push_namespace): Adjust.
724 * cp-tree.h (IDENTIFIER_GLOBAL_VALUE,
725 SET_IDENTIFIER_GLOBAL_VALUE): Adjust.
726 * decl.c (poplevel): Adjust.
727 * pt.c (make_constrained_auto): Likewise.
729 2017-05-07 Volker Reichelt <v.reichelt@netcologne.de>
732 * call.c (print_z_candidate): Fix quoting.
734 2017-05-05 David Malcolm <dmalcolm@redhat.com>
736 * error.c (pedwarn_cxx98): Replace report_diagnostic
737 with diagnostic_report_diagnostic.
739 2017-05-05 Nathan Sidwell <nathan@acm.org>
741 * cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
742 (SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value.
743 (IDENTIFIER_NAMESPACE_VALUE): Delete.
744 * name-lookup.h (namespace_binding, set_namespace_binding): Replace
746 (get_namespace_value, set_global_value): ... these.
747 (get_global_value_if_present, is_typename_at_global_scope): Delete.
748 * decl.c (poplevel): Use get_namespace_value.
749 (grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE.
750 * class.c (build_vtbl_initializer): Stash library decl in
751 static var. Use IDENTIFIER_GLOBAL_VALUE.
752 * except.c (do_get_exception_ptr, do_begin_catch, do_end_catch,
753 do_allocate_exception, do_free_exception, build_throw): Likewise.
754 * init.c (throw_bad_array_new_length): Likewise.
755 * rtti.c (throw_bad_cast, throw_bad_typeid): Likewise.
756 * name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1,
757 check_for_our_of_scope_variable, push_overloaded_decl_1): Use
759 (set_namespace_binding_1): Rename to
760 (set_namespace_binding): ... here.
761 (set_global_value): New.
762 (lookup_name_innermost_nonclass_level_1, push_namespace): Use
764 * pt.c (listify): Use get_namespace_value.
766 * call.c (make_temporary_var_for_ref_to_temp): Push decl into
768 * lex.c (unqualified_name_lookup_error): Likewise.
770 * class.c (alter_class): Use retrofit_lang_decl directly.
771 * decl.c (push_local_name, dupliate_decls): Likewise.
772 * semantics.c (omp_privatize_field): Likewise.
774 Kill walk_namespaces.
775 * cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete.
776 * decl.c (walk_namespaces_r, walk_namespaces): Delete.
778 Kill per-namespace static_decls.
779 * cp-tree.h (static_decls): Declare.
780 (wrapup_globals_for_namespace,
781 diagnose_inline_vars_for_namespace): Replace with ...
782 (wrapup_namespace_globals): ... this.
783 * decl.c (static_decls): Define.
784 (wrapup_globals_for_namespace,
785 diagnose_inline_vars_for_namespace): Replace with ...
786 (wrapup_namespace_globals): ... this.
787 (cxx_init_decl_processing): Initialize static_decls.
788 * decl2.c (c_parse_final_cleanups): Adjust.
789 * name-lookup.h (cp_binding_level): Remove static_decls member.
790 * name-lookup.c (add_decl_to_level): Adjust.
791 (begin_scope): Adjust.
793 2017-05-05 Paolo Carlini <paolo.carlini@oracle.com>
796 * decl.c (reshape_init): Unconditionally return error_mark_node
797 upon error about too many initializers.
799 2017-05-04 Nathan Sidwell <nathan@acm.org>
801 * constraint.cc (diagnose_check_constraint): Fix %E thinko.
803 2017-05-04 Martin Sebor <msebor@redhat.com>
806 * call.c (print_z_candidate): Add missing quoting to %D and other
808 (build_op_call_1): Same.
809 * constraint.cc (diagnose_check_constraint): Same.
810 * mangle.c (mangle_decl): Same.
811 * name-lookup.c (cp_binding_level_debug): Same.
812 (set_decl_namespace): Same.
813 * parser.c (cp_parser_tx_qualifier_opt): Same.
814 * pt.c (print_candidates_1): Same.
815 (check_template_variable): Same.
816 (tsubst_default_argument): Same.
817 (most_specialized_partial_spec): Same.
818 * semantics.c (omp_reduction_lookup): Same.
819 * tree.c (check_abi_tag_redeclaration): Same.
820 * typeck.c (comptypes): Same.
821 * typeck2.c (abstract_virtuals_error_sfinae): Same.
823 2017-05-04 Nathan Sidwell <nathan@acm.org>
826 * cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL,
827 CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER,
828 CPTI_INIT_LIST_IDENTIFIER.
829 (global_namespace, global_type_node, global_identifier,
830 anon_identifier, init_list_identifier): New.
831 * decl.c (global_type_node, global_scope_name): Delete.
832 (initialize_predefined_identifiers): Add new identifiers.
833 (cxx_init_decl_processing): Adjust.
834 * name-lookup.h (global_namespace, global_type_node): Delete.
835 * name-lookup.c (global_namespace, anonymous_namespace_name,
836 get_anonymous_namespace_name): Delete.
837 (namespace_scope_ht_size, begin_scope, pushtag_1,
838 push_namespace): Adjust,
839 * call.c (type_has_extended_temps): Use init_list_identifier.
840 * pt.c (listify): Likewise.
842 * name-lookup.c: Reorder functions to make merging from modules
845 2017-05-03 Jason Merrill <jason@redhat.com>
847 * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR.
849 2017-05-03 Nathan Sidwell <nathan@acm.org>
851 * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier,
852 along with #defines, to before name-lookup include.
854 2017-05-02 Paolo Carlini <paolo.carlini@oracle.com>
856 * pt.c (is_auto_or_concept): Remove.
857 (type_uses_auto_or_concept): Remove, unused.
858 (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust.
859 * parser.c (tree_type_is_auto_or_concept): Remove, unused.
860 * cp-tree.h (is_auto_or_concept): Remove.
862 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
865 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't
866 add pedigree operation and detach call here.
867 * cp-gimplify.c (cp_gimplify_expr): Remove the calls to
868 cilk_cp_gimplify_call_params_in_spawned_fn.
869 (cilk_cp_gimplify_call_params_in_spawned_fn): Remove function.
870 * semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN.
872 2017-04-29 Volker Reichelt <v.reichelt@netcologne.de>
874 * parser.c (cp_parser_member_declaration): Add fix-it hints for
875 stray comma and missing semicolon at end of member declaration.
877 2017-04-27 Volker Reichelt <v.reichelt@netcologne.de>
879 * parser.c (cp_parser_cast_expression): Add target type of cast to
881 * error.c (type_to_string): Add '{enum}' suffix to enumeration types.
883 2017-04-26 Paolo Carlini <paolo.carlini@oracle.com>
885 * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change
887 * cp-tree.h (grok_ctor_properties): Update.
889 2017-04-26 Volker Reichelt <v.reichelt@netcologne.de>
891 * parser.c (cp_parser_nested_name_specifier_opt): Add fix-it
892 information to diagnostic of invalid colon in nested-name-specifier.
894 2017-04-25 Volker Reichelt <v.reichelt@netcologne.de>
896 * parser.c (cp_parser_elaborated_type_specifier): Add fix-it to
897 diagnostic of invalid class/struct keyword after enum.
899 2017-04-25 David Malcolm <dmalcolm@redhat.com>
901 * parser.c (cp_parser_member_declaration): Add fix-it hint
902 for removing stray semicolons.
904 2017-04-25 David Malcolm <dmalcolm@redhat.com>
906 * name-lookup.c (get_std_name_hint): New function.
907 (maybe_suggest_missing_header): New function.
908 (suggest_alternative_in_explicit_scope): Call
909 maybe_suggest_missing_header.
911 2017-04-25 David Malcolm <dmalcolm@redhat.com>
914 * name-lookup.c (suggest_alternative_in_explicit_scope): Convert
915 candidate type of bm from tree to const char *.
916 (consider_binding_level): Likewise.
917 (lookup_name_fuzzy): Likewise, using this to merge the best
918 result from the preprocessor into bm, rather than immediately
919 returning, so that better matches from reserved words can "win".
920 Guard the rejection of keywords that don't start decl-specifiers
921 so it only happens for FUZZY_LOOKUP_TYPENAME.
923 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de>
925 * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics.
926 (start_enum): Likewise.
927 (build_enumerator): Likewise. Use %qE instead of plain %E.
928 * parser.c (cp_parser_mem_initializer_list): Use %qD instead of
929 %<%D%> in diagnostics.
930 (cp_parser_elaborated_type_specifier): Likewise.
931 * pt.c (make_pack_expansion): Use %qT and %qE instead of
932 %<%T%> and %<%E%> in diagnostics.
933 (tsubst_pack_expansion): Likewise.
935 2017-04-24 David Malcolm <dmalcolm@redhat.com>
938 * parser.c (cp_parser_unary_expression): Generate a location
939 range for alignof and sizeof expressions.
941 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de>
943 * parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to
945 (cp_parser_virt_specifier_seq_opt): Likewise.
946 (set_and_check_decl_spec_loc): Likewise twice.
948 2017-04-21 Jason Merrill <jason@redhat.com>
950 PR c++/80179 - ICE with initialized flexible array member.
951 * constexpr.c (verify_ctor_sanity): Handle flexible array members.
953 2017-04-21 Richard Biener <rguenther@suse.de>
955 * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
956 (copy_type): Likewise.
957 * lex.c (copy_decl): Pass down mem-stat info.
958 (copy_type): Likewise.
960 2017-04-20 Jonathan Wakely <jwakely@redhat.com>
963 * init.c (build_new_1): Suppress notes about over-aligned new when
964 the warning is suppressed.
966 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
968 * parser.c (cp_parser_member_declaration): Add warning with fixit
969 information for extra semicolon after in-class function definition.
971 2017-04-20 Jakub Jelinek <jakub@redhat.com>
974 * tree.c (build_cplus_array_type): Call build_array_type
975 with the intended TYPE_TYPELESS_STORAGE flag value, instead
976 of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
979 2017-04-18 Marek Polacek <polacek@redhat.com>
981 PR c++/80244 - ICE with attribute in template alias.
982 * tree.c (strip_typedefs): Handle UNDERLYING_TYPE.
984 PR c++/80241 - ICE with alignas pack expansion.
985 * error.c (dump_expr): Handle TREE_LIST.
986 * parser.c (cp_parser_std_attribute_list): Return error_mark if
987 make_pack_expansion returns an error.
989 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
992 * class.c (fixup_may_alias): Fix all type variants.
994 2017-04-17 Jason Merrill <jason@redhat.com>
996 PR c++/80415 - wrong error with default arg and array reference.
997 * tree.c (lvalue_kind): Return clk_class for an array prvalue.
999 * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.
1001 2017-04-15 Alexandre Oliva <aoliva@redhat.com>
1003 * decl.c (name_unnamed_type): Split out of...
1004 (grokdeclarator): ... this.
1005 * decl.h (name_unnamed_type): Declare.
1007 2017-04-12 Richard Biener <rguenther@suse.de>
1008 Bernd Edlinger <bernd.edlinger@hotmail.de>
1011 * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
1012 for arrays of character or std::byte type.
1014 2017-04-11 Jason Merrill <jason@redhat.com>
1016 PR c++/80294 - ICE with constexpr and inheritance.
1017 * constexpr.c (reduced_constant_expression_p):
1018 A null constructor element is non-constant.
1019 (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
1020 returning an empty base.
1022 2017-04-11 Jakub Jelinek <jakub@redhat.com>
1025 * decl.c (cp_finish_decomp): If processing_template_decl on
1026 non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
1027 change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make
1028 sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
1030 * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
1031 with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
1034 2017-04-11 Jakub Jelinek <jakub@redhat.com>
1037 * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
1039 2017-04-10 Jakub Jelinek <jakub@redhat.com>
1042 * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
1043 operand, if it is a static member function, recurse on the
1046 2017-04-10 Marek Polacek <polacek@redhat.com>
1049 * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set
1050 ORIG_TYPE earlier and not only when shortening.
1052 2017-04-07 Jason Merrill <jason@redhat.com>
1054 PR c++/80356 - ICE with reference to function template argument.
1056 * pt.c (convert_nontype_argument_function): Adjust type even with a
1057 value-dependent argument.
1059 PR c++/80267 - ICE with nested capture of reference
1061 * pt.c (tsubst_copy): Handle lookup finding a capture proxy.
1063 2017-04-07 Marek Polacek <polacek@redhat.com>
1066 * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE.
1069 * call.c (build_over_call): Don't check cxx_dialect.
1070 * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor
1071 whether SUB is a CONSTRUCTOR.
1072 * init.c (build_new_1): Don't check cxx_dialect.
1073 * tree.c (replace_placeholders): Add a function comment. Return if
1074 not in C++14, or if the object isn't a (member of a) class.
1075 * typeck2.c (store_init_value): Don't check cxx_dialect nor whether
1076 TYPE is CLASS_TYPE_P.
1078 2017-04-05 Jakub Jelinek <jakub@redhat.com>
1081 * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead
1082 of a loop doing vec_safe_push of NULL. Formatting fixes.
1083 (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx
1084 to newidx before calling canonical_type_parameter on newtype.
1086 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de>
1089 * cxx-pretty-print.c (cxx_pretty_printer::expression): Add
1090 UNARY_PLUS_EXPR case.
1092 2017-04-03 Jason Merrill <jason@redhat.com>
1094 * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO.
1096 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1098 * class.c (update_vtable_entry_for_fn): Fix typo in comment.
1099 * decl2.c (one_static_initialization_or_destruction): Likewise.
1100 * name-lookup.c (store_bindings): Likewise.
1101 * parser.c (make_call_declarator): Likewise.
1102 * pt.c (check_explicit_specialization): Likewise.
1104 2017-04-03 Jason Merrill <jason@redhat.com>
1106 PR sanitizer/79993 - ICE with VLA initialization from string
1107 PR c++/69487 - wrong VLA initialization from string
1108 * init.c (finish_length_check): Split out from build_vec_init.
1109 (build_vec_init): Handle STRING_CST.
1110 * typeck2.c (split_nonconstant_init): Handle STRING_CST.
1111 (digest_init_r): Don't give a STRING_CST VLA type.
1113 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1116 * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with
1117 REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller
1118 for NOP_EXPR to REFERENCE_TYPE.
1121 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE.
1122 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
1124 * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE.
1125 Remove extraneous parens.
1126 (finish_trait_expr): Handle CPTK_IS_AGGREGATE.
1127 * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE.
1128 (cp_parser_trait_expr): Likewise.
1130 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1133 * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument.
1134 * typeck.c (cxx_mark_addressable): Likewise. Look through
1135 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1137 (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable.
1139 2017-03-24 Jason Merrill <jason@redhat.com>
1141 PR c++/77339 - ICE with invalid use of alias template.
1142 * pt.c (lookup_template_class_1): Don't try to enter the scope of an
1145 2017-03-24 Marek Polacek <polacek@redhat.com>
1148 * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression
1149 doesn't have side effects.
1151 2017-03-23 Jason Merrill <jason@redhat.com>
1153 PR c++/80150 - ICE with overloaded variadic deduction.
1154 * pt.c (try_one_overload): Remove asserts.
1156 PR c++/77563 - missing ambiguous conversion error.
1157 * call.c (convert_like_real): Use LOOKUP_IMPLICIT.
1159 2017-03-23 Marek Polacek <polacek@redhat.com>
1161 * cp-tree.h: Remove a C_RID_YYCODE reference.
1163 2017-03-22 Jakub Jelinek <jakub@redhat.com>
1166 * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
1167 case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
1168 processing_template_decl.
1170 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1173 * name-lookup.c (pushtag_1): Add check for bogus, non template,
1174 std::initializer_list.
1176 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1179 * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.
1181 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1184 * init.c (std_placement_new_fn_p): New.
1185 (build_new_1): Call it.
1187 2017-03-20 Jason Merrill <jason@redhat.com>
1189 PR c++/80096 - ICE with C++17 non-type auto.
1190 * pt.c (tsubst): Delay tsubst of type of template non-type
1193 PR c++/79519 - ICE with deleted template friend.
1194 * decl.c (grokdeclarator): Complain about misplaced function
1195 definition using =, as well.
1197 PR c++/79640 - infinite recursion with generic lambda.
1198 * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation
1199 before substituting its initializer.
1201 2017-03-20 Marek Polacek <polacek@redhat.com>
1202 Paolo Carlini <paolo.carlini@oracle.com>
1204 PR c++/80059 - ICE with noexcept and __transaction_atomic
1205 * except.c (build_must_not_throw_expr): Call
1206 instantiate_non_dependent_expr.
1208 2017-03-19 Jason Merrill <jason@redhat.com>
1210 PR c++/80084 - wrong C++17 decomposition by reference of parameter.
1211 * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a
1212 reference decomposition.
1214 PR c++/80077 - error with constexpr and -fno-elide-constructors.
1215 * constexpr.c (cxx_eval_call_expression): Set ctx->call while
1216 expanding trivial constructor.
1218 2017-03-17 Jason Merrill <jason@redhat.com>
1220 PR c++/78345 - ICE initializing array from lambda.
1221 * init.c (build_aggr_init): Check array initializer.
1222 (build_vec_init): Check the type of a CONSTRUCTOR.
1224 PR c++/80073 - C++17 ICE with virtual base.
1225 * decl.c (xref_basetypes): Also check for indirect vbases.
1227 2017-03-16 Jason Merrill <jason@redhat.com>
1229 * decl.c (start_enum): std::byte aliases anything.
1232 * constexpr.c (lookup_placeholder): Tweak.
1234 2017-03-15 Jason Merrill <jason@redhat.com>
1236 PR c++/80043 - ICE with -fpermissive
1237 * typeck.c (convert_for_assignment): Handle instantiate_type
1238 not giving an error.
1240 2017-03-14 Nathan Sidwell <nathan@acm.org>
1242 PR c++/79393 DR 1658 workaround
1243 * method.c (synthesized_method_base_walk): Inihibit abstract class
1244 virtual base access check here.
1245 (synthesized_method_walk): Not here.
1247 2017-03-13 Nathan Sidwell <nathan@acm.org>
1249 PR c++/79393 DR 1658 workaround
1250 * method.c (synthesized_method_walk): Check vbases of abstract
1251 classes for dtor walk.
1253 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1255 PR translation/79848
1256 * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs".
1258 2017-03-10 Jason Merrill <jason@redhat.com>
1260 PR c++/79960 - alias templates and partial ordering
1261 * pt.c (comp_template_args): Add partial_order parm.
1262 (template_args_equal): Likewise.
1263 (comp_template_args_porder): New.
1264 (get_partial_spec_bindings): Use it.
1266 2017-03-10 Marek Polacek <polacek@redhat.com>
1269 * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
1271 2017-03-10 Jakub Jelinek <jakub@redhat.com>
1274 * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL.
1275 Use XALLOCAVEC macro.
1278 * decl.c (finish_enum_value_list): If value is error_mark_node,
1279 don't copy it and change its type.
1280 * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
1281 of CONST_DECL is error_mark_node.
1283 2017-03-09 Marek Polacek <polacek@redhat.com>
1285 PR c++/79900 - ICE in strip_typedefs
1286 * tree.c (strip_typedefs): Skip the attribute handling if T is
1287 a variant type which hasn't been updated yet.
1289 PR c++/79687 - wrong code with pointer-to-member
1290 * init.c (constant_value_1): Break if the variable has a dynamic
1293 2017-03-08 Jason Merrill <jason@redhat.com>
1295 PR c++/79797 - ICE with self-reference in array DMI.
1296 * constexpr.c (lookup_placeholder): Split out...
1297 (cxx_eval_constant_expression): ...from here.
1299 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1302 * parser.c (cp_parser_omp_cancellation_point,
1303 cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
1304 cp_parser_omp_target_update): Change "may only be used in compound
1305 statements" diagnostics, such that the same translatable string is
1306 used for all pragmas.
1307 (cp_parser_pragma): Likewise. Use error_at instead of
1308 cp_parser_error for that diagnostics.
1310 2017-03-06 Marek Polacek <polacek@redhat.com>
1312 PR c++/79796 - ICE with NSDMI and this pointer
1313 * call.c (build_over_call): Handle NSDMI with a 'this' by calling
1314 replace_placeholders.
1316 2017-03-06 Jakub Jelinek <jakub@redhat.com>
1319 * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
1322 2017-03-06 Jason Merrill <jason@redhat.com>
1324 Revert "Allow deduction guides to look into primary template."
1325 * cp-tree.h, parser.c, pt.c, search.c: Revert.
1327 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com>
1330 * except.c (build_must_not_throw_expr): Perform the implicit
1331 conversions on the condition.
1333 2017-03-03 Jason Merrill <jason@redhat.com>
1335 * mangle.c (mangle_decl): Check -Wnoexcept-type instead of
1338 Core issues 2273 and 2277
1339 * call.c (joust): Adjust using-declaration tiebreaker to handle
1340 the intermediate base case.
1341 * method.c (strip_inheriting_ctors): Just return the argument if
1342 !flag_new_inheriting_ctors.
1344 2017-03-03 Richard Biener <rguenther@suse.de>
1347 * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.
1349 2017-03-03 Marek Polacek <polacek@redhat.com>
1352 * typeck.c (string_conv_p): In C++11, always call pedwarn with
1355 2017-03-02 Jason Merrill <jason@redhat.com>
1357 Update overload resolution with deduction guides.
1358 * pt.c (do_class_deduction): Always build the copy guide.
1359 (copy_guide_p, template_guide_p): New.
1360 (build_deduction_guide): Remember the original constructor.
1361 * call.c (joust): Prefer the copy guide and non-template guides.
1363 Allow deduction guides to look into primary template.
1364 * cp-tree.h (struct saved_scope): Add deduction_guide_type.
1365 (struct cp_decl_specifier_seq): Add constructor_p.
1366 * parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
1367 (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p.
1368 Clear deduction_guide_type. Don't handle deduction guide names.
1369 (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
1370 (cp_parser_direct_declarator): Likewise. Handle deduction guides.
1371 (cp_parser_member_declaration, cp_parser_cache_defarg)
1372 (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
1373 * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
1374 (build_deduction_guide): Set deduction_guide_type.
1375 (dependent_scope_p): Check deduction_guide_type.
1376 * search.c (lookup_member): Likewise.
1378 2017-03-02 Jakub Jelinek <jakub@redhat.com>
1381 * init.c (mark_exp_read_r): New function.
1382 (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
1383 whole arguments instead of plain mark_exp_read on TREE_LIST values.
1385 2017-03-01 Jason Merrill <jason@redhat.com>
1387 Class template argument deduction in new-expression
1388 * init.c (build_new): Handle deduction from no initializer.
1389 * parser.c (cp_parser_new_expression): Don't require a single
1390 expression for class template deduction.
1391 * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
1392 class template placeholder.
1393 * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
1394 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
1395 (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.
1397 2017-03-01 Jakub Jelinek <jakub@redhat.com>
1400 * init.c (emit_mem_initializers): When not constructing vbases of
1401 abstract classes, mark arguments as read for
1402 -Wunused-but-set-parameter.
1404 2017-02-28 Jason Merrill <jason@redhat.com>
1406 Class template argument deduction refinements
1407 * call.c (joust): Move deduction guide tiebreaker down.
1408 * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class
1409 deduction with no initializer.
1410 * pt.c (build_deduction_guide): Handle implicit default/copy ctor.
1411 (do_class_deduction): Use that rather than special case.
1412 (do_auto_deduction): Handle null initializer.
1414 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1416 * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...")
1417 instead of just cond ? "..." : "...".
1418 (grokdeclarator): Likewise.
1419 (build_enumerator): Likewise.
1420 * init.c (build_new_1): Likewise.
1421 * call.c (build_new_method_call_1): Likewise.
1422 * parser.c: Include intl.h.
1423 (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for
1424 "enter"/"exit" keyword.
1425 (cp_finalize_oacc_routine): Don't use %s to supply portions of the
1428 2017-02-27 Jason Merrill <jason@redhat.com>
1430 PR c++/71568 - SFINAE forming pointer to member function
1431 * init.c (build_offset_ref): Check the return value of
1432 perform_or_defer_access_check.
1434 2017-02-27 Marek Polacek <polacek@redhat.com>
1436 * decl.c (expand_static_init): Add missing } in a comment.
1438 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de>
1440 * init.c: Include intl.h.
1441 (build_new_1): Move message strings into pedwarn to make them
1442 -Wformat-security friendly. Mark string for translation.
1443 * pt.c (tsubst_copy_and_build): Mark string for translation.
1444 Make the pointer const.
1445 * semantics.c (finish_id_expression): Mark strings for translation.
1447 2017-02-25 Jakub Jelinek <jakub@redhat.com>
1449 * call.c (build_op_delete_call): Make msg1 and msg2 const.
1451 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1454 * call.c (build_over_call): Call check_function_arguments even for
1455 -Wrestrict, adjust check_function_arguments caller.
1456 * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict
1458 * typeck.c (cp_build_function_call_vec): Adjust
1459 check_function_arguments caller.
1461 2017-02-24 Marek Polacek <polacek@redhat.com>
1463 PR translation/79705
1464 * decl.c (check_redeclaration_exception_specification): Mark a string
1465 for translation. Make the pointer const.
1467 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com>
1470 * pt.c (register_specialization): Check duplicate_decls return value
1471 for error_mark_node and pass it back.
1473 2017-02-22 Jason Merrill <jason@redhat.com>
1475 PR c++/79679 - missing destructor for argument
1476 * call.c (build_over_call): Don't pass tf_no_cleanup to argument
1479 * pt.c (do_class_deduction): Handle 0 argument case.
1481 2017-02-22 Jakub Jelinek <jakub@redhat.com>
1484 * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
1485 SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
1486 * constexpr.c (potential_constant_expression_1): Handle
1487 OMP_*, OACC_* and CILK_* trees. Use error_at with
1488 EXPR_LOC_OR_LOC (t, input_location) computed early
1489 instead of error, or error_at with location_of (t).
1491 2017-02-22 Marek Polacek <polacek@redhat.com>
1494 * parser.c (cp_parser_std_attribute_spec): Don't build the attribute
1495 if the alignas expression is erroneous.
1496 * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
1500 * semantics.c (finish_underlying_type): Bail out for incomplete enums.
1502 2017-02-21 Jason Merrill <jason@redhat.com>
1504 PR c++/50308 - wrong deprecated warning with ADL
1505 PR c++/17729 - duplicate deprecated warning
1506 * semantics.c (finish_id_expression): Only call mark_used on a
1507 function if we aren't building a call.
1509 PR c++/41727 - ICE with partial spec of partial instantiation
1510 * pt.c (process_partial_specialization): For now, don't check more
1511 specialized if there is more than one level of args.
1513 2017-02-21 Marek Polacek <polacek@redhat.com>
1516 * cp-tree.h (maybe_reject_flexarray_init): Declare.
1517 * init.c (maybe_reject_flexarray_init): No longer static.
1518 Add check for current_function_decl.
1519 * parser.c (cp_parser_late_parse_one_default_arg): Reject
1520 a default mem-initializer for a flexible array.
1522 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1523 Paolo Carlini <paolo.carlini@oracle.com>
1526 * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node
1528 * pt.c (tsubst_decomp_names): Return error_mark_node if the first
1529 decl after the decomposition artificial decl has error_mark_node.
1530 * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p
1531 instead of just == error_mark_node comparison.
1533 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1536 * decl.c: Include gimplify.h.
1537 (cp_finish_decomp): Make sure there is no sharing of trees
1538 in between DECL_VALUE_EXPR of decomposition decls.
1541 * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript.
1544 * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
1545 call cplus_expand_constant on it first.
1547 2017-02-19 Jason Merrill <jason@redhat.com>
1549 PR c++/78139 - destructor needed by new-expression
1550 * call.c (build_special_member_call): Use tf_no_cleanup.
1552 PR c++/78282 - auto template and pack expansion
1553 * pt.c (find_parameter_packs_r): Don't walk into the type of
1554 templates other than template template-parameters.
1556 PR c++/79606 - ICE with this->base_member in NSDMI
1557 * class.c (build_base_path): Check processing_template_decl.
1559 PR c++/79607 - ICE with T{} initializer
1560 * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
1562 PR c++/79566 - elaborated-type-specifier in range for
1563 * parser.c (cp_parser_simple_declaration): Fix check for type
1566 PR c++/79400 - confusing suggestion of 'noexcept'
1567 * parser.c (cp_parser_exception_specification_opt): Remove
1568 suggestion for deprecated dynamic exception-specification.
1570 PR c++/79470 - partial ordering with reference parameters
1571 * pt.c (unify) [INDIRECT_REF]: Handle pack expansions.
1573 PR c++/79500 - ICE with non-template deduction guide
1574 * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than
1575 DECL_TEMPLATE_RESULT.
1577 PR c++/79580 - ICE with compound literal
1578 * parser.c (cp_parser_class_head): If we're in the middle of an
1579 expression, use ts_within_enclosing_non_class.
1581 PR c++/79503 - inherited ctor taking base class
1582 * call.c (add_function_candidate): Also check that
1583 DECL_INHERITED_CTOR_BASE is reference-related to the parameter type.
1585 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com>
1588 * typeck.c (cxx_alignas_expr): Reject a non-integral alignas
1591 2017-02-19 Eric Fiselier <eric@efcs.ca>
1592 Jonathan Wakely <jwakely@redhat.com>
1595 * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
1596 control warning about literal suffix identifiers without a leading
1599 2017-02-17 Jason Merrill <jason@redhat.com>
1601 PR c++/79508 - lookup error with member template
1602 * parser.c (cp_parser_template_name): Clear
1603 parser->context->object_type if we aren't doing lookup.
1605 PR c++/78690 - ICE with using and global type with same name
1606 * pt.c (type_dependent_object_expression_p): True for
1609 PR c++/79549 - C++17 ICE with non-type auto template parameter pack
1610 * pt.c (convert_template_argument): Just return an auto arg pack.
1611 (tsubst_template_args): Don't tsubst an auto pack type.
1613 PR c++/79556 - C++17 ICE with non-type auto
1614 * pt.c (do_auto_deduction): Don't try to deduce from null type.
1616 PR c++/79533 - C++17 ICE with temporary cast to reference
1617 * call.c (build_over_call): Conversion to a reference prevents copy
1620 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1621 Jason Merrill <jason@redhat.com>
1623 PR c++/79502 - lost nodiscard attribute
1624 * pt.c (apply_late_template_attributes): Do apply non-dependent
1625 attributes to types.
1627 2017-02-16 Jason Merrill <jason@redhat.com>
1629 PR c++/78572 - ICE with self-modifying array initializer
1630 * constexpr.c (cxx_eval_store_expression): The object we're
1631 initializing is outside the constant-expression.
1632 (cxx_eval_call_expression): Set ctx->call.
1634 PR c++/79050 - ICE with undeduced auto and LTO
1635 * decl.c (poplevel): Remove undeduced auto decls.
1637 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1640 * parser.c (cp_parser_omp_target): For -fopenmp-simd
1641 ignore #pragma omp target even when not followed by identifier.
1643 2017-02-15 Jason Merrill <jason@redhat.com>
1644 Jakub Jelinek <jakub@redhat.com>
1646 PR c++/79464 - ICE in IPA with omitted constructor parms
1647 * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES.
1648 (adjust_clone_args): Adjust.
1649 (add_method): Remember omitted parms.
1650 * call.c (add_function_candidate): Likewise.
1651 * mangle.c (write_method_parms): Likewise.
1652 * method.c (ctor_omit_inherited_parms): Return false if there are no
1655 2017-02-15 Martin Sebor <msebor@redhat.com>
1658 * init.c (maybe_reject_flexarray_init): New function.
1659 (perform_member_init): Call it.
1661 2017-02-15 Jakub Jelinek <jakub@redhat.com>
1664 * parser.c (cp_parser_std_attribute): Don't pedwarn about
1665 [[deprecated]] with -std=c++11 and [[fallthrough]] with
1666 -std=c++11 and -std=c++14.
1669 * decl.c (grokdeclarator): For static data members, handle thread_p
1670 only after handling inline.
1672 2017-02-14 Marek Polacek <polacek@redhat.com>
1676 * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
1677 clobbering if the postfix expression isn't an EXPR_P.
1679 2017-02-13 Jason Merrill <jason@redhat.com>
1681 PR c++/79461 - ICE with lambda in constexpr constructor
1682 * constexpr.c (build_data_member_initialization): Ignore
1683 initialization of a local variable.
1685 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1687 * init.c (warn_placement_new_too_small): Add missing space in
1689 * parser.c (cp_parser_oacc_declare): Likewise.
1690 * mangle.c (maybe_check_abi_tags): Likewise.
1693 * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs
1694 on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR
1695 in the rightmost operand.
1697 2017-02-13 Nathan Sidwell <nathan@acm.org>
1699 PR c++/79296 - ICE mangling localized template instantiation
1700 * decl2.c (determine_visibility): Use template fn context for
1701 local class instantiations.
1703 2017-02-11 Jason Merrill <jason@redhat.com>
1705 PR c++/77659 - ICE with new and C++14 aggregate NSDMI
1706 * init.c (build_new): Make backups of any CONSTRUCTORs in init.
1707 (build_new_1): Use replace_placeholders.
1708 * tree.c (replace_placeholders_t): Also track whether we've seen a
1710 (replace_placeholders, replace_placeholders_r): Adjust.
1711 * cp-tree.h: Adjust.
1713 PR c++/77790 - ICE with auto function in C++11 mode
1714 * decl.c (undeduced_auto_decl): Remove C++14 limitation.
1715 (require_deduced_type): Add complain parm, return bool.
1716 * cp-tree.h: Adjust.
1717 * decl2.c (mark_used): Use require_deduced_type.
1719 2017-02-10 Jason Merrill <jason@redhat.com>
1721 PR c++/78908 - template ops and bitfields
1722 * tree.c (build_min_non_dep): Use unlowered_expr_type.
1724 PR c++/78897 - constexpr union
1725 * constexpr.c (cxx_eval_store_expression): A store to a union member
1726 erases a previous store to another member.
1728 PR c++/71285 - member of fold-expression
1729 * semantics.c (finish_unary_fold_expr)
1730 (finish_binary_fold_expr): Use null type for fold-expressions.
1732 PR c++/79401 - protected inherited constructor
1733 * call.c (enforce_access): For inheriting constructor, find a base
1734 binfo in the path we already have.
1736 2017-02-10 Marek Polacek <polacek@redhat.com>
1739 * pt.c (type_dependent_expression_p): Check if the expression type
1743 * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context
1744 if warnings shouldn't be given.
1746 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1749 * pt.c (tsubst_decl): Don't try to preserve a typedef that names
1750 an error_mark_node as type.
1752 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1753 Jason Merrill <jason@redhat.com>
1756 * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE
1757 from pattern to type.
1759 2017-02-09 Jason Merrill <jason@redhat.com>
1761 PR c++/79316 - default argument in deduction guide
1762 PR c++/79350 - explicit deduction guide
1763 * parser.c (cp_parser_constructor_declarator_p)
1764 (cp_parser_direct_declarator): Parse deduction guides more like
1766 * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
1767 * tree.c (special_function_p): Return it.
1768 * decl.c (check_special_function_return_type): Handle it.
1769 (grokdeclarator, grokfndecl): Adjust.
1770 (cp_finish_decl): Pass flags to do_auto_deduction.
1771 * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
1772 * pt.c (dguide_name_p): Take a const_tree.
1773 (do_class_deduction): Handle explicit.
1774 (do_auto_deduction): Pass flags through.
1775 (build_deduction_guide): Copy explicit flag.
1777 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1780 * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
1781 non-pragma_compound context here.
1782 (cp_parser_omp_target): Likewise.
1783 (cp_parser_pragma): Don't call push_omp_privatization_clauses and
1784 parsing for ordered and target omp pragmas in non-pragma_stmt
1785 non-pragma_compound contexts.
1788 * parser.c (cp_parser_oacc_declare): Formatting fix.
1789 (cp_parser_omp_declare_target): Don't invoke symtab_node::get on
1790 automatic variables.
1792 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1793 Chung-Lin Tang <cltang@codesourcery.com>
1795 * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix
1796 parsing. Parse constant expression. Remove semantic checking.
1797 (cp_parser_omp_clause_collapse): Disallow tile.
1798 (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse
1799 error about missing for after already emitting one. Use more
1800 conventional for idiom for unbounded loop.
1801 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
1802 * semantics.c (finish_omp_clauses): Correct TILE semantic check.
1803 (finish_omp_for): Deal with tile clause.
1805 2017-02-07 Nathan Sidwell <nathan@acm.org>
1807 * method.c (synthesized_method_base_walk): New. Broken out of ...
1808 (synthesized_method_walk): ... here. Call it. Cleanup
1811 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org>
1814 * typeck2.c (process_init_constructor_union): Consider only
1815 FIELD_DECLs when looking for an NSDMI.
1817 2017-02-06 Jason Merrill <jason@redhat.com>
1819 PR c++/71193 - incomplete types in templates
1820 * parser.c (cp_parser_postfix_dot_deref_expression): In a template
1821 handle incomplete type by pedwarning and then treating as dependent.
1823 2017-02-06 Jakub Jelinek <jakub@redhat.com>
1826 * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR.
1827 (potential_constant_expression_1): Likewise.
1830 * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR
1831 allow one fewer than expected arguments if flag_permissive.
1834 * decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
1835 * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
1836 with error_mark_node type.
1838 2017-02-03 Jason Merrill <jason@redhat.com>
1840 PR c++/78689 - ICE on constructor with label
1841 * optimize.c (maybe_clone_body): Replace omitted parameters with
1843 * class.c (build_clone): Fix logic for omitting inherited parms.
1845 PR c++/12245 - excessive memory use
1846 * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1
1847 back in. Don't cache constants.
1848 (maybe_constant_init): Don't cache constants.
1850 PR c++/79294 - ICE with invalid template argument
1851 * pt.c (convert_nontype_argument_function): Check value-dependence.
1852 (convert_nontype_argument): Don't check it here for function ptrs.
1854 2017-02-02 Richard Biener <rguenther@suse.de>
1857 * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy
1858 it lazily on the first changed element only and copy it
1859 fully upfront, only storing changed elements.
1861 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1864 * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL
1867 2017-01-31 Jakub Jelinek <jakub@redhat.com>
1870 * error.c (dump_expr) <case COMPONENT_REF>: Don't print .
1873 2017-01-31 David Malcolm <dmalcolm@redhat.com>
1876 * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve
1877 any namespace aliases.
1879 2017-01-31 Nathan Sidwell <nathan@acm.org>
1882 * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING.
1886 * pt.c: (instantiate_decl): Push to top level when current
1887 function scope doesn't match. Only push lmabda scope stack when
1890 * cp-tree.h (instantiate_decl): Make defer_ok bool.
1891 * pt.c: Fix instantiate_decl calls to pass true/false not 0/1
1892 (instantiate_decl): Simplify and reorder state saving and restoration.
1895 * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs.
1896 * semantics.c (finish_member_declaration): Assert class is being
1899 2017-01-30 Alexandre Oliva <aoliva@redhat.com>
1901 Introduce C++ support in libcc1.
1902 * cp-tree.h (struct lang_identifier): Add oracle_looked_up.
1903 (ansi_opname): Rename to...
1904 (cp_operator_id): ... this. Adjust all callers.
1905 (ansi_assopname): Rename to...
1906 (cp_assignment_operator_id): ... this. Adjust all callers.
1907 (cp_literal_operator_id): Declare.
1908 (set_global_friend): Declare.
1909 (is_global_friend): Declare.
1910 (enum cp_oracle_request): New type.
1911 (cp_binding_oracle_function): New type.
1912 (cp_binding_oracle): Declare.
1913 (cp_finish_injected_record_type): Declare.
1914 * friend.c (global_friend): New var.
1915 (set_global_friend): New fn.
1916 (is_global_friend): New fn.
1917 (is_friend): Call is_global_friend.
1918 * name-lookup.c (cp_binding_oracle): New var.
1919 (query_oracle): New fn.
1920 (qualified_lookup_using_namespace): Call query_oracle.
1921 (lookup_name_real_1): Likewise.
1922 * parser.c (cp_literal_operator_id): Drop static.
1923 * search.c (friend_accessible_p): Call is_global_friend.
1924 * semantics.c (is_this_parameter): Accept a variable if the
1925 binding oracle is enabled.
1927 2017-01-27 Jason Merrill <jason@redhat.com>
1929 PR c++/78771 - ICE with inherited constructor.
1930 * call.c (build_over_call): Call deduce_inheriting_ctor here.
1931 * pt.c (tsubst_decl): Not here.
1932 * class.c (add_method): Or here.
1933 * method.c (deduce_inheriting_ctor): Handle clones.
1934 (implicitly_declare_fn): Don't deduce inheriting ctors yet.
1936 2017-01-27 Adam Butcher <adam@jessamine.co.uk>
1939 * cp/parser.c (parsing_default_capturing_generic_lambda_in_template):
1941 * cp/cp-tree.h: Declare it.
1942 * cp/semantics.c (finish_id_expression): Resolve names within a default
1943 capturing generic lambda defined within a template prior to
1944 instantiation to allow for captures to be added to the closure type.
1946 2017-01-26 Jakub Jelinek <jakub@redhat.com>
1949 * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
1950 * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
1951 * parser.c (cp_parser_builtin_offsetof): Pass result of
1952 build_static_cast of null_pointer_node to finish_offsetof.
1953 * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
1954 it for -Winvalid-offsetof pedwarn instead of trying to guess
1955 original offsetof type from EXPR. Save OBJECT_PTR as a new
1956 second operand to OFFSETOF_EXPR.
1957 * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
1958 finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
1961 2017-01-26 Jason Merrill <jason@redhat.com>
1963 * name-lookup.c (parse_using_directive): Deprecate strong using.
1965 PR c++/79176 - lambda ICE with -flto -Os
1966 * decl2.c (vague_linkage_p): Handle decloned 'tors.
1967 * tree.c (decl_linkage): Likewise.
1969 2017-01-25 Martin Sebor <msebor@redhat.com>
1971 * decl.c (grokdeclarator): Fix a typo in a comment.
1973 2017-01-25 Jakub Jelinek <jakub@redhat.com>
1976 * decl.c (cp_finish_decomp): Disallow memberwise decomposition of
1980 * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
1981 OPT_Wpedantic on lambda templates for -std=c++14 and higher.
1983 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1986 * decl.c (cxx_init_decl_processing): Pass main_input_filename
1987 to build_translation_unit_decl.
1989 2017-01-24 Jakub Jelinek <jakub@redhat.com>
1992 * cp-gimplify.c (cp_genericize_r): Add result of
1993 convert_from_reference on invisiref parm to p_set.
1995 2017-01-24 Nathan Sidwell <nathan@acm.org>
1997 PR c++/78469 - defaulted ctor and inaccessible dtor
1998 * cp-tree.h (tsubst_flags): Add tf_no_cleanup.
1999 * init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
2000 * tree.c (build_target_expr): Check tf_no_cleanup.
2002 PR c++/79118 - anon-members and constexpr
2003 * constexpr.c (cx_check_missing_mem_inits): Caller passes type not
2004 ctor decl. Recursively check anonymous members.
2005 (register_constexpr_fundef): Adjust cx_check_missing_mem_inits
2007 (explain_invalid_constexpr_fn): Likewise.
2009 2017-01-23 Nathan Sidwell <nathan@acm.org>
2011 PR c++/71710 - template using directive of field
2012 * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
2015 PR c++/71406 - ICE with scope-ref'd template id exprs
2017 * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
2018 before breaking up TEMPLATE_ID_EXPR.
2020 2017-01-20 Nathan Sidwell <nathan@acm.org>
2022 PR c++/78495 - wrong code inherited ctor and invisi-ref parm
2023 * cp-gimplify.c (cp_generize_r): Don't skip thunks.
2025 2017-01-20 David Malcolm <dmalcolm@redhat.com>
2029 * cp-tree.h (suggest_alternatives_for): Add bool param.
2030 (suggest_alternative_in_explicit_scope): New decl.
2031 * error.c (qualified_name_lookup_error): When SCOPE is a namespace
2032 that isn't the global one, call new function
2033 suggest_alternative_in_explicit_scope, only calling
2034 suggest_alternatives_for if it fails, and disabling near match
2035 searches fort that case. When SCOPE is the global namespace,
2036 pass true for new param to suggest_alternatives_for to allow for
2038 * lex.c (unqualified_name_lookup_error): Pass true for new param
2039 to suggest_alternatives_for.
2040 * name-lookup.c (consider_binding_level): Add forward decl.
2041 (suggest_alternatives_for): Add "suggest_misspellings" param,
2042 using it to conditionalize the fuzzy name-lookup code.
2043 (suggest_alternative_in_explicit_scope): New function.
2044 * parser.c (cp_parser_primary_expression): When calling
2045 finish_id_expression, pass location of id_expression rather
2046 than that of id_expr_token.
2047 (cp_parser_id_expression): Convert local "unqualified_id" from
2048 tree to cp_expr to avoid implicitly dropping location information.
2050 2017-01-20 Marek Polacek <polacek@redhat.com>
2053 * call.c (build_conditional_expr_1): Warn about duplicated branches.
2054 * semantics.c (finish_expr_stmt): Build statement using the proper
2057 2017-01-19 Jason Merrill <jason@redhat.com>
2059 US 20 - forwarding references and class template argument deduction
2060 * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
2061 * pt.c (push_template_decl_real): Set it.
2062 (maybe_adjust_types_for_deduction): Check it.
2063 (rewrite_template_parm): Copy it.
2065 US 19 - deduction guides and constructors
2066 * call.c (joust): Prefer deduction guides to constructors.
2067 * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL.
2068 (deduction_guide_p): Check DECL_P.
2070 * decl.c (check_initializer): Always use build_aggr_init for array
2073 PR c++/79130 - decomposition and direct-initialization
2074 * init.c (build_aggr_init): Communicate direct-initialization to
2076 (build_vec_init): Check for array copy sooner.
2077 * parser.c (cp_parser_decomposition_declaration): Remove call to
2078 build_x_compound_expr_from_list.
2080 2017-01-18 Jason Merrill <jason@redhat.com>
2082 PR c++/68666 - member variable template-id
2083 * typeck.c (finish_class_member_access_expr): Handle variable
2085 * pt.c (lookup_and_finish_template_variable): No longer static.
2086 * cp-tree.h: Declare it.
2088 2017-01-18 Nathan Sidwell <nathan@acm.org>
2091 * call.c (build_over_call): When checking ellipsis conversions for
2092 an inherited ctor, make sure there is at least one conversion.
2094 2017-01-18 Jason Merrill <jason@redhat.com>
2096 PR c++/78894 - ICE with class deduction and default arg
2097 * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE.
2099 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
2102 * mangle.c (write_discriminator): Reorganize abi warning check.
2104 2017-01-18 Nathan Sidwell <nathan@acm.org>
2106 * cp-tree.h: Clarify exception spec node comment.
2107 * except.c (nothrow_spec_p): Simplify by checking node-equality.
2110 * mangle.c (write_exception_spec): Check nothrow explicitly.
2111 (write_encoding): Don't increment processing_template_decl around
2114 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
2117 * mangle.c (write_template_args): Add "on" for operator names.
2119 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
2122 * mangle.c (write_discriminator): Handle discriminator >= 10.
2124 2017-01-17 Nathan Sidwell <nathan@acm.org>
2127 * cp-tree.h (maybe_generic_this_capture): Declare.
2128 * lambda.c (resolvable_dummy_lambda): New, broken out of ...
2129 (maybe_resolve_dummy): ... here. Call it.
2130 (maybe_generic_this_capture): New.
2131 * parser.c (cp_parser_postfix_expression): Speculatively capture
2132 this in generic lambda in unresolved member function call.
2133 * pt.c (tsubst_copy_and_build): Force hard error from failed
2134 member function lookup in generic lambda.
2136 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
2139 * cp-array-notation.c (expand_array_notation_exprs): Handle
2142 2017-01-11 Jason Merrill <jason@redhat.com>
2144 PR c++/78337 - ICE on invalid with generic lambda
2145 * semantics.c (process_outer_var_ref): Check if containing_function
2146 is null. Move inform call under complain test.
2148 2017-01-11 Nathan Sidwell <nathan@acm.org>
2151 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
2154 2017-01-11 Nathan Sidwell <nathan@acm.org>
2156 * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation.
2158 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2161 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
2162 assertion. Formatting fix.
2165 * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
2168 2017-01-10 David Malcolm <dmalcolm@redhat.com>
2171 * parser.c (cp_parser_class_specifier_1): Only suggest inserting
2172 a missing semicolon if we have a valid insertion location for
2175 2017-01-10 Jason Merrill <jason@redhat.com>
2177 FI 20, decomposition declaration with parenthesized initializer.
2178 * parser.c (cp_parser_decomposition_declaration): Use
2179 cp_parser_initializer.
2181 2017-01-09 Jason Merrill <jason@redhat.com>
2183 Implement P0195R2, C++17 variadic using.
2184 * parser.c (cp_parser_using_declaration): Handle ellipsis and comma.
2185 * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE.
2186 * error.c (dump_decl): Likewise.
2188 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2190 PR translation/79019
2191 PR translation/79020
2192 * semantics.c (finish_omp_clauses): Add missing whitespace to
2193 translatable strings.
2194 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
2196 2017-01-07 Jason Merrill <jason@redhat.com>
2198 PR c++/78948 - instantiation from discarded statement
2199 * parser.h (struct cp_parser): Remove in_discarded_stmt field.
2200 * cp-tree.h (in_discarded_stmt): Declare it.
2201 (struct saved_scope): Add discarded_stmt bitfield.
2202 (in_discarded_stmt): New macro.
2203 * decl2.c (mark_used): Check it.
2204 * parser.c (cp_parser_selection_statement): Adjust.
2205 (cp_parser_jump_statement): Adjust.
2207 2017-01-05 Jakub Jelinek <jakub@redhat.com>
2210 * decl.c (cp_finish_decomp): Remove probe variable, if tt is
2211 REFERENCE_REF_P, set tt to its operand.
2214 * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in
2215 unions even for C++11 and later.
2217 2017-01-05 Nathan Sidwell <nathan@acm.org>
2220 * pt.c (convert_nontype_argument): Don't try and see if integral
2221 or enum expressions are constants prematurely.
2223 2017-01-04 Marek Polacek <polacek@redhat.com>
2226 * typeck.c (cp_build_binary_op): Warn when a pointer is compared with
2227 a zero character literal.
2229 2017-01-04 Jakub Jelinek <jakub@redhat.com>
2232 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
2236 * parser.c (cp_parser_simple_declaration): Only complain about
2237 inconsistent auto deduction if auto_result doesn't use auto.
2239 * parser.c (cp_parser_simple_declaration): Diagnose function
2240 declaration among more than one init-declarators with auto
2244 * parser.c (cp_lexer_previous_token): Use vec_safe_address in the
2245 assertion, as lexer->buffer may be NULL.
2247 2017-01-04 Marek Polacek <polacek@redhat.com>
2251 * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.
2253 2017-01-04 Nathan Sidwell <nathan@acm.org>
2256 * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New.
2257 (lambda_capture_field_type): Update prototype.
2258 * lambda.c (lambda_capture_field_type): Add is_reference parm.
2259 Add referenceness here.
2260 (add_capture): Adjust lambda_capture_field_type call, refactor
2262 * pt.c (tsubst): Adjust lambda_capture_field_type call.
2264 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2266 Update copyright years.
2268 Copyright (C) 2017 Free Software Foundation, Inc.
2270 Copying and distribution of this file, with or without modification,
2271 are permitted in any medium without royalty provided the copyright
2272 notice and this notice are preserved.