1 2009-07-24 Jason Merrill <jason@redhat.com>
4 * call.c (compare_ics): Give list-initialization of std::init_list
5 priority over conversion to scalar, too.
7 2009-07-22 Jason Merrill <jason@redhat.com>
9 * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
10 (needs_fake_anon): New.
11 (write_name): Check it.
12 (write_nested_name): Add a fake anonymous namespace scope if true.
13 * name-lookup.c (get_anonymous_namespace_name): No longer static.
14 * rtti.c, cp-tree.h: Adjust.
16 2009-07-22 Richard Guenther <rguenther@suse.de>
19 * cp-gimplify.c (cp_gimplify_expr): Move handling of using
21 (cp_genericize_r): ... genericization stage.
22 (cp_genericize): Adjust.
24 2009-07-21 Jason Merrill <jason@redhat.com>
27 * call.c (reference_binding): Implement binding to { }.
28 (initialize_reference): Binding temporary to non-const && is fine.
29 * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
31 * decl.c (reshape_init_r): { T } is not an aggregate initializer
34 2009-07-17 Richard Guenther <rguenther@suse.de>
37 * decl.c (finish_function): Do not emit unused result warnings
39 * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
40 c_warn_unused_result_pass.
41 * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
42 * optimize.c (clone_body): Clone in GENERIC.
43 (maybe_clone_body): Do not clear DECL_SAVED_TREE.
44 * decl2.c (cp_write_global_declarations): Fix body test.
45 Do not call cgraph_optimize.
46 * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
47 * method.c (use_thunk): Register thunk with
48 cgraph_finalize_function.
49 * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
51 2009-07-17 Richard Guenther <rguenther@suse.de>
53 * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
56 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
57 Manuel López-Ibáñez <manu@gcc.gnu.org>
60 * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
61 tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
62 call.c, cvt.c, mangle.c: Add location argument to
63 fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
64 build_size_arg, build_fold_addr_expr, build_call_array,
65 non_lvalue, size_diffop, fold_build1_initializer,
66 fold_build2_initializer, fold_build3_initializer,
67 fold_build_call_array, fold_build_call_array_initializer,
68 fold_single_bit_test, omit_one_operand, omit_two_operands,
69 invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
70 fold_indirect_ref, combine_comparisons, fold_builtin_*,
71 fold_call_expr, build_range_check, maybe_fold_offset_to_address,
74 2009-07-16 Jason Merrill <jason@redhat.com>
77 Split POD into "standard-layout" and "trivial" as per N2230,
78 Support std::is_standard_layout and std::is_trivial traits.
79 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
81 (struct lang_type_class): Add non_std_layout.
82 (CLASSTYPE_NON_STD_LAYOUT): New.
83 * class.c (check_bases): Set it.
84 (check_field_decls): Likewise.
85 (check_bases_and_members): Likewise.
86 * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
88 (cp_parser_trait_expr): Likewise.
89 * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
91 (finish_trait_expr): Likewise.
92 * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
93 (pod_type_p): Use them.
94 (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
96 Adjust bits of the language that no longer refer to POD types.
97 * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
98 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
99 (build_x_va_arg): Likewise.
100 (call_builtin_trap): Remove.
101 * decl.c (declare_local_label): Use type_has_nontrivial_default_init
102 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
103 (cp_finish_decl): Likewise.
104 (check_previous_goto_1, check_goto): Adjust error.
105 * typeck.c (build_class_member_access_expr): Check
106 CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
108 2009-07-14 Taras Glek <tglek@mozilla.com>
109 Rafael Espindola <espindola@google.com>
111 * Make-lang.in: Added CP_PLUGIN_HEADERS and
112 c.install-target to export cp-tree.h cxx-pretty-print.h
113 name-lookup.h headers for plugins.
115 2009-07-14 Jason Merrill <jason@redhat.com>
118 * decl.c (decls_match): A non-extern-C declaration doesn't match
119 a builtin extern-C declaration.
122 * name-lookup.c (qualified_lookup_using_namespace): Don't stop
123 looking in used namespaces just because we found something on
127 * semantics.c (perform_koenig_lookup): Handle empty template args.
129 * call.c (build_over_call): Use can_trust_pointer_alignment.
131 2009-07-14 Dodji Seketeli <dodji@redhat.com>
135 * decl2.c (grokfield): Don't call set_underlying_type on typedef
136 decls that are type names.
138 2009-07-13 Andrew Pinski <andrew_pinski@playstation.sony.com>
141 * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
142 front of qualified names.
144 2009-07-12 Jason Merrill <jason@redhat.com>
147 * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
150 * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
151 * tree.c (lvalue_p_1): Return it. Remove
152 treat_class_rvalues_as_lvalues parm.
153 (real_lvalue_p): Disallow pseudo-lvalues here.
154 (lvalue_or_rvalue_with_address_p): New fn.
155 * call.c (initialize_reference): Use it instead of real_lvalue_p.
158 * init.c (build_new_1): Handle initializer list as array initializer.
159 (build_vec_init): Likewise.
160 * typeck.c (cp_build_modify_expr): Likewise.
161 * typeck2.c (process_init_constructor_array): Error rather than abort
162 if too many initializers.
164 2009-07-10 Jakub Jelinek <jakub@redhat.com>
167 * error.c (cp_print_error_function): Check for NULL block.
169 2008-07-09 Simon Martin <simartin@users.sourceforge.net>
170 Jason Merrill <jason@redhat.com>
172 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
173 append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
175 2009-07-09 Dodji Seketeli <dodji@redhat.com>
178 * pt.c (type_unification_real): Use tsubst_template_arg instead
179 of tsubst to substitute default template arguments.
181 2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
184 * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
186 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
189 2009-07-07 Jason Merrill <jason@redhat.com>
192 * pt.c (tsubst_decl): Don't abort if we didn't change anything
193 in a TEMPLATE_DECL's args.
195 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
197 * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
200 2009-07-07 Jason Merrill <jason@redhat.com>
203 * decl.c (build_enumerator): Don't add enumerators for a
204 scoped enum to the enclosing class.
207 * decl.c (start_enum): Allow dependent underlying type.
210 * decl.c (finish_enum): Finish scope even in a template.
212 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
214 * init.c: Replace %J by an explicit location. Update all calls.
216 * typeck2.c: Likewise.
218 * name-lookup.c: Likewise.
220 2009-07-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
222 * decl.c: Replace %H by an explicit location. Update all calls.
223 * except.c: Likewise.
224 * semantics.c: Likewise.
225 * parser.c: Likewise.
227 2009-07-06 Simon Martin <simartin@users.sourceforge.net>
230 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
231 append_type_to_template_for_access_check_1): Use
232 RECORD_OR_UNION_CODE_P.
234 2009-07-04 Jason Merrill <jason@redhat.com>
236 * pt.c (retrieve_specialization): Don't get confused by a
237 using-declaration that brings in another instance of this template
240 * ptree.c (cxx_print_type): Fix logic.
242 * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
245 * cp-tree.h (struct lang_decl_parm): New.
246 (struct lang_decl): Add it.
247 (LANG_DECL_PARM_CHECK): New.
248 (DECL_PARM_INDEX): New.
249 * decl2.c (parm_index): Remove.
250 * lex.c (retrofit_lang_decl): Handle parms.
251 (cxx_dup_lang_specific_decl): Likewise.
252 * mangle.c (write_expression): Adjust.
253 * tree.c (cp_tree_equal): Adjust.
254 (decl_linkage): Only check DECL_COMDAT for functions and variables.
255 * parser.c (cp_parser_parameter_declaration_list): Set
257 * pt.c (iterative_hash_template_arg): Hash it.
259 2009-07-03 Jason Merrill <jason@redhat.com>
261 * cp-tree.h (struct lang_decl): Overhaul.
262 (struct lang_decl_flags): Remove.
263 (struct lang_decl_base): New.
264 (struct lang_decl_min): New.
265 (struct lang_decl_fn): New.
266 (struct lang_decl_ns): New.
267 (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
268 (LANG_DECL_MIN_CHECK): New.
269 (LANG_DECL_FN_CHECK): New.
270 (LANG_DECL_NS_CHECK): New.
271 (STRIP_TEMPLATE): New.
272 (NON_THUNK_FUNCTION_CHECK): Remove.
273 (DECL_DECLARES_FUNCTION_P): New.
275 * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
276 * decl.c (push_local_name, duplicate_decls): Adjust.
277 * decl2.c (start_objects): Don't set u2sel.
278 * semantics.c (finish_omp_threadprivate): Adjust.
279 * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
280 (decl_cloned_function_p): Out-of-line implementation of macros.
281 (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
282 * mangle.c (write_unqualified_name): Don't check function flags
284 * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
285 * pt.c (build_template_decl): Don't set function flags.
286 (check_default_tmpl_args): Check that it's a function.
287 (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
290 * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
291 DECL_CLONED_FUNCTION.
293 * cp-tree.h (struct lang_type_class): Move sorted_fields here.
294 * class.c (finish_struct_1): Adjust.
295 * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
296 * search.c (lookup_field_1): Adjust.
298 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
299 * decl.c (finish_method): Don't add to it.
300 * class.c (fixup_pending_inline): Remove.
301 (fixup_inline_methods): Remove.
302 (finish_struct_1): Don't call it.
304 * error.c (dump_function_name): Handle null name.
306 2009-07-02 Mark Mitchell <mark@codesourcery.com>
308 * typeck.c (cp_build_binary_op): Move warnings about use of NULL
309 in arithmetic earlier and allow comparisions of NULL with
312 2009-07-02 Jason Merrill <jason@redhat.com>
314 Use hash tables for template specialization lookup.
315 * pt.c (struct spec_entry): New type.
316 (decl_specializations, type_specializations): New hash tables.
317 (register_specialization, retrieve_specialization): Use them.
318 (reregister_specialization, lookup_template_class): Use them.
319 (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
320 (iterative_hash_template_arg): New.
321 (init_template_processing): New
322 (process_partial_specialization): Don't look to see if we already
323 have this partial specialization.
324 (maybe_process_partial_specialization): Handle reassigning
325 full specializations when we get an explicit specialization
326 of the partial instantiation.
327 (tsubst_friend_function): Adjust specialization reassignment code.
328 (instantiate_template): Only do one lookup.
329 (instantiate_decl): Don't do any lookup.
330 * cp-tree.h: Declare init_template_processing.
331 * decl.c (duplicate_decls): Pass args to reregister_specialization.
333 2009-07-01 Jason Merrill <jason@redhat.com>
335 * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
337 * pt.c (register_specialization): Use duplicate_decls to merge
338 the argument with a previous specialization.
339 (check_explicit_specialization): Call register_specialization to
340 merge the TEMPLATE_DECL with a previous version.
341 (determine_specialization): Return the args even if fn is a template.
343 2009-07-01 Ian Lance Taylor <iant@google.com>
345 * g++spec.c (lang_specific_driver): Bump num_args by 1.
347 2009-06-30 Jason Merrill <jason@redhat.com>
350 * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
353 2009-06-29 Jason Merrill <jason@redhat.com>
356 * error.c (dump_template_parms): Pass all args to
357 count_non_default_template_args.
358 (count_non_default_template_args): Pull out the inner ones.
360 2009-06-26 H.J. Lu <hongjiu.lu@intel.com>
362 * decl.c (duplicate_decls): Re-indent.
364 2009-06-25 Ian Lance Taylor <iant@google.com>
366 * call.c (avoid_sign_compare_warnings): New static function.
367 (build_new_op): Call it.
368 * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
369 TREE_NO_WARNING is set on either operand.
371 2009-06-25 Ian Lance Taylor <iant@google.com>
373 * g++spec.c (SKIPOPT): define.
374 (lang_specific_driver): Handle -static-libstdc++. Only add
375 LIBSTDCXX_STATIC if we add LIBSTDCXX.
377 2009-06-25 Ian Lance Taylor <iant@google.com>
379 * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
380 the second nor third operand has side effects.
382 2009-06-25 Ian Lance Taylor <iant@google.com>
384 * parser.c (cp_parser_binary_expression): Increment
385 c_inhibit_evaluation_warnings while parsing the right hand side of
386 "true || x" or "false && x".
387 * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
388 if c_inhibit_evaluation_warnings is zero.
390 2009-06-24 Jason Merrill <jason@redhat.com>
392 * error.c (dump_decl): Do say "typedef" for the injected class name.
394 * pt.c (lookup_template_class): Use currently_open_class,
395 compare template args later.
398 * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
399 * class.c (resolve_address_of_overloaded_function): Fix typo.
401 2009-06-18 Aldy Hernandez <aldyh@redhat.com>
403 * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
404 * decl.c (finish_decl): Remove.
405 (declare_global_var): Replace finish_decl with cp_finish_decl.
406 (start_method): Same.
407 * rtti.c (emit_tinfo_decl): Same.
408 * pt.c (tsubst_expr): Same.
409 (instantiate_decl): Same.
410 * decl2.c (grokbitfield): Same.
411 * name-lookup.c (pushdecl_top_level_1): Same.
412 * cp-tree.h: Remove finish_decl.
414 2009-06-16 David Edelsohn <edelsohn@gnu.org>
416 * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
417 (lang_specific_driver): Always allocate extra argument.
418 Add LIBSTDCXX_STATIC to arglist if defined and linking
421 2009-06-16 Ian Lance Taylor <iant@google.com>
423 * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
424 (cp/semantics.o): Depend upon gt-cp-semantics.h.
426 2009-06-16 Ian Lance Taylor <iant@google.com>
428 * parser.c (cp_unevaluated_operand): Define global variable.
429 (cp_parser_question_colon_clause): Increment
430 c_inhibit_evaluation_warnings when evaluating an expression which
431 will never be executed.
432 (cp_parser_decltype): Increment cp_unevaluated_operand and
433 c_inhibit_evaluation_warnings, not skip_evaluation.
434 (cp_parser_sizeof_operand): Likewise.
435 (cp_parser_enclosed_template_argument_list): Save
436 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
438 * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
439 Add unevaluated_operand and inhibit_evaluation_warnings fields.
440 (cp_unevaluated_operand): Declare.
441 * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
442 and c_inhibit_evaluation_warnings rather than skip_evaluation.
443 (pop_from_top_level): Restore cp_unevaluated_operand and
444 c_inhibit_evaluation_warnings rather than skip_evaluation.
445 * class.c (build_base_path): Check cp_unevaluated_operand rather
446 than skip_evaluation.
447 * typeck.c (build_class_member_access_expr): Likewise.
448 (cp_build_binary_op): Don't warn about bad shift counts if
449 c_inhibit_evaluation_warnings is non-zero.
450 * pt.c (coerce_template_parms): Save state of
451 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
453 (tsubst_aggr_type): Likewise.
454 (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
456 (tsubst_copy): Likewise.
457 (tsubst): Set cp_unevaluated_operand and
458 c_inhibit_evaluation_warnings, not skip_evaluation.
459 (tsubst_copy_and_build): Likewise.
460 * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
461 rather than skip_evaluation.
462 * decl2.c (mark_used): Likewise.
463 * semantics.c (finish_non_static_data_member): Likewise.
464 * cvt.c (cp_convert_and_check): Check
465 c_inhibit_evaluation_warnings rather than skip_evaluation.
466 * mangle.c (write_type): Set cp_unevaluated_operand rather than
469 2009-06-15 Ian Lance Taylor <iant@google.com>
471 * parser.c (cp_parser_direct_declarator): Add braces around
472 variables declared before label.
474 2009-06-15 Rafael Avila de Espindola <espindola@google.com>
476 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
477 * cp-tree.h (cxx_comdat_group): Change signature.
478 * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
479 (cxx_comdat_group): Change signature.
480 * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
482 (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
483 * method.c (use_thunk): Update call to make_decl_one_only.
484 * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
486 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
488 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
489 (build_modify_expr): New arg.
490 * semantics.c (finish_unary_op_expr): Pass location to
492 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
493 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
494 c_sizeof_or_alignof_type.
495 (build_array_ref): New argument.
496 (build_compound_expr): Same.
497 (build_const_cast): Same.
498 (build_ptrmemfunc): Pass location to build_c_cast.
499 * init.c (avoid_placement_new_aliasing): Pass location to
501 (build_vec_delete_1): Pass location to cp_build_modify_expr,
503 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
504 * decl.c (poplevel): Pass location to c_build_bind_expr.
505 (finish_case_label): Pass location to build_case_label.
506 (finish_constructor_body): Same.
507 (finish_destructor_body): Pass location to build_stmt.
508 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
509 * call.c (build_new_op): Pass location to build_array_ref.
510 (build_x_va_arg): Pass location to build_va_arg.
511 * except.c (expand_end_catch_block): Pass location to
513 * cp-tree.h (build_array_ref): New argument.
514 (build_compound_expr): Same.
515 (build_c_cast): Same.
516 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
517 (gimplify_switch_stmt): Same.
518 * typeck2.c (split_nonconstant_init_1): Same.
519 * pt.c (tsubst_copy): Same.
520 * semantics.c (add_decl_expr): Same.
522 (push_cleanup): Same.
523 (finish_goto_stmt): Same.
524 (finish_expr_stmt): Same.
525 (begin_if_stmt): Same.
526 (begin_while_stmt): Same.
527 (begin_do_stmt): Same.
528 (finish_return_stmt): Same.
529 (begin_for_stmt): Same.
530 (finish_break_stmt): Same.
531 (finish_continue_stmt): Same.
532 (begin_switch_stmt): Same.
533 (begin_try_block): Same.
534 (begin_handler): Same.
535 (finish_asm_stmt): Same.
536 (finish_label_stmt): Same.
537 (finish_stmt_expr_expr): Same.
538 (finalize_nrv_r): Same.
539 (finish_omp_atomic): Same.
540 * name-lookup.c (do_using_directive): Same.
541 * decl2.c (grok_array_decl): Same.
542 * parser.c (cp_parser_cast_expression): Same.
543 (cp_parser_selection_statement): Same.
544 (cp_parser_implicitly_scoped_statement): Same.
545 (cp_parser_objc_selector_expression): Same.
546 (cp_parser_objc_synchronized_statement): Same.
547 (cp_parser_objc_throw_statement): Same.
548 (cp_parser_omp_critical): Same.
549 (cp_parser_omp_master): Same.
550 * typeck.c (build_function_call): Add location argument.
551 * init.c: Add location argument to all build_decl calls.
560 * cp-gimplify.c: Same.
562 (cp_make_fname_decl): Add location argument. Pass location ot
564 (finish_case_label): Same.
565 * cp-tree.h (finish_case_label): Add location argument.
566 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
569 2009-06-09 Jason Merrill <jason@redhat.com>
572 * decl2.c (mark_used): Return after complaining about deleted fn.
574 2009-06-08 Jason Merrill <jason@redhat.com>
576 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
577 late-specified return type.
579 2009-06-08 Jakub Jelinek <jakub@redhat.com>
582 * call.c (check_dtor_name): Return false even if
583 get_type_value (name) is error_mark_node.
587 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
588 on error_mark_node. Check for VLAs outside of function context
589 before check whether to wrap bounds into a NOP_EXPR with
592 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
594 * repo.c (get_base_filename): Use aux_base_name rather than
595 alternate temporary file during second compare debug compilation.
596 (finish_repo): Skip during -fcompare-debug-second.
598 2009-06-06 Ian Lance Taylor <iant@google.com>
600 * parser.c (cp_parser_label_for_labeled_statement): Support
601 attribute on labels if immediately followed by semicolon.
602 * semantics.c (finish_label_stmt): Return new label.
603 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
605 2009-06-03 Ian Lance Taylor <iant@google.com>
607 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
610 2009-06-02 Mark Mitchell <mark@codesourcery.com>
612 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
614 2009-06-02 Jason Merrill <jason@redhat.com>
618 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
620 * call.c (implicit_conversion): Allow init-list conversion to scalar
621 during direct-initialization, too. Mark the conversion bad if it
622 has too many levels of braces.
623 (convert_like_real): And give a helpful error.
627 * decl.c (cp_finish_decl): Handle auto deduction from ().
628 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
629 with dependent type that is known to be a pointer.
631 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
634 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
635 specializations in an invalid namespace.
637 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
639 * error.c (print_instantiation_partial_context): Print column
642 2009-05-29 Ian Lance Taylor <iant@google.com>
644 * error.c (cp_printer): Don't use va_arg with enum type.
646 2009-05-28 Dodji Seketeli <dodji@redhat.com>
649 * cp-tree.h (canonical_type_variant): Remove this function declaration.
650 (strip_typedefs): New function declaration.
651 * tree.c (strip_typedefs): New function definition.
652 (canonical_type_variant): Remove function definition.
653 * cvt.c (convert_from_reference): No need to use
654 canonical_type_variant.
655 * typeck.c (cp_build_indirect_ref): Likewise.
656 * error.c (dump_template_bindings): Use strip_typedefs instead of
657 canonical_type_variant.
658 * pt.c (convert_template_argument, unify): Likewise.
659 * mangle.c (canonicalize_for_substitution): Don't use
660 canonical_type_variant.
662 2009-05-27 Jason Merrill <jason@redhat.com>
664 * call.c (implicit_conversion): Handle conversion from
665 initializer-list to scalar.
666 (convert_like_real): Likewise. Avoid crashing on list
667 initialization with bad conversions.
668 (can_convert): Use LOOKUP_EXPLICIT.
669 (can_convert_arg_bad): Add flags parm.
671 * typeck.c (convert_for_assignment): Pass flags.
673 2009-05-27 Ian Lance Taylor <iant@google.com>
675 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
676 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
678 2009-05-26 Ian Lance Taylor <iant@google.com>
680 * Make-lang.in (g++spec.o): Use $(COMPILER).
681 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
682 (cc1plus$(exeext)): Likewise.
684 2009-05-26 Dodji Seketeli <dodji@redhat.com>
687 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
688 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
689 (get_types_needing_access_check): Declare new entry point.
690 * pt.c (append_type_to_template_for_access_check_1,
691 get_types_needing_access_check): New functions.
692 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
693 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
694 get_types_needing_access_check, no more
695 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
696 (instantiate_class_template): Set input_location to the source
697 location of the most specialized template definition.
698 Perform access check using the RECORD_TYPE of the template, not its
699 associated most generic TEMPLATE_DECL.
700 (append_type_to_template_for_access_check): Augment function
701 comments. Use the new get_types_needing_access_check, not
702 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
703 append_type_to_template_for_access_check_1 subroutine.
705 2009-05-22 Jason Merrill <jason@redhat.com>
708 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
709 arithmetic comparisons.
710 (cp_common_type): Handle scoped enums.
712 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
713 (add_builtin_candidate, add_builtin_candidates): Likewise.
714 (convert_like_real): Likewise.
715 * class.c (check_bitfield_decl): Likewise.
716 * decl.c (check_static_variable_definition): Likewise.
717 (compute_array_index_type): Likewise.
718 * decl2.c (grokbitfield): Likewise.
719 * init.c (build_new_1): Likewise.
720 * pt.c (convert_nontype_argument): Likewise.
721 (current_instantiation): Likewise.
722 * tree.c (pod_type_p): Likewise.
723 * typeck.c (build_static_cast_1): Likewise.
724 (build_reinterpret_cast_1): Likewise.
726 2009-05-22 Richard Guenther <rguenther@suse.de>
729 * init.c (avoid_placement_new_aliasing): Remove.
730 (build_new_1): Do not call it.
732 2009-05-22 Mark Mitchell <mark@codesourcery.com>
734 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
735 * semantics.c (expand_or_defer_fn): Similarly.
737 2009-05-20 Ian Lance Taylor <iant@google.com>
739 * parser.c (cp_parser_postfix_expression): Change args to a vec.
740 Release it when done.
741 (tree_vector): Define typedef. Define VEC functions.
742 (cp_parser_parenthesized_expression_list): Change return type to
743 vec. Change all callers.
744 (cp_parser_new_expression): Change placement and initializer to
745 vecs. Release them when done.
746 (cp_parser_new_placement): Change return type to vec. Change all
748 (cp_parser_new_initializer): Likewise.
749 * typeck.c (build_function_call_vec): Just call
750 cp_build_function_call_vec.
751 (cp_build_function_call): Just build a vec and call
752 cp_build_function_call_vec.
753 (cp_build_function_call_vec): New function based on old
754 cp_build_function_call.
755 (convert_arguments): Remove nargs and argarray parameters. Change
756 values to a vec. Change caller.
757 (build_x_compound_expr_from_vec): New function.
758 (cp_build_modify_expr): Build vec to pass to
759 build_special_member_call.
760 * call.c (struct z_candidate): Add first_arg field. Change args
762 (convert_class_to_reference): Handle first argument separately.
763 (add_candidate): Add first_arg parameter. Change args parameter
764 to vec. Change all callers.
765 (add_function_candidate, add_conv_candidate): Likewise.
766 (add_template_candidate_real, add_template_candidate): Likewise.
767 (add_template_conv_candidate): Likewise.
768 (build_user_type_conversion_1): Handle first argument separately.
769 (resolve_args): Change return type and parameter type to vecs.
771 (perform_overload_resolution): Change args parameter to vec.
773 (build_new_function_call, build_operator_new_call): Likewise.
774 (add_candidates): Likewise.
775 (build_op_call): New globally visible function, built from and
776 replacing static function build_object_call.
777 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
779 (build_op_delete_call): Build vec to pass to
780 cp_build_function_call_vec.
781 (build_temp): Build vec to pass to build_special_member_call.
782 (convert_like_real): Likewise.
783 (perform_direct_initialization_if_possible): Likewise.
784 (build_over_call): Handle first_arg field. Use build_call_array
785 rather than build_call_list.
786 (build_special_member_call): Change args parameter to vec. Change
788 (build_new_method_call): Likewise.
789 * init.c (expand_default_init): Change parms to vec.
790 (build_raw_new_expr): Change placement and init to vecs. Change
792 (build_new_1, build_new): Likewise.
793 * class.c (resolve_address_of_overloaded_function): Build array to
794 pass to fn_type_unification.
795 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
796 build_new. For CALL_EXPR create a vec rather than a tree_list;
797 expand a pack if necessary.
798 (fn_type_unification): Change args parameter to const tree *. Add
799 nargs parameter. Change all callers.
800 (type_unification_real): Likewise.
801 (unify): Build array to pass to type_unification_real.
802 (get_bindings): Build array to pass to fn_type_unification.
803 (any_type_dependent_arguments_p): Change args parameter to a vec.
805 (make_args_non_dependent): Renamed from build_non_dependent_args.
806 Change return type to void. Change parameter type to vec. Change
808 (do_auto_deduction): Pass an array to type_unification_real.
809 * semantics.c (perform_koenig_lookup): Change args to vec. Change
811 (finish_call_expr): Change args to vec. Change all callers. Call
812 build_op_call instead of passing CALL_EXPR to build_new_op.
813 (cxx_omp_create_clause_info): Allocate vec to pass to
814 build_special_member_call.
815 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
816 to vec. Change all callers.
817 * name-lookup.c (lookup_function_nonclass): Likewise.
818 (struct arg_lookup): Change args to vec.
819 (arg_assoc_namespace): Handle args as a vec.
820 (arg_assoc_args_vec): New static function.
821 (lookup_arg_dependent): Change args parameter to vec. Change all
823 * method.c (do_build_assign_ref): Allocate vec to pass to
824 build_special_member_call.
825 * except.c (build_throw): Likewise.
826 * typeck2.c (build_functional_cast): Likewise.
827 * cvt.c (ocp_convert): Likewise.
828 * tree.c (build_min_non_dep_call_vec): Change last parameter to
829 vec. Change all callers.
830 * cp-tree.h: Update declarations.
831 * name-lookup.h: Update declarations.
833 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
835 * typeck.c (default_conversion): Check targetm.promoted_type.
836 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
837 (grokparms): Check targetm.invalid_parameter_type.
838 * cvt.c (ocp_convert): Check targetm.convert_to_type.
839 (build_expr_type_conversion): Check targetm.promoted_type.
841 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
843 * typeck.c (build_binary_op): Allow % on integal vectors.
845 2009-05-18 Jason Merrill <jason@redhat.com>
847 Implement explicit conversions ops as specified in N2437.
848 * decl.c (grokdeclarator): Handle explicit conversion ops.
849 (check_initializer): Pass flags to store_init_value.
850 * decl2.c (maybe_emit_vtables): Likewise.
851 * init.c (expand_aggr_init_1): Likewise.
852 * call.c (convert_class_to_reference): Take flags parm,
853 check DECL_NONCONVERTING_P.
854 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
855 (add_builtin_candidates): Simplify getting type of conversion.
856 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
857 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
858 (reference_binding): Take flags parm. Direct-initialize copy parm.
859 (add_function_candidate): Direct-initialize the copy parm.
860 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
861 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
862 (conditional_conversion): Likewise.
863 (convert_like_real): Only complain about DECL_NONCONVERTING_P
865 (perform_implicit_conversion_flags): Add flags parm to
866 perform_implicit_conversion. Improve diagnostics.
867 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
868 (LOOKUP_COPY_PARM): New bit macro.
869 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
870 * typeck.c (convert_for_assignment): Take flags parm, pass it to
871 perform_implicit_conversion_flags.
872 (cp_build_modify_expr): Pass flags to convert_for_assignment.
873 (convert_for_initialization): Likewise.
874 * typeck2.c (store_init_value): Take flags parm, pass to
876 (digest_init_flags): Add flags parm to digest_init.
877 (digest_init_r): Take flags parm, pass to convert_for_initialization.
878 (process_init_constructor_array): Pass it.
879 (process_init_constructor_record): Likewise.
880 (process_init_constructor_union): Likewise.
882 2009-05-16 Jason Merrill <jason@redhat.com>
885 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
886 with a dependent type. Actually look up the destructor.
887 * semantics.c (finish_id_expression): Fix logic.
888 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
890 * typeck.c (build_x_unary_op): Diagnose taking the address of a
891 constructor or destructor.
892 * tree.c (get_first_fn): Handle OFFSET_REF.
894 2009-05-17 Joseph Myers <joseph@codesourcery.com>
896 * tree.c (cxx_printable_name_internal): Allow consecutive
897 translated and untranslated cached copies of the name of the
900 2009-05-15 Ian Lance Taylor <iant@google.com>
902 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
903 cp_lvalue_kind. Change all uses.
904 (enum base_access_flags): Rename from enum base_access. Change
906 * parser.c (enum cp_parser_flags): Remove enum tag.
908 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
911 * call.c (build_new_op): Update calls to warn_logical_operator.
913 2009-05-14 Ian Lance Taylor <iant@google.com>
915 * class.c (layout_class_type): Change itk to unsigned int.
916 * decl.c (finish_enum): Change itk to unsigned int.
917 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
920 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
922 * decl.c (duplicate_decls): Preserve parameter attributes.
924 2009-05-10 Jan Hubicka <jh@suse.cz>
926 * decl2.c (cxx_callgraph_analyze_expr): Use
927 cgraph_mark_address_taken.
929 2009-05-10 Joseph Myers <joseph@codesourcery.com>
931 * call.c (name_as_c_string): Call type_as_string_translate.
932 Translate identifiers to locale character set.
933 * cp-tree.h (lang_decl_name): Update prototype.
934 (type_as_string_translate, decl_as_string_translate,
935 cxx_printable_name_translate): Declare.
936 * cxx-pretty-print.c (M_): Define.
937 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
938 English fragments for conditional translation with M_.
939 * decl.c (grokdeclarator): Translate identifiers to locale
940 character set for diagnostics.
941 * error.c (M_): Define.
942 (dump_template_bindings, dump_type, dump_aggr_type,
943 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
944 dump_function_decl, dump_template_parms, dump_expr,
945 dump_binary_op, op_to_string, assop_to_string): Mark English
946 fragments for conditional translation with M_.
947 (type_as_string): Disable translation of identifiers.
948 (type_as_string_translate): New.
949 (expr_as_string): Disable translation of identifiers.
950 (decl_as_string): Disable translation of identifiers.
951 (decl_as_string_translate): New.
952 (lang_decl_name): Add parameter translate.
953 (args_to_string): Call type_as_string_translate.
954 (cp_print_error_function): Call cxx_printable_name_translate.
955 (print_instantiation_full_context,
956 print_instantiation_partial_context): Call
957 decl_as_string_translate.
958 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
959 identifier in diagnostic.
960 * tree.c (cxx_printable_name): Change to
961 cxx_printable_name_internal. Add parameter translate.
962 (cxx_printable_name, cxx_printable_name_translate): New wrappers
963 round cxx_printable_name_internal.
965 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
968 * call.c (build_call_a): Updated warn_deprecated_use call.
969 (build_over_call): Likewise.
970 * decl.c (grokdeclarator): Likewise.
971 (grokparms): Likewise.
972 * semantics.c (finish_id_expression): Likewise.
973 * typeck.c (build_class_member_access_expr): Likewise.
974 (finish_class_member_access_expr): Likewise.
976 2009-05-06 Dodji Seketeli <dodji@redhat.com>
979 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
980 whole list of PARM_DECLs, just the current one.
982 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
985 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
986 mangle_compound_literal): Remove unused declarations.
987 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
988 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
989 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
990 check_for_out_of_scope_variable, print_other_binding_stack,
991 maybe_push_decl, cxx_mark_addressable, force_target_expr,
992 build_target_expr_with_type, finish_case_label,
993 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
994 check_template_keyword, cxx_omp_predetermined_sharing,
995 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
996 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
997 cxx_omp_privatize_by_reference): Rearrange the declarations line to
998 match the comment that indicates the .c file which the functions are
1000 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1001 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1003 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
1005 * typeck.c (cp_build_compound_expr): Require RHS to have a known
1007 * class.c (resolve_address_of_overloaded_function): Use
1008 OVL_CURRENT for error message.
1009 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1010 with them. Do not copy the node.
1012 2009-05-05 Jakub Jelinek <jakub@redhat.com>
1015 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1016 set it from its operand's type after tsubst_expr.
1018 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1021 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
1022 canonical spelling for keywords.
1023 (cp_parser_attribute_list): Use the canonical spelling for
1024 keywords in attributes.
1026 2009-05-01 Joseph Myers <joseph@codesourcery.com>
1028 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1029 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1030 pp_cxx_new_expression, pp_cxx_delete_expression,
1031 pp_cxx_unary_expression, pp_cxx_assignment_operator,
1032 pp_cxx_assignment_expression, pp_cxx_expression,
1033 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1034 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1035 pp_cxx_exception_specification, pp_cxx_direct_declarator,
1036 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1037 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1038 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1039 pp_cxx_declaration, pp_cxx_typeid_expression,
1040 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1041 pp_cxx_trait_expression): Mostly use pp_string and
1042 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1043 for non-identifiers. Mark English strings for translation.
1044 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1045 * error.c (dump_template_parameter, dump_template_bindings,
1046 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1047 dump_decl, dump_template_decl, dump_function_decl,
1048 dump_parameters, dump_exception_spec, dump_template_parms,
1049 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1050 assop_to_string, args_to_string, cp_print_error_function,
1051 print_instantiation_full_context,
1052 print_instantiation_partial_context): Mostly use pp_string and
1053 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1054 for non-identifiers. Mark English strings for translation.
1055 (dump_global_iord): Mark strings for translation; use longer
1056 strings instead of substituting single words.
1057 (function_category): Return a format string marked for
1058 translation, not a single word or phrase to substitute in a longer
1061 2009-04-28 Ben Elliston <bje@au.ibm.com>
1066 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1068 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1070 2009-04-27 Ian Lance Taylor <iant@google.com>
1072 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1075 2009-04-27 Jakub Jelinek <jakub@redhat.com>
1078 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1079 -Wunused-value if implicit.
1081 2009-04-24 Ian Lance Taylor <iant@google.com>
1083 * call.c (build_temp): Change 0 to enum constant.
1084 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1086 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1087 * decl2.c (constrain_visibility): Likewise.
1088 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1089 (cp_parser_flags): Typedef to int rather than enum type.
1090 (cp_parser_expression_stack_entry): Change prec field to enum
1093 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1096 2009-04-22 Dodji Seketeli <dodji@redhat.com>
1099 * parser.c (cp_parser_template_argument_list): Display an error
1100 when an ellipsis is not preceded by a parameter pack. Also, warn
1101 about variadic templates usage without -std=c++0x.
1103 2009-04-21 Taras Glek <tglek@mozilla.com>
1105 * cp-tree.h: Update GTY annotations to new syntax.
1107 * mangle.c: Likewise.
1108 * name-lookup.c: Likewise.
1109 * name-lookup.h: Likewise.
1110 * parser.c: Likewise.
1113 * semantics.c: Likewise.
1114 * typeck2.c: Likewise.
1116 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1119 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1121 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1124 * typeck.c (check_for_casting_away_constness): We diagnose casting
1125 away any qualifiers not just constness.
1126 (casts_away_constness): Mention that it handles more than just
1129 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1131 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1132 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1133 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1134 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1135 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1136 cfns.gperf: Add copyright and license notices.
1137 * cfns.h: Regenerate.
1138 * ChangeLog, ChangeLog-2004: Correct dates.
1140 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1143 * tree.c (lvalue_p_1): Use const_tree.
1144 Use CONST_CAST_TREE to avoid warning.
1145 (lvalue_p): Returns bool, receives const_tree.
1147 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1150 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1151 * error.c (pedwarn_cxx98): New.
1152 * cp-tree.h (pedwarn_cxx98): Declare.
1154 2009-04-20 Le-Chun Wu <lcwu@google.com>
1157 * init.c (build_vec_init): Set TREE_NO_WARNING on the
1158 compiler-generated INDIRECT_REF expression.
1160 2009-04-20 Ian Lance Taylor <iant@google.com>
1162 * typeck.c (build_function_call_vec): New function.
1163 (cp_build_function_call): Only pass first parameter to
1164 objc_rewrite_function_call.
1165 (build_modify_expr): Add rhs_origtype parameter. Change all
1167 * decl.c (finish_decl): Add origtype parameter. Change all
1169 * semantics.c (finish_call_expr): Pass VEC to
1170 resolve_overloaded_builtin.
1172 2009-04-20 Ian Lance Taylor <iant@google.com>
1174 * cp-tree.h (base_access): Change typedef to int.
1175 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
1176 (cp_parser_omp_threadprivate): Likewise.
1177 * pt.c (unify_pack_expansion): Add casts to enum type.
1179 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1183 * call.c (build_new_op): Save the original codes of operands
1186 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
1188 * cp-tree.h: Remove the prototype for insert_block.
1189 * decl.c (insert_block): Remove.
1191 2009-04-16 Ian Lance Taylor <iant@google.com>
1193 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
1194 (tsubst_flags_t): Change typedef from enum type to int.
1196 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
1198 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
1199 instead of targetm.vector_opaque_p.
1201 2009-04-15 Le-Chun Wu <lcwu@google.com>
1204 * call.c (build_over_call): Set TREE_NO_WARNING on the
1205 compiler-generated INDIRECT_REF expression.
1206 * cvt.c (convert_to_void): Emit warning when stripping off
1209 2009-04-14 Diego Novillo <dnovillo@google.com>
1211 * parser.c (cp_parser_type_specifier_seq): Move call to
1212 invoke_plugin_callbacks ...
1213 (cp_parser_type_specifier_seq): ... here.
1215 2009-04-14 Le-Chun Wu <lcwu@google.com>
1217 * Make-lang.in: Modify dependencies of files including plugin.h.
1218 * decl.c (finish_function): Call invoke_plugin_callbacks.
1219 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
1221 2009-04-14 Jason Merrill <jason@redhat.com>
1224 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
1225 about shadowing by tentative parms.
1227 2009-04-13 Jason Merrill <jason@redhat.com>
1230 * call.c (build_over_call): Don't call memcpy if the target is
1231 the same as the source.
1233 2009-04-13 Jason Merrill <jason@redhat.com>
1236 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
1238 2009-04-12 Jason Merrill <jason@redhat.com>
1241 * call.c (joust): Don't crash on variadic fn.
1243 2009-04-10 Jason Merrill <jason@redhat.com>
1246 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
1247 if we see a close brace without an open brace.
1249 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
1251 * parser.c (cp_parser_class_specifier): Remove the unused
1252 has_trailing_semicolon.
1254 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
1257 * parser.c (cp_parser_check_template_parameters): Take a
1258 cp_declarator parameter.
1259 (cp_parser_elaborated_type_specifier): Update to
1260 cp_parser_check_template_parameters.
1261 (cp_parser_class_head): Likewise.
1262 (cp_parser_check_declarator_template_parameters): Likewise.
1263 (cp_parser_check_template_parameters): Handle first the non-error
1264 conditions. Give more accurate diagnostics if a declarator is
1267 2009-04-08 Jason Merrill <jason@redhat.com>
1270 * error.c (dump_aggr_type): Chase template typedefs if
1271 -fno-pretty-templates.
1273 2009-04-08 Dodji Seketeli <dodji@redhat.com>
1276 * parser.c (cp_parser_enumerator_definition): Make sure the
1277 initializer of the enumerator doesn't contain any bare parameter pack.
1279 2009-04-07 Jason Merrill <jason@redhat.com>
1282 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
1283 * call.c (joust): Complain about mismatched default arguments
1284 in extern "C" functions.
1285 * class.c (resolve_address_of_overloaded_function): Handle multiple
1286 extern "C" functions.
1287 * pt.c (resolve_overloaded_unification): Likewise.
1289 2009-04-07 Jason Merrill <jason@redhat.com>
1292 * error.c (dump_function_decl): Don't pretty-print templates
1293 if -fno-pretty-templates.
1294 (count_non_default_template_args): Print all args if
1295 -fno-pretty-templates.
1297 2009-04-06 Jason Merrill <jason@redhat.com>
1300 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
1301 the deduced template arguments give us the parameter types
1304 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
1305 Jason Merrill <jason@redhat.com>
1308 * error.c (count_non_default_template_args): New fn.
1309 (dump_template_parms): Call it.
1310 (dump_template_argument_list): Call it. Add parms parm.
1311 (dump_template_argument): Adjust call to dump_template_argument_list.
1312 (dump_type, dump_decl): Likewise.
1313 (dump_template_bindings): Refactor logic.
1315 2009-04-03 Jason Merrill <jason@redhat.com>
1318 * error.c (dump_template_bindings): Look through typedefs in
1320 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
1321 (find_typenames_r): Also collect typedefs.
1322 * pt.c (unify): Strip typedefs.
1325 * semantics.c (finish_id_expression): Don't assume a dependent
1326 member of the current instantiation isn't a valid integral
1327 constant expression. Check dependent_scope_p.
1328 * pt.c (dependent_scope_p): Check TYPE_P.
1329 (tsubst_copy): If args is null, just return.
1331 2009-04-02 Jason Merrill <jason@redhat.com>
1334 * error.c (find_typenames, find_typenames_r): New fns.
1335 (dump_function_decl): Call find_typenames.
1336 (dump_template_bindings): Print typenames as well.
1337 * pt.c (tsubst): Non-static.
1338 * cp-tree.h: Declare it.
1340 2009-04-02 Dodji Seketeli <dodji@redhat.com>
1343 * decl2.c (grokfield): when a typedef appears in a
1344 class, create the typedef variant type node for it.
1345 (save_template_attributes): Creating typedef variant type node
1346 here is now useless.
1347 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1348 anonymous, set the proper type name to all its type variants.
1349 (xref_basetypes) : Fixup the variant types after setting
1351 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1352 set_underlying_type function to install typedef variant types.
1353 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1355 (append_type_to_template_for_access_check): New entry points.
1356 * semantics.c (check_accessibility_of_qualified_id):
1357 When a typedef that is a member of a class appears in a template,
1358 add it to the template. It will be ...
1359 * class.c (finish_struct_bits): Split type variant fixup into ...
1360 (fixup_type_variants): A new entry point.
1361 * pt.c (instantiate_class_template, instantiate_template ): ... access
1362 checked at template instantiation time.
1363 (resolve_type_name_type): The type name should be the name of the
1365 (retrieve_specialization): Specializations of template typedefs aren't
1366 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
1367 (append_type_to_template_for_access_check): New entry point.
1368 (tsubst_decl): For typedefs, build the variant type from the correct
1370 (get_class_bindings): Fix function comment.
1371 (perform_typedefs_access_check): New entry point.
1373 2009-03-31 Jason Merrill <jason@redhat.com>
1376 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
1377 extern "C" declarations.
1380 * semantics.c (finish_non_static_data_member): Allow such references
1381 without an associated object in sizeof/decltype/alignof.
1383 * ptree.c (cxx_print_decl): Pretty-print full name of
1385 (cxx_print_type): Pretty-print full name of class.
1387 * decl.c (grokdeclarator): Reject pointer to qualified function
1390 PR c++/37806, core issue 547
1391 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
1393 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
1395 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
1396 * decl.c (groktypename): Add is_template_arg parameter.
1397 (grokdeclarator): Allow function cv-quals on a template type arg.
1398 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
1399 is_template_arg argument in calls to groktypename.
1400 * cp-tree.h: Adjust prototype.
1401 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
1402 FUNCTION_TYPE printing.
1404 * mangle.c (write_expression): Mangle dependent name as
1407 PR c++/38030, 38850, 39070
1408 * pt.c (type_dependent_expression_p_push): New fn.
1409 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
1410 substitution makes the call non-dependent. Preserve koenig_p.
1411 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
1412 for non-dependent calls.
1413 * semantics.c (finish_call_expr): Revert earlier changes.
1414 * cp-tree.h: Revert change to finish_call_expr prototype.
1416 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1418 PR preprocessor/34695
1419 * cp-tree.h (cp_cpp_error): Remove.
1420 * error.c (cp_cpp_error): Remove.
1421 * parser.c (cp_lexer_new_main): Set done_lexing instead of
1422 client_diagnostic and error callback.
1424 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
1426 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1427 * cp/cp-objcp-common.c (cxx_staticp): Remove.
1428 * cp/cp-tree.h (cxx_staticp): Remove.
1430 2009-03-28 Jakub Jelinek <jakub@redhat.com>
1433 * parser.c (cp_parser_postfix_expression): Don't call
1434 warning_if_disallowed_function_p.
1436 2009-03-27 Jan Hubicka <jh@suse.cz>
1438 * except.c (choose_personality_routine): Set terminate_node to abort
1439 for java exceptions.
1441 2009-03-27 Dodji Seketeli <dodji@redhat.com>
1442 Jakub Jelinek <jakub@redhat.com>
1445 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
1446 (cp_function_decl_explicit_p): New prototype.
1447 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
1449 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
1452 * parser.c (cp_parser_elaborated_type_specifier): If we have a
1453 typename tag and don't have either a TYPE_DECL or a
1454 TEMPLATE_ID_EXPR, set the type to NULL.
1456 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1459 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
1462 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1465 * decl.c (check_array_designated_initializer): Handle error_mark_node.
1467 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1470 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1472 2009-03-26 Andrew Haley <aph@redhat.com>
1475 * decl2.c (possibly_inlined_p): If java exceptions are in use
1476 don't inline a decl unless it is explicitly marked inline.
1477 * lex.c: (pragma_java_exceptions): New variable.
1478 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
1479 * cp-tree.h (pragma_java_exceptions): Declare new variable.
1481 2009-03-24 Jason Merrill <jason@redhat.com>
1484 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1486 2009-03-23 Jakub Jelinek <jakub@redhat.com>
1489 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1490 code if iter is the second operand.
1491 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1492 argument. If it is set, don't build the toplevel expression with
1493 build_x_binary_op, but build2.
1494 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
1496 (cp_parser_omp_for_cond): Don't assume the first operand of the
1497 comparison must be decl.
1499 2009-03-23 Jason Merrill <jason@redhat.com>
1502 * pt.c (make_fnparm_pack): Split out from...
1503 (instantiate_decl): ...here.
1504 (tsubst_pack_expansion): Handle being called in a late-specified
1508 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1511 2009-03-20 Jason Merrill <jason@redhat.com>
1514 * parser.c (cp_parser_direct_declarator): In a template, wrap
1515 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1516 * pt.c (tsubst): Preserve it in a partial instantiation.
1517 (dependent_type_p_r): Don't check value_dependent_expression_p.
1518 * decl.c (compute_array_index_type): Don't check
1519 value_dependent_expression_p if TREE_SIDE_EFFECTS.
1522 * typeck2.c (check_narrowing): Don't complain about loss of
1523 precision when converting a floating-point constant.
1525 2009-03-19 Jakub Jelinek <jakub@redhat.com>
1528 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1529 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1531 2009-03-18 Jakub Jelinek <jakub@redhat.com>
1533 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1534 (eof_token): Adjust.
1536 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
1539 * parser.c (cp_parser_explicit_specialization): Don't skip the
1540 rest of the specialization when begin_specialization returns
1543 2009-03-17 Jason Merrill <jason@redhat.com>
1545 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1546 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1547 * pt.c (check_explicit_specialization): Likewise.
1548 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1549 local specialization.
1550 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1551 * decl2.c (parm_index): New fn.
1552 * semantics.c (finish_decltype_type): Don't use describable_type.
1553 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
1554 Give a sorry for unsupported codes rather than crash. Mangle
1555 conversions with other than 1 operand. New mangling for PARM_DECL.
1556 * operators.def (ALIGNOF_EXPR): Mangle as "az".
1558 2009-03-17 Jing Yu <jingyu@google.com>
1561 * method.c (use_thunk): Change is_thunk from crtl to cfun.
1563 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1566 * semantics.c (check_trait_type): New.
1567 (finish_trait_expr): Use it.
1569 2009-03-17 Jakub Jelinek <jakub@redhat.com>
1571 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1572 instead of calling imported_module_or_decl debug hook if
1573 building_stmt_tree ().
1574 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1575 is a NAMESPACE_DECL.
1578 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1579 hook at function scope.
1582 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1585 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1588 * semantics.c (finish_switch_cond): Don't call get_unwidened.
1589 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1590 instead of TREE_TYPE (cond).
1592 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1595 * parser.c (cp_parser_late_parsing_default_args): Continue
1596 the loop when cp_parser_assignment_expression returns
1599 2009-03-07 Jason Merrill <jason@redhat.com>
1602 * init.c (build_new_1): Don't use a VLA type.
1603 (build_vec_init): Handle getting a pointer for BASE.
1605 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1608 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1609 when mangling symbols.
1611 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1614 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1616 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1618 * decl.c (record_builtin_java_type): Use canonicalized integer
1621 2009-03-04 Jason Merrill <jason@redhat.com>
1624 * class.c (is_really_empty_class): New fn.
1625 * cp-tree.h: Declare it.
1626 * cp-objcp-common.c (cp_expr_size): Use it.
1629 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1630 * parser.c (cp_parser_postfix_expression): Call it for
1632 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1633 (get_first_fn): Likewise.
1639 * decl.c (make_typename_type): Do look inside currently open classes.
1640 * parser.c (cp_parser_lookup_name): Likewise.
1641 (cp_parser_template_name): Likewise.
1642 * pt.c (dependent_scope_p): New function.
1643 * cp-tree.h: Declare it.
1644 * class.c (currently_open_class): Return fast if T isn't a class.
1646 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1649 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1650 if cp_parser_mem_initializer_id returns error_mark_node.
1652 2009-02-24 Richard Guenther <rguenther@suse.de>
1655 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1658 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1661 * pt.c (coerce_template_template_parms): Return 0 if parameter
1664 2009-02-23 Jason Merrill <jason@redhat.com>
1666 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1667 deducing from an initializer list.
1669 2009-02-20 Jason Merrill <jason@redhat.com>
1672 * decl.c (grokdeclarator): Handle ~identifier.
1674 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1677 * decl2.c (determine_visibility): If visibility changed and
1678 DECL_RTL has been already set, call make_decl_rtl to update symbol
1681 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1684 * cp-tree.h (maybe_commonize_var): New.
1686 * decl.c (maybe_commonize_var): Make it extern.
1688 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1690 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1693 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1695 2009-02-18 Jason Merrill <jason@redhat.com>
1697 * cfns.h: Tweak pathname for cfns.gperf.
1699 2009-02-13 Jason Merrill <jason@redhat.com>
1702 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1703 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1704 * cp-tree.h: Adjust prototype.
1705 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1707 2009-02-12 Jason Merrill <jason@redhat.com>
1710 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1712 2009-02-11 Jason Merrill <jason@redhat.com>
1715 * decl2.c (cp_write_global_declarations):
1716 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1719 * init.c (build_value_init_noctor): Split out from...
1720 (build_value_init): ...here.
1721 (expand_aggr_init_1): Handle value-initialization.
1722 * cp-tree.h: Add declaration.
1723 * class.c (type_has_user_provided_constructor):
1724 Handle non-class arguments.
1726 2009-02-10 Jason Merrill <jason@redhat.com>
1729 * class.c (defaultable_fn_p): Handle ... properly.
1732 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1733 treat_class_rvalues_as_lvalues, too.
1735 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1738 * typeck.c (build_x_array_ref): New.
1739 * cp-tree.h: Declare it.
1740 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1742 2009-02-09 Jason Merrill <jason@redhat.com>
1745 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1746 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1747 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1748 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1749 for build_value_init TARGET_EXPR.
1750 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1752 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1756 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1758 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1761 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1762 remove ./dt operator.
1763 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1764 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1765 write_string ("dt") instead of using operators.def.
1767 2009-02-03 Jason Merrill <jason@redhat.com>
1769 * typeck.c (cp_build_unary_op): Only complain about taking address
1770 of main if pedantic.
1772 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1775 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1778 * typeck2.c (digest_init_r): Don't call process_init_constructor
1781 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1784 * pt.c (convert_nontype_argument_function): Expect expr to be an
1788 * typeck.c (merge_types): Call resolve_typename_type if only
1789 one type is a typename.
1791 2009-02-02 Jason Merrill <jason@redhat.com>
1794 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1797 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1800 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1801 do not call cp_lexer_consume_token.
1803 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1806 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1809 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1812 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1814 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1817 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1819 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1821 * typeck.c (invalid_nonstatic_memfn_p): Use
1822 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1824 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1827 * call.c (build_over_call): If convert_for_arg_passing returns
1828 error_mark_node unconditionally return it.
1830 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1832 * class.c (check_field_decls): Also inherit packed for bitfields
1833 regardless of their type.
1835 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1838 * decl2.c (grokfield): Reverting changes of PR c++/26693
1839 (save_template_attributes): Likewise.
1840 * decl.c (grokdeclarator): Likewise.
1841 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1842 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1843 (append_type_to_template_for_access_check): Likewise.
1844 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1845 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1847 (resolve_type_name_type): Likewise.
1848 (append_type_to_template_for_access_check): Likewise.
1850 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1853 * decl2.c (grokfield): when a typedef appears in a
1854 class, create the typedef variant type node for it.
1855 (save_template_attributes): Creating typedef variant type node
1856 here is now useless.
1857 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1858 anonymous, set the proper type name to all its type variants.
1859 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1860 set_underlying_type function to install typedef variant types.
1861 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1863 (append_type_to_template_for_access_check): New entry points.
1864 * semantics.c (check_accessibility_of_qualified_id):
1865 When a typedef that is a member of a class appears in a template,
1866 add it to the template. It will be ...
1867 * pt.c (instantiate_class_template, instantiate_template ): ... access
1868 checked at template instantiation time.
1869 (tsubst): Handle the case of being called with NULL args.
1870 (resolve_type_name_type): The type name should be the name of the
1872 (append_type_to_template_for_access_check): New entry point.
1874 2009-01-19 Jason Merrill <jason@redhat.com>
1877 * parser.c (cp_parser_unqualified_id): In a template,
1879 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1881 2009-01-16 Jason Merrill <jason@redhat.com>
1884 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1885 * init.c (build_new): Don't call describable_type unless we
1889 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1892 * search.c (protected_accessible_p): N doesn't vary.
1894 2009-01-15 Jason Merrill <jason@redhat.com>
1897 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1898 accept hidden friends.
1900 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1903 * decl.c (grokdeclarator): Check for a non namespace/class context.
1905 2009-01-15 Jason Merrill <jason@redhat.com>
1909 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1910 a function isn't necessarily an lvalue. Take tree, not const_tree.
1911 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1912 * typeck.c (lvalue_or_else): Likewise.
1913 * cp-tree.h: Adjust prototypes.
1915 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1918 * pt.c (tsubst): Check for NULL args.
1920 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1923 * name-lookup.c (pushtag): Don't create members to types that are not
1926 2009-01-14 Nick Clifton <nickc@redhat.com>
1929 * parser.c: Pass cp_id_kind computed in
1930 cp_parser_postfix_dot_deref_expression to
1931 cp_parser_primary_expression.
1933 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1936 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1937 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1940 2009-01-12 Jason Merrill <jason@redhat.com>
1941 Steve Ellcey <sje@cup.hp.com>
1944 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1947 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1950 * pt.c (parameter_of_template_p): New function.
1951 * cp-tree.h: Declare it.
1952 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1954 (outer_binding): Take template parameters in account when looking for
1957 2009-01-12 Jason Merrill <jason@redhat.com>
1960 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1962 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1965 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1966 offsetof member-designator, handle it as `[0].'.
1969 * decl.c (start_function): If grokdeclarator hasn't returned
1970 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1972 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1975 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1976 (gimplify_if_stmt): ... this.
1977 (cp_gimplify_expr): Don't handle IF_STMT here.
1978 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1980 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1983 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1986 * typeck2.c (build_functional_cast): Check for reference type and NULL
1989 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1991 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1993 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1996 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1998 2009-01-09 John F. Carr <jfc@mit.edu>
2001 * parser.c (cp_parser_class_specifier): Clear
2002 parser->in_unbraced_linkage_specification_p while parsing class
2005 2009-01-07 Jakub Jelinek <jakub@redhat.com>
2008 * semantics.c (finish_goto_stmt): Convert destination to
2011 2009-01-06 Jason Merrill <jason@redhat.com>
2018 * pt.c (check_default_tmpl_args): Don't complain about
2019 out-of-order parameter packs in the enclosing class
2020 or parameter packs after default args.
2021 (coerce_template_parms): If we have more than one
2022 parameter pack, don't flatten argument packs.
2023 (template_args_equal): Handle argument packs.
2024 (comp_template_args): Don't flatten argument packs.
2025 (check_instantiated_arg): Split out from...
2026 (check_instantiated_args): Here. Handle arg packs.
2027 (convert_template_argument): Just check that nontype argument
2028 packs have the right type.
2030 2009-01-05 Dodji Seketeli <dodji@redhat.com>
2033 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2035 2009-01-05 Jason Merrill <jason@redhat.com>
2038 * typeck2.c (process_init_constructor_union): Handle union with
2041 * mangle.c (write_expression): Remove mangling for zero-operand
2045 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2049 * class.c (defaultable_fn_p): Only operator== can be a copy
2050 assignment operator.
2052 2009-01-02 Jason Merrill <jason@redhat.com>
2055 * typeck2.c (process_init_constructor_union): Handle excess
2057 (process_init_constructor_record): Likewise.
2060 * typeck2.c (digest_init_r): Don't use process_init_constructor
2061 for non-aggregate classes.
2064 Copyright (C) 2009 Free Software Foundation, Inc.
2066 Copying and distribution of this file, with or without modification,
2067 are permitted in any medium without royalty provided the copyright
2068 notice and this notice are preserved.