af7194997135993ea0ea1c10a69d1319f7ebc287
[gcc.git] / gcc / cp / ChangeLog
1 2013-04-01 Jason Merrill <jason@redhat.com>
2
3 * semantics.c (maybe_constant_value): Check
4 instantiation_dependent_expression_p.
5 * pt.c (build_non_dependent_expr): Don't check it here.
6
7 PR c++/56772
8 * init.c (build_new): Don't try to process an array initializer
9 at template definition time.
10
11 PR c++/56793
12 * typeck.c (finish_class_member_access_expr): Handle enum scope.
13
14 PR c++/56794
15 * parser.c (cp_parser_range_for): Don't try to do auto deduction
16 in a template if the type of the range is incomplete.
17
18 * call.c (add_function_candidate): Take the address of 'this' here.
19 (build_over_call): And here.
20 (build_new_method_call_1, build_op_call_1): Not here.
21 (build_user_type_conversion_1): Or here.
22 (add_candidates): Adjust.
23
24 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
25 * class.c (same_signature_p): Use type_memfn_quals.
26 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
27 FUNCTION_OR_METHOD_TYPE_CHECK.
28 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
29 * pt.c (unify): Use static_fn_type.
30
31 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
32 Jason Merrill <jason@redhat.com>
33
34 Implement N2439 (ref-qualifiers for 'this')
35 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
36 (FUNCTION_RVALUE_QUALIFIED): New.
37 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
38 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
39 (cp_ref_qualifier): New enum.
40 (cp_declarator): Add ref_qualifier.
41 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
42 (cp_parser_direct_declarator): Use it.
43 (make_call_declarator): Adjust.
44 (cp_parser_lambda_declarator_opt): Adjust.
45 * call.c (add_function_candidate): Handle ref-qualifier overload
46 resolution semantics.
47 (standard_conversion): Adjust.
48 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
49 * decl.c (grokdeclarator): Handle ref-qualifiers.
50 (grokfndecl): Check for invalid ref-qualifiers.
51 (static_fn_type, revert_static_member_fn): Adjust.
52 * decl2.c (build_memfn_type): Handle ref-qualifiers.
53 (check_classfn): Check them.
54 (cp_reconstruct_complex_type): Retain them.
55 * error.c (dump_ref_qualifier): New.
56 (dump_type_suffix, dump_function_decl): Use it.
57 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
58 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
59 (unify): Retain them.
60 * tree.c (cp_check_qualified_type): New.
61 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
62 (build_ref_qualified_type): New.
63 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
64 (cp_build_type_attribute_variant): Keep ref-qualifier.
65 * typeck.c (merge_types): Keep ref-qualifier.
66 (structural_comptypes): Compare ref-qualifier.
67 (type_memfn_rqual): New.
68 (apply_memfn_quals): Take ref-qual argument.
69 * typeck2.c (build_m_component_ref): Check ref-qualifier.
70
71 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
72
73 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
74 (DECL_FUNCTION_TEMPLATE_P): Adjust.
75
76 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
77 pp_cxx_qualified_id): Use get_containing_scope.
78 * parser.c (cp_parser_class_head): Likewise.
79 * pt.c (push_template_decl_real): Likewise.
80
81 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
82 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
83
84 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
85
86 * decl2.c (collect_candidates_for_java_method_aliases): Use
87 DECL_CLASS_SCOPE_P.
88 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
89 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
90 * decl.c (duplicate_decls): Likewise.
91 * parser.c (cp_parser_template_declaration_after_export): Likewise,
92 also DECL_DECLARES_TYPE_P.
93 * pt.c (instantiate_class_template_1): Likewise.
94 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
95 (lookup_field_r): Likewise.
96 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
97 (lookup_fnfields_slot_nolazy): Likewise.
98 * semantics.c (finish_member_declaration): Likewise.
99 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
100
101 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
102
103 * pt.c (template_parms_to_args): Fix typo in comment.
104
105 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
106
107 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
108
109 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
110
111 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
112 (build_op_call_1): Likewise.
113 (build_over_call): Likewise.
114 (compare_ics): Likewise.
115 * class.c (build_base_path): Likewise.
116 (resolve_address_of_overloaded_function): Likewise.
117 * cp-tree.h: Likewise.
118 * cvt.c (cp_convert_to_pointer): Likewise.
119 (convert_to_reference): Likewise.
120 (ocp_convert): Likewise.
121 (convert_force): Likewise, tidy.
122 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
123 (pp_cxx_ptr_operator): Likewise.
124 * decl.c (duplicate_decls): Likewise.
125 (start_decl): Likewise.
126 (grok_op_properties): Likewise.
127 (start_preparsed_function): Likewise.
128 (store_parm_decls): Likewise.
129 (finish_function): Likewise.
130 * decl2.c (delete_sanity): Likewise.
131 (acceptable_java_type): Likewise.
132 (grokbitfield): Likewise.
133 (cp_reconstruct_complex_type): Likewise.
134 * error.c (dump_type_prefix): Likewise.
135 (dump_expr): Likewise.
136 * except.c (push_eh_cleanup): Likewise.
137 (complete_ptr_ref_or_void_ptr_p): Likewise.
138 (can_convert_eh): Likewise.
139 * init.c (build_new_1): Likewise.
140 (build_delete): Likewise.
141 (build_vec_delete): Likewise.
142 * mangle.c (write_type): Likewise.
143 * parser.c (lookup_literal_operator): Likewise.
144 * pt.c (convert_nontype_argument_function): Likewise.
145 (convert_nontype_argument): Likewise.
146 (tsubst): Likewise.
147 (unify): Likewise.
148 (dependent_type_p_r): Likewise.
149 * rtti.c (build_headof): Likewise.
150 (build_typeid): Likewise.
151 (build_dynamic_cast_1): Likewise.
152 (target_incomplete_p): Likewise.
153 (typeinfo_in_lib_p): Likewise.
154 * semantics.c (finish_omp_for): Likewise.
155 (cxx_eval_call_expression): Likewise.
156 (maybe_resolve_dummy): Likewise.
157 * tree.c (build_target_expr): Likewise.
158 (cp_build_qualified_type_real): Likewise.
159 * typeck.c (composite_pointer_type_r): Likewise.
160 (composite_pointer_type): Likewise.
161 (comp_except_types): Likewise.
162 (cxx_sizeof_nowarn): Likewise.
163 (string_conv_p): Likewise.
164 (cp_build_array_ref): Likewise.
165 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
166 (pointer_diff): Likewise.
167 (cp_build_addr_expr_1): Likewise.
168 (cp_build_unary_op): Likewise.
169 (build_static_cast_1): Likewise.
170 (cp_build_c_cast): Likewise.
171 (comp_ptr_ttypes_real): Likewise.
172 (ptr_reasonably_similar): Likewise.
173 (comp_ptr_ttypes_const): Likewise.
174 (casts_away_constness): Likewise.
175 (check_literal_operator_args): Likewise.
176 * typeck2.c (build_x_arrow): Likewise.
177 (add_exception_specifier): Likewise.
178
179 2013-03-29 Jason Merrill <jason@redhat.com>
180
181 N3582
182 * cp-tree.h (AUTO_IS_DECLTYPE): New.
183 * parser.c (cp_parser_decltype): Handle decltype(auto).
184 (cp_parser_type_id_1): Allow auto without a late-specified
185 return in C++1y.
186 (cp_parser_primary_expression): Use the return value of
187 finish_parenthesized_expr.
188 (cp_parser_transaction_expression): Likewise.
189 * semantics.c (force_paren_expr): New.
190 (finish_parenthesized_expr): Use it.
191 * call.c (build_conditional_expr_1): Likewise.
192 * pt.c (do_auto_deduction): Handle decltype(auto).
193 (tsubst_copy): Handle PAREN_EXPR.
194 (tsubst_copy_and_build): Likewise.
195 * error.c (dump_expr): Handle PAREN_EXPR.
196 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
197 * mangle.c (write_expression): Ignore PAREN_EXPR.
198
199 * parser.c (cp_parser_decltype_expr): Split out...
200 (cp_parser_decltype): ...from here.
201
202 PR c++/56774
203 PR c++/35722
204 * pt.c (unify_pack_expansion): Fix indexing.
205
206 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
207
208 * call.c (build_java_interface_fn_ref): Likewise.
209 (make_temporary_var_for_ref_to_temp): Likewise.
210 * class.c (check_field_decls): Likewise.
211 (layout_class_type): Likewise.
212 (finish_struct_1): Likewise.
213 (fixed_type_or_null): Likewise.
214 (get_vtbl_decl_for_binfo): Likewise.
215 * cp-gimplify.c (omp_var_to_track): Likewise.
216 (cp_genericize_r): Likewise.
217 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
218 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
219 (DECL_DISCRIMINATOR_P): Likewise.
220 * decl.c (poplevel): Likewise.
221 (decls_match): Likewise.
222 (duplicate_decls): Likewise.
223 (decl_jump_unsafe): Likewise.
224 (start_decl): Likewise.
225 (check_for_uninitialized_const_var): Likewise.
226 (make_rtl_for_nonlocal_decl): Likewise.
227 (cp_finish_decl): Likewise.
228 (expand_static_init): Likewise.
229 (local_variable_p): Likewise.
230 (maybe_register_incomplete_var): Likewise.
231 * decl2.c (grokfield): Likewise.
232 (comdat_linkage): Likewise.
233 (determine_visibility): Likewise.
234 (import_export_decl): Likewise.
235 (prune_vars_needing_no_initialization): Likewise.
236 (decl_maybe_constant_var_p): Likewise.
237 * error.c (dump_simple_decl): Likewise.
238 (dump_template_decl): Likewise.
239 (cp_printer): Likewise.
240 * except.c (build_throw): Likewise.
241 * init.c (build_vtbl_address): Likewise.
242 (member_init_ok_or_else): Likewise.
243 (build_aggr_init): Likewise.
244 (expand_aggr_init_1): Likewise.
245 (build_offset_ref): Likewise.
246 (constant_value_1): Likewise.
247 * mangle.c (write_mangled_name): Likewise.
248 (write_prefix): Likewise.
249 * name-lookup.c (supplement_binding_1): Likewise.
250 (add_decl_to_level): Likewise.
251 (pushdecl_maybe_friend_1): Likewise.
252 (check_for_out_of_scope_variable): Likewise.
253 (validate_nonmember_using_decl): Likewise.
254 (lookup_name_innermost_nonclass_level_1): Likewise.
255 (lookup_arg_dependent_1): Likewise.
256 * parser.c (cp_parser_lambda_introducer): Likewise.
257 (cp_parser_template_argument): Likewise.
258 (cp_parser_single_declaration): Likewise.
259 * pt.c (convert_nontype_argument): Likewise.
260 (instantiate_class_template_1): Likewise.
261 (tsubst_decl): Likewise.
262 (tsubst_expr): Likewise.
263 (do_decl_instantiation): Likewise.
264 (do_type_instantiation): Likewise.
265 (regenerate_decl_from_template): Likewise.
266 (always_instantiate_p): Likewise.
267 (instantiate_decl): Likewise.
268 (type_dependent_expression_p): Likewise.
269 (build_non_dependent_expr): Likewise.
270 * repo.c (repo_emit_p): Likewise.
271 * rtti.c (build_dynamic_cast_1): Likewise.
272 * search.c (shared_member_p): Likewise.
273 * semantics.c (outer_var_p): Likewise.
274 (finish_id_expression): Likewise.
275 (finish_omp_clauses): Likewise.
276 (finish_decltype_type): Likewise.
277 (ensure_literal_type_for_constexpr_object): Likewise.
278 * tree.c (lvalue_kind): Likewise.
279 (bot_replace): Likewise.
280 (cp_tree_equal): Likewise.
281 (handle_init_priority_attribute): Likewise.
282 (decl_storage_duration): Likewise.
283 * typeck.c (cxx_sizeof_expr): Likewise.
284 (cxx_alignof_expr): Likewise.
285 (decay_conversion): Likewise.
286 (build_class_member_access_expr): Likewise.
287 (cp_build_array_ref): Likewise.
288 (cxx_mark_addressable): Likewise.
289 (maybe_warn_about_returning_address_of_local): Likewise.
290 (check_return_expr): Likewise.
291 * typeck2.c (cxx_readonly_error): Likewise.
292 (abstract_virtuals_error_sfinae): Likewise.
293 (cxx_incomplete_type_diagnostic): Likewise.
294
295 2013-03-28 Lawrence Crowl <crowl@google.com>
296
297 * Make-lang.in
298 (CXX_PARSER_H): Add header dependence.
299 * cp-tree.h
300 (extern debug (cp_binding_level &)): New.
301 (extern debug (cp_binding_level *)): New.
302 * name-lookup.h
303 (debug (cp_binding_level &)): New.
304 (debug (cp_binding_level *)): New.
305 * parser.c
306 (debug (cp_parser &)): New.
307 (debug (cp_parser *)): New.
308 (debug (cp_token &)): New.
309 (debug (cp_token *)): New.
310 (debug (vec<cp_token, va_gc> &)): New.
311 (debug (vec<cp_token, va_gc> *)): New.
312 * parser.c: Add header dependence.
313 (extern debug (cp_parser &)): New.
314 (extern debug (cp_parser *)): New.
315 (extern debug (cp_token &)): New.
316 (extern debug (cp_token *)): New.
317 (extern debug (vec<cp_token, va_gc> &)): New.
318 (extern debug (vec<cp_token, va_gc> *)): New.
319
320 2013-03-28 Jason Merrill <jason@redhat.com>
321
322 PR c++/17232
323 PR c++/52748
324 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
325 the type if tf_decltype is set.
326 * pt.c (fn_type_unification): Add decltype_p parm.
327 (get_bindings): Adjust.
328 * cp-tree.h: Adjust.
329 * class.c (resolve_address_of_overloaded_function): Adjust.
330 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
331
332 PR c++/56679
333 * parser.c (cp_parser_sizeof_pack): Split out from...
334 (cp_parser_sizeof_operand): ...here. Require (id).
335
336 PR c++/56701
337 * semantics.c (finish_this_expr): 'this' is an rvalue.
338 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
339
340 PR c++/56710
341 * semantics.c (finish_member_declaration): Don't push closure
342 members.
343
344 * name-lookup.c (pushdecl_maybe_friend_1): Use
345 nonlambda_method_basetype and current_nonlambda_class_type.
346
347 PR c++/56728
348 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
349 conversion from integer to pointer.
350 (cxx_eval_constant_expression): Likewise.
351 (cxx_eval_indirect_ref): Use the folded operand if we still think
352 this might be constant.
353
354 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
355 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
356
357 PR c++/56725
358 * call.c (convert_like_real): Change series of two permerrors
359 to permerror + inform (and likewise for two errors).
360 (build_new_method_call_1): Likewise.
361 * typeck.c (convert_for_initialization): Change additional
362 warning or error to inform.
363
364 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
365
366 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
367 (first_aggr_init_expr): Likewise.
368 (more_aggr_init_expr_args_p): Likewise.
369 (type_of_this_parm): Likewise.
370 (class_of_this_parm): Likewise.
371 * name-lookup.h (get_global_value_if_present): Likewise.
372 (is_typename_at_global_scope): Likewise.
373
374 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
375
376 * call.c (joust): Don't call inform for a permerror returning false.
377 * parser.c (cp_parser_check_class_key): Likewise.
378 * pt.c (tsubst_copy_and_build): Likewise.
379
380 2013-03-27 Jason Merrill <jason@redhat.com>
381
382 PR c++/56749
383 * semantics.c (finish_qualified_id_expr): Return early
384 for enum scope.
385
386 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
387
388 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
389 * cvt.c (convert_to_void): Likewise.
390 * error.c (dump_expr): Likewise.
391 * mangle.c (write_expression): Likewise.
392 * parser.c (cp_parser_template_argument): Likewise.
393 * pt.c (convert_nontype_argument): Likewise.
394 (tsubst_copy_and_build): Likewise.
395 * rtti.c (build_typeid): Likewise.
396 * semantics.c (finish_call_expr): Likewise.
397 (finish_decltype_type): Likewise.
398 (build_data_member_initialization): Likewise.
399 * tree.c (is_dummy_object): Likewise.
400 * typeck.c (decay_conversion): Likewise.
401 (build_class_member_access_expr): Likewise.
402 (cp_build_addr_expr_1): Likewise.
403 (unary_complex_lvalue): Likewise.
404 (check_return_expr): Likewise.
405 * typeck2.c (cxx_readonly_error): Likewise.
406
407 2013-03-26 Jason Merrill <jason@redhat.com>
408
409 PR c++/52597
410 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
411 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
412 * cp-tree.h: Adjust prototype.
413
414 PR c++/45282
415 * typeck2.c (build_m_component_ref): Handle prvalue object.
416
417 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
418
419 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
420 * decl.c (duplicate_decls): Likewise.
421 (cp_finish_decl): Likewise.
422 (check_class_member_definition_namespace): Likewise.
423 * decl2.c (grokfield): Likewise.
424 (decl_needed_p): Likewise.
425 (import_export_decl): Likewise.
426 (mark_used): Likewise.
427 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
428 * pt.c (push_access_scope): Likewise.
429 (instantiate_decl): Likewise.
430 * ptree.c (cxx_print_decl): Likewise.
431 * repo.c (repo_emit_p): Likewise.
432 * semantics.c (note_decl_for_pch): Likewise.
433 * tree.c (decl_linkage): Likewise.
434
435 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
436
437 PR c++/55951
438 * decl.c (check_array_designated_initializer): Handle CONST_DECL
439 as ce->index.
440
441 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
442
443 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
444 error messages.
445
446 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
447
448 2013-03-25 Jason Merrill <jason@redhat.com>
449
450 PR c++/56699
451 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
452 class is derived from the type of the object.
453
454 PR c++/52014
455 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
456 unevaluated context.
457
458 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
459
460 PR c++/56722
461 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
462 DECL_TEMPLATE_INSTANTIATION.
463
464 2013-03-22 Jason Merrill <jason@redhat.com>
465
466 PR c++/56684
467 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
468 and CONST_DECL.
469
470 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
471
472 * cp-tree.h (identifier_p): New.
473 * call.c: Throughout, call identifier_p insstead of direct
474 comparaison of TREE_CODE against IDENTIFIER_NODE.
475 * decl.c: Likewisse.
476 * decl2.c: Likewise.
477 * init.c: Likewise.
478 * mangle.c: Likewise.
479 * name-lookup.c: Likewise.
480 * parser.c: Likewise.
481 * pt.c: Likewise.
482 * search.c: Likewise.
483 * semantics.c: Likewise.
484 * tree.c: Likewise.
485 * typeck.c: Likewise.
486 * typeck2.c: Likewise.
487
488 2013-03-21 Jakub Jelinek <jakub@redhat.com>
489
490 PR middle-end/48087
491 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
492 * call.c (build_temp): Likewise.
493 * method.c (synthesize_method): Likewise.
494 * typeck.c (convert_for_initialization): Likewise.
495
496 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
497
498 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
499
500 2013-03-21 Richard Biener <rguenther@suse.de>
501
502 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
503 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
504
505 2013-03-20 Jason Merrill <jason@redhat.com>
506
507 PR c++/56646
508 * parser.c (cp_parser_late_return_type_opt): Save and restore
509 current_class_ptr/ref.
510
511 PR c++/54532
512 * expr.c (cplus_expand_constant): Do nothing if the class is
513 incomplete.
514 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
515 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
516 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
517 (complete_vars): Likewise.
518
519 * name-lookup.c (get_anonymous_namespace_name): Never use
520 get_file_function_name.
521
522 * pt.c (retrieve_specialization): Handle null tmpl argument.
523
524 PR c++/17232
525 PR c++/56642
526 * pt.c (tsubst_decl): Check return value of register_specialization.
527 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
528 change.
529
530 2013-03-17 Jason Merrill <jason@redhat.com>
531
532 PR c++/54359
533 PR c++/56639
534 * parser.c (cp_parser_direct_declarator): Bail if we see a
535 qualified-id not at namespace scope.
536
537 PR c++/17232
538 PR c++/56642
539 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
540 change for now.
541
542 2013-03-16 Jason Merrill <jason@redhat.com>
543
544 * decl.c (grokdeclarator): Assert that we won't see a pointer to
545 METHOD_TYPE.
546
547 PR c++/54277
548 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
549 (MAYBE_CLASS_TYPE_P): ...here.
550 * semantics.c (lambda_capture_field_type): Only build a
551 magic decltype for wildcard types.
552 (lambda_proxy_type): Likewise.
553 (finish_non_static_data_member): Get the quals from
554 the object.
555
556 PR c++/55931
557 * parser.c (cp_parser_template_argument): Don't
558 fold_non_dependent_expr.
559
560 * parser.c (cp_parser_lambda_declarator_opt): Use
561 cp_parser_trailing_type_id.
562
563 PR c++/45917
564 * parser.c (cp_parser_template_id): Don't forget access checks.
565
566 PR c++/52374
567 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
568
569 PR c++/54764
570 PR c++/55972
571 * name-lookup.h (tag_scope): Add ts_lambda.
572 * semantics.c (begin_lambda_type): Use it.
573 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
574 * pt.c (check_default_tmpl_args): Ignore lambdas.
575 (push_template_decl_real): Handle lambdas.
576 * tree.c (no_linkage_check): Adjust lambda check.
577
578 PR c++/56039
579 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
580
581 PR c++/54359
582 * parser.c (cp_parser_direct_declarator): Fix late return
583 for out-of-class defn of member function.
584
585 PR c++/55357
586 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
587 parms to avoid duplicate -Wshadow warnings.
588
589 * search.c (lookup_base): Handle NULL_TREE.
590
591 PR c++/56481
592 * semantics.c (potential_constant_expression_1): Use of 'this' in
593 a non-constexpr function makes the expression not potentially
594 constant.
595
596 N3276
597 PR c++/52748
598 * cp-tree.h (tsubst_flags): Add tf_decltype.
599 * call.c (build_cxx_call): Don't build a temporary if it's set.
600 (build_over_call): Make sure it's only passed to build_cxx_call.
601 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
602 (cp_parser_unary_expression): Likewise.
603 (cp_parser_cast_expression): Likewise.
604 (cp_parser_binary_expression): Likewise.
605 (cp_parser_assignment_expression): Likewise.
606 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
607 (cp_parser_expression): Add decltype_p. Force a
608 temporary for a call on the LHS of a comma.
609 (cp_parser_decltype): Pass true to decltype_p parms.
610 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
611 (tsubst_copy_and_build): Pass tf_decltype down only for
612 CALL_EXPR and the RHS of COMPOUND_EXPR.
613 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
614
615 * cp-tree.h (abstract_class_use): New enum.
616 * typeck2.c (pending_abstract_type): Add use field.
617 (abstract_virtuals_error_sfinae): Add overloads taking
618 abstract_class_use instead of tree.
619 * typeck.c (build_static_cast_1): Call it.
620 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
621 * pt.c: Adjust calls.
622 * decl.c (cp_finish_decl): Don't handle functions specially.
623 (grokdeclarator): Always check return type.
624 * init.c (build_new_1): Adjust call.
625
626 DR 337
627 PR c++/17232
628 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
629 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
630
631 DR 657
632 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
633 (tsubst_arg_types): Likewise.
634
635 DR 1518
636 PR c++/54835
637 * call.c (convert_like_real): Check for explicit constructors
638 even for value-initialization.
639
640 PR c++/54946
641 * pt.c (convert_nontype_argument): Handle invalid pointer.
642
643 * parser.c (cp_parser_lambda_expression): Use nreverse.
644
645 PR c++/56447
646 PR c++/55532
647 * pt.c (instantiate_class_template_1): Instantiate lambda capture
648 list here.
649 (tsubst_copy_and_build): Not here.
650
651 PR c++/55017
652 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
653
654 PR c++/55240
655 * parser.c (parsing_nsdmi): New.
656 * semantics.c (outer_automatic_var_p): Check it.
657 (finish_id_expression): Likewise.
658 * cp-tree.h: Declare it.
659
660 PR c++/55241
661 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
662
663 * parser.c (lookup_literal_operator): Correct parm/arg naming
664 mixup.
665
666 PR c++/56238
667 * pt.c (fold_non_dependent_expr_sfinae): Check
668 instantiation_dependent_expression_p.
669
670 PR c++/56095
671 * class.c (resolve_address_of_overloaded_function): Accept a
672 reference to function for target_type.
673 (instantiate_type): Likewise.
674 * pt.c (convert_nontype_argument): Pass it to
675 convert_nontype_argument_function.
676
677 2013-03-16 Jakub Jelinek <jakub@redhat.com>
678
679 * tree.c (cp_tree_equal): Fix a pasto.
680
681 PR c++/56607
682 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
683 pass op1 through maybe_constant_value first.
684
685 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
686
687 PR c++/56582
688 * semantics.c (cxx_eval_array_reference): Check for negative index.
689
690 2013-03-14 Jason Merrill <jason@redhat.com>
691
692 PR c++/56614
693 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
694
695 PR c++/56346
696 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
697 dso_handle parm on targets without __cxa_atexit.
698
699 2013-03-11 Jason Merrill <jason@redhat.com>
700
701 PR c++/56567
702 * typeck.c (check_return_expr): Disallow returning init list here.
703 * semantics.c (apply_deduced_return_type): Not here.
704
705 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
706
707 PR c++/51412
708 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
709 * error.c (dump_expr): Likewise.
710
711 2013-03-08 Jason Merrill <jason@redhat.com>
712
713 PR c++/51884
714 * class.c (modify_all_vtables): Mangle the vtable name before
715 entering dfs_walk.
716
717 * semantics.c (lambda_expr_this_capture): In unevaluated context,
718 just return the nearest 'this'.
719
720 PR c++/51494
721 PR c++/52183
722 PR c++/56222
723 * tree.c (maybe_dummy_object): Don't capture 'this'.
724 * semantics.c (maybe_resolve_dummy): New.
725 (finish_non_static_data_member): Use it.
726 (finish_qualified_id_expr): Don't test is_dummy_object.
727 * cp-tree.h: Declare maybe_resolve_dummy.
728 * call.c (build_new_method_call_1): Use it.
729
730 PR c++/56567
731 * semantics.c (apply_deduced_return_type): Don't allow returning
732 std::initializer_list.
733
734 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
735
736 PR c++/56534
737 * parser.c (cp_parser_elaborated_type_specifier): Don't call
738 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
739 * decl.c (check_elaborated_type_specifier): Tidy.
740
741 2013-03-06 Jakub Jelinek <jakub@redhat.com>
742
743 PR c++/56543
744 * tree.c (strip_typedefs): Don't copy args if they are NULL.
745
746 2013-03-05 Jakub Jelinek <jakub@redhat.com>
747
748 * parser.c (cp_parser_braced_list): For {} initialize
749 *non_constant_p to false.
750
751 2013-03-04 Jason Merrill <jason@redhat.com>
752
753 PR c++/56464
754 PR c++/54383
755 * semantics.c (lambda_expr_this_capture): Handle NSDMI
756 and non-class scopes.
757
758 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
759
760 * decl.c (grokdeclarator): Remove dead code.
761
762 2013-02-28 Jason Merrill <jason@redhat.com>
763
764 PR c++/56481
765 * semantics.c (potential_constant_expression_1): Use
766 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
767
768 PR c++/56243
769 * call.c (build_over_call): Avoid virtual lookup in a template.
770
771 2013-02-27 Jason Merrill <jason@redhat.com>
772
773 PR c++/56358
774 PR c++/56323
775 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
776 of the base name for inheriting ctors.
777 (push_class_level_binding_1): Remove inheriting ctor handling.
778 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
779 * class.c (add_implicitly_declared_members): Adjust.
780
781 2013-02-26 David Binderman <dcb314@hotmail.com>
782
783 PR c++/55632
784 * decl.c (grokdeclarator): Tidy publicp assignment.
785
786 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
787
788 PR c++/56419
789 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
790 (build_transaction_expr): Same.
791
792 2013-02-25 Jason Merrill <jason@redhat.com>
793
794 PR c++/56377
795 * pt.c (fn_type_unification): Wait to call push_tinst_level until
796 we know what args we're looking at.
797
798 PR c++/56438
799 * semantics.c (potential_constant_expression_1): In C++98, a cast
800 to non-integral type can't be a constant expression.
801
802 2013-02-24 Jakub Jelinek <jakub@redhat.com>
803
804 PR c++/56403
805 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
806 of CLASS_TYPE_P.
807
808 2013-02-22 Jason Merrill <jason@redhat.com>
809
810 PR c++/40405
811 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
812 if we got the wrong number of template parms.
813
814 PR c++/56377
815 * pt.c (fn_type_unification): Use explicit args in template
816 instantiation context.
817
818 PR c++/56359
819 * call.c (can_convert_arg): Discard access checks.
820
821 PR c++/56395
822 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
823 args.
824
825 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
826
827 PR c++/56373
828 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
829 * cvt.c (ocp_convert): Use the latter.
830 (cp_convert_to_pointer): Likewise.
831 * decl.c (check_default_argument): Likewise.
832 * typeck.c (cp_build_binary_op): Likewise.
833 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
834
835 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
836 Paolo Carlini <paolo.carlini@oracle.com>
837
838 PR c++/51242
839 * decl2.c (grokbitfield): Allow scoped enumeration types.
840
841 2013-02-15 Jason Merrill <jason@redhat.com>
842
843 PR c++/54276
844 * semantics.c (finish_id_expression): Also return the identifier
845 for an outer local static.
846
847 PR c++/56343
848 * class.c (check_bases_and_members): Deduce noexcept after
849 checking bases.
850
851 PR c++/52026
852 * semantics.c (finish_id_expression): In a template, return
853 the identifier for a constant variable.
854
855 2013-02-14 Jason Merrill <jason@redhat.com>
856
857 PR c++/54922
858 * semantics.c (build_anon_member_initialization): New.
859 (build_data_member_initialization): Use it.
860
861 PR c++/55003
862 * decl.c (cp_finish_decl): Force instantiation of an
863 auto static data member.
864
865 PR c++/55220
866 * pt.c (unify): A pack expansion that is not the last template
867 argument makes the entire template argument list non-deduced.
868
869 PR c++/56323
870 * name-lookup.c (do_class_using_decl): Handle typedefs with
871 inheriting constructors.
872 (push_class_level_binding_1): Allow inheriting from template
873 template parameter, too.
874 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
875
876 PR c++/55223
877 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
878 default argument scope.
879 * mangle.c (write_name): Likewise.
880
881 PR c++/55232
882 * error.c (find_typenames_r): Don't walk into a pack expansion.
883
884 2013-02-13 Jason Merrill <jason@redhat.com>
885
886 PR c++/55670
887 * parser.c (cp_parser_member_declaration): Check the declarator
888 form when detecting a function declaration via typedef.
889
890 PR c++/55680
891 * pt.c (maybe_process_partial_specialization): A lambda
892 isn't what's being specialized.
893
894 PR c++/55710
895 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
896 TREE_USED.
897
898 PR c++/55879
899 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
900
901 PR c++/55993
902 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
903 non-zero offsets, too.
904
905 PR c++/56155
906 * decl.c (build_enumerator): Always convert the value to a
907 fixed underlying type.
908
909 PR c++/56135
910 * pt.c (tsubst_copy_and_build): Don't forget any new
911 captures that arose from use of dependent names.
912
913 2013-02-13 Jakub Jelinek <jakub@redhat.com>
914
915 PR c++/56302
916 * semantics.c (finish_asm_stmt): If input constraints allow
917 neither register nor memory, try maybe_constant_value to get
918 a constant if possible.
919
920 2013-02-12 Jason Merrill <jason@redhat.com>
921
922 PR c++/56285
923 * method.c (add_one_base_init): Handle base constructor
924 taking rvalue reference parm.
925
926 PR c++/56291
927 * semantics.c (sort_constexpr_mem_initializers): Handle
928 vptr out of order.
929
930 2013-02-09 Jason Merrill <jason@redhat.com>
931
932 PR c++/56268
933 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
934 maybe_instantiate_noexcept.
935
936 PR c++/56247
937 * pt.c (eq_specializations): Set comparing_specializations.
938 * tree.c (cp_tree_equal): Check it.
939 * cp-tree.h: Declare it.
940
941 * decl.c (decls_match): Check versions later.
942
943 PR c++/56238
944 * pt.c (build_non_dependent_expr): Don't try to fold
945 instantiation-dependent expressions.
946 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
947 [BIND_EXPR]: Treat as dependent.
948
949 2013-02-07 Jakub Jelinek <jakub@redhat.com>
950
951 PR c++/56241
952 * init.c (build_vec_init): Don't append NULL values into new_vec.
953 (build_zero_init_1): Don't push anything into v if recursive call
954 returned NULL_TREE.
955 (build_value_init_noctor): Don't push anything into v if
956 build_value_init call returned NULL_TREE.
957
958 PR c++/56239
959 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
960 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
961 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
962 return true only if 2nd token isn't CPP_CLOSE_PAREN.
963 (cp_parser_cast_expression): Adjust caller.
964
965 PR c++/56237
966 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
967 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
968 DECL_LANG_SPECIFIC (t).
969
970 2013-02-07 Jason Merrill <jason@redhat.com>
971
972 PR c++/56235
973 * method.c (do_build_copy_constructor): Don't bother turning
974 scalars from lvalues to xvalues.
975 (do_build_copy_assign): Likewise.
976
977 2013-02-06 Jason Merrill <jason@redhat.com>
978
979 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
980
981 2013-02-05 Jason Merrill <jason@redhat.com>
982
983 PR c++/54122
984 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
985 METHOD_TYPE.
986
987 PR c++/56177
988 * decl.c (start_preparsed_function): Update restype if we change
989 decl1.
990
991 PR c++/56208
992 * pt.c (fn_type_unification): Discard any access checks from
993 substituting explicit args.
994
995 2013-01-31 Jason Merrill <jason@redhat.com>
996
997 PR c++/56162
998 PR c++/56104
999 * typeck.c (get_member_function_from_ptrfunc): Fix
1000 ptrmemfunc_vbit_in_delta case.
1001
1002 2013-01-29 Jason Merrill <jason@redhat.com>
1003
1004 PR libstdc++/54314
1005 * class.c (build_ctor_vtbl_group): Give construction vtables
1006 hidden visibility.
1007
1008 2013-01-25 Jason Merrill <jason@redhat.com>
1009
1010 PR c++/56095
1011 * pt.c (convert_nontype_argument_function): Handle invalid input.
1012 (convert_nontype_argument): Likewise.
1013
1014 PR c++/56104
1015 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
1016 dynamic type has no virtual functions.
1017
1018 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
1019
1020 PR c++/55944
1021 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
1022 on TARGET_EXPR nodes.
1023
1024 2013-01-22 Jason Merrill <jason@redhat.com>
1025
1026 PR c++/56071
1027 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
1028
1029 2013-01-22 Dodji Seketeli <dodji@redhat.com>
1030
1031 PR c++/53609
1032 * pt.c (argument_pack_element_is_expansion_p)
1033 (make_argument_pack_select, use_pack_expansion_extra_args_p)
1034 (gen_elem_of_pack_expansion_instantiation): New static functions.
1035 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
1036 look through the possibly resulting pack expansion as well.
1037 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
1038 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
1039 Use gen_elem_of_pack_expansion_instantiation to build the
1040 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
1041 as gen_elem_of_pack_expansion_instantiation and the change in
1042 tsubst above generalize this particular case.
1043 (arg_from_parm_pack_p): Remove this for it's not used by
1044 tsubst_pack_expansion anymore.
1045
1046 2013-01-21 Jason Merrill <jason@redhat.com>
1047
1048 PR c++/56059
1049 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
1050 template args count.
1051
1052 2013-01-18 Jason Merrill <jason@redhat.com>
1053
1054 PR target/54908
1055 * decl2.c (get_local_tls_init_fn): New.
1056 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
1057 with aliases for internal variables. Don't use weakrefs if
1058 the variable needs destruction.
1059 (generate_tls_wrapper): Mark the wrapper as const if no
1060 initialization is needed.
1061 (handle_tls_init): Don't require aliases.
1062
1063 2013-01-15 Dodji Seketeli <dodji@redhat.com>
1064
1065 PR c++/55663
1066 * pt.c (coerce_innermost_template_parms): New static function.
1067 (instantiate_alias_template): Use it here.
1068
1069 2013-01-09 Jason Merrill <jason@redhat.com>
1070
1071 PR c++/55878
1072 * rtti.c (build_typeid, get_typeid): Add complain parm.
1073 (get_tinfo_decl_dynamic): Likewise.
1074 * cp-tree.h, parser.c, pt.c: Adjust.
1075
1076 PR c++/55893
1077 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
1078 needs destruction.
1079
1080 2013-01-09 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR c/48418
1083 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
1084 call maybe_constant_value for the negative or too big shift
1085 count warnings.
1086
1087 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
1088
1089 PR c++/55801
1090 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
1091 of the argument is true.
1092
1093 2013-01-08 Joel Brobecker <brobecker@adacore.com>
1094
1095 * parser.c (cp_parser_initializer_list): Move declaration
1096 of variable non_const to start of lexical block.
1097
1098 2013-01-07 Jason Merrill <jason@redhat.com>
1099
1100 PR c++/55753
1101 * tree.c (build_aggr_init_expr): Do nothing in a template.
1102 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
1103 a FUNCTION_DECL before tsubsting.
1104
1105 2013-01-04 Dodji Seketeli <dodji@redhat.com>
1106
1107 PR c++/52343
1108 * pt.c (check_instantiated_arg): Allow type template arguments.
1109
1110 2013-01-04 Jason Merrill <jason@redhat.com>
1111
1112 PR c++/55877
1113 * decl.c (reset_type_linkage, bt_reset_linkage): New.
1114 (grokdeclarator): Use reset_type_linkage.
1115 * name-lookup.c (binding_table_foreach): Handle null table.
1116 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
1117
1118 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1119
1120 PR c++/54526 (again)
1121 * parser.c (cp_parser_template_id): Revert core of previous change
1122 (keep adjusted inform message).
1123
1124 2013-01-03 Jason Merrill <jason@redhat.com>
1125
1126 PR c++/55419
1127 PR c++/55753
1128 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
1129 TREE_CONSTANT.
1130
1131 PR c++/55842
1132 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
1133
1134 PR c++/55856
1135 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
1136
1137 PR c++/53650
1138 * call.c (type_has_extended_temps): New.
1139 * cp-tree.h: Declare it.
1140 * decl.c (check_initializer): Use build_aggr_init for arrays
1141 if it is false.
1142 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1143
1144 2013-01-02 Jason Merrill <jason@redhat.com>
1145
1146 PR c++/54325
1147 * call.c (build_new_method_call_1): Don't use build_value_init for
1148 user-provided default constructors.
1149
1150 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1151
1152 PR c++/55032
1153 PR c++/55245
1154 * tree.c (build_cplus_array_type): Copy layout information
1155 to main variant if necessary.
1156 \f
1157 Copyright (C) 2013 Free Software Foundation, Inc.
1158
1159 Copying and distribution of this file, with or without modification,
1160 are permitted in any medium without royalty provided the copyright
1161 notice and this notice are preserved.