1 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
4 * parser.c (cp_parser_pure_specifier): If there are no tokens left
5 do not call cp_lexer_consume_token.
7 2009-01-30 Jakub Jelinek <jakub@redhat.com>
10 * parser.c (cp_parser_already_scoped_statement): Handle __label__
13 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
16 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
18 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
21 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
23 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
25 * typeck.c (invalid_nonstatic_memfn_p): Use
26 DECL_NONSTATIC_MEMBER_FUNCTION_P.
28 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
31 * call.c (build_over_call): If convert_for_arg_passing returns
32 error_mark_node unconditionally return it.
34 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
36 * class.c (check_field_decls): Also inherit packed for bitfields
37 regardless of their type.
39 2009-01-22 Dodji Seketeli <dodji@redhat.com>
42 * decl2.c (grokfield): Reverting changes of PR c++/26693
43 (save_template_attributes): Likewise.
44 * decl.c (grokdeclarator): Likewise.
45 * name-lookup.c (pushdecl_maybe_friend): Likewise.
46 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
47 (append_type_to_template_for_access_check): Likewise.
48 * semantics.c (check_accessibility_of_qualified_id): Likewise.
49 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
51 (resolve_type_name_type): Likewise.
52 (append_type_to_template_for_access_check): Likewise.
54 2009-01-21 Dodji Seketeli <dodji@redhat.com>
57 * decl2.c (grokfield): when a typedef appears in a
58 class, create the typedef variant type node for it.
59 (save_template_attributes): Creating typedef variant type node
61 * decl.c (grokdeclarator): If the typedef'ed struct/class was
62 anonymous, set the proper type name to all its type variants.
63 * name-lookup.c (pushdecl_maybe_friend): Reuse the
64 set_underlying_type function to install typedef variant types.
65 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
67 (append_type_to_template_for_access_check): New entry points.
68 * semantics.c (check_accessibility_of_qualified_id):
69 When a typedef that is a member of a class appears in a template,
70 add it to the template. It will be ...
71 * pt.c (instantiate_class_template, instantiate_template ): ... access
72 checked at template instantiation time.
73 (tsubst): Handle the case of being called with NULL args.
74 (resolve_type_name_type): The type name should be the name of the
76 (append_type_to_template_for_access_check): New entry point.
78 2009-01-19 Jason Merrill <jason@redhat.com>
81 * parser.c (cp_parser_unqualified_id): In a template,
83 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
85 2009-01-16 Jason Merrill <jason@redhat.com>
88 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
89 * init.c (build_new): Don't call describable_type unless we
93 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
96 * search.c (protected_accessible_p): N doesn't vary.
98 2009-01-15 Jason Merrill <jason@redhat.com>
101 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
102 accept hidden friends.
104 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
107 * decl.c (grokdeclarator): Check for a non namespace/class context.
109 2009-01-15 Jason Merrill <jason@redhat.com>
113 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
114 a function isn't necessarily an lvalue. Take tree, not const_tree.
115 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
116 * typeck.c (lvalue_or_else): Likewise.
117 * cp-tree.h: Adjust prototypes.
119 2009-01-15 Steve Ellcey <sje@cup.hp.com>
122 * pt.c (tsubst): Check for NULL args.
124 2009-01-15 Dodji Seketeli <dodji@redhat.com>
127 * name-lookup.c (pushtag): Don't create members to types that are not
130 2009-01-14 Nick Clifton <nickc@redhat.com>
133 * parser.c: Pass cp_id_kind computed in
134 cp_parser_postfix_dot_deref_expression to
135 cp_parser_primary_expression.
137 2009-01-13 Jakub Jelinek <jakub@redhat.com>
140 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
141 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
144 2009-01-12 Jason Merrill <jason@redhat.com>
145 Steve Ellcey <sje@cup.hp.com>
148 * name-lookup.c (lookup_name_real): Keep looking past a hidden
151 2009-01-12 Dodji Seketeli <dodji@redhat.com>
154 * pt.c (parameter_of_template_p): New function.
155 * cp-tree.h: Declare it.
156 * name-lookup.c (binding_to_template_parms_of_scope_p): New
158 (outer_binding): Take template parameters in account when looking for
161 2009-01-12 Jason Merrill <jason@redhat.com>
164 * tree.c (pod_type_p): Return 1 for structs created by the back end.
166 2009-01-12 Jakub Jelinek <jakub@redhat.com>
169 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
170 offsetof member-designator, handle it as `[0].'.
173 * decl.c (start_function): If grokdeclarator hasn't returned
174 FUNCTION_DECL nor error_mark_node, issue diagnostics.
176 2009-01-11 Jakub Jelinek <jakub@redhat.com>
179 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
180 (gimplify_if_stmt): ... this.
181 (cp_gimplify_expr): Don't handle IF_STMT here.
182 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
184 2009-01-10 Andrew Pinski <pinskia@gmail.com>
187 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
190 * typeck2.c (build_functional_cast): Check for reference type and NULL
193 2009-01-09 Steve Ellcey <sje@cup.hp.com>
195 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
197 2009-01-09 Jakub Jelinek <jakub@redhat.com>
200 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
202 2009-01-09 John F. Carr <jfc@mit.edu>
205 * parser.c (cp_parser_class_specifier): Clear
206 parser->in_unbraced_linkage_specification_p while parsing class
209 2009-01-07 Jakub Jelinek <jakub@redhat.com>
212 * semantics.c (finish_goto_stmt): Convert destination to
215 2009-01-06 Jason Merrill <jason@redhat.com>
222 * pt.c (check_default_tmpl_args): Don't complain about
223 out-of-order parameter packs in the enclosing class
224 or parameter packs after default args.
225 (coerce_template_parms): If we have more than one
226 parameter pack, don't flatten argument packs.
227 (template_args_equal): Handle argument packs.
228 (comp_template_args): Don't flatten argument packs.
229 (check_instantiated_arg): Split out from...
230 (check_instantiated_args): Here. Handle arg packs.
231 (convert_template_argument): Just check that nontype argument
232 packs have the right type.
234 2009-01-05 Dodji Seketeli <dodji@redhat.com>
237 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
239 2009-01-05 Jason Merrill <jason@redhat.com>
242 * typeck2.c (process_init_constructor_union): Handle union with
245 * mangle.c (write_expression): Remove mangling for zero-operand
249 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
253 * class.c (defaultable_fn_p): Only operator== can be a copy
256 2009-01-02 Jason Merrill <jason@redhat.com>
259 * typeck2.c (process_init_constructor_union): Handle excess
261 (process_init_constructor_record): Likewise.
264 * typeck2.c (digest_init_r): Don't use process_init_constructor
265 for non-aggregate classes.
267 2008-12-31 Jakub Jelinek <jakub@redhat.com>
270 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
271 Return error_mark_node if cp_parser_non_integral_constant_expression
275 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
277 2008-12-29 Jakub Jelinek <jakub@redhat.com>
280 * parser.c (cp_parser_condition): Use cp_parser_require
281 instead of cp_lexer_consume_token to consume =.
284 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
286 2008-12-28 Jakub Jelinek <jakub@redhat.com>
289 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
290 around volatile iteration var in condition and/or increment
293 2008-12-27 Jakub Jelinek <jakub@redhat.com>
296 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
299 2008-12-21 Jason Merrill <jason@redhat.com>
302 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
304 2008-12-20 Jakub Jelinek <jakub@redhat.com>
305 Manuel López-Ibáñez <manu@gcc.gnu.org>
308 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
309 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
312 2008-12-19 Jakub Jelinek <jakub@redhat.com>
315 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
318 2008-12-18 Jakub Jelinek <jakub@redhat.com>
321 * init.c (perform_member_init): For value-initialized
322 references call permerror instead of warning and don't emit any
325 2008-12-18 Jason Merrill <jason@redhat.com>
328 * parser.c (cp_parser_token_starts_cast_expression): An EOF
329 can't start a cast-expression.
331 2008-12-17 Jason Merrill <jason@redhat.com>
333 * semantics.c (describable_type): New function.
334 (finish_decltype_type): Use it for dependent exprs.
335 * cp-tree.h: Declare it.
336 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
337 (write_expression): If skip_evaluation, use type stubs.
338 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
339 declarations of a function.
340 * init.c (build_new): Do auto deduction if type is describable.
341 * decl.c (cp_finish_decl): Likewise.
342 * parser.c (cp_parser_omp_for_loop): Likewise.
344 2008-12-10 Jason Merrill <jason@redhat.com>
347 * mangle.c (write_builtin_type): Add mangling for decimal floating
348 point and fixed point types.
349 (write_type): Pass FIXED_POINT_TYPE along.
351 2008-12-09 Mark Mitchell <mark@codesourcery.com>
354 * class.c (resolve_address_of_overloaded_function): Check
355 accessibility of member functions unless FLAGS indicates
357 * call.c (standard_conversion): Adjust flags passed to
359 (convert_default_arg): Do not perform access checks.
360 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
362 2008-12-08 Steve Ellcey <sje@cup.hp.com>
364 * decl2.c (mark_used): Remove assemble_external call.
366 2008-12-08 Dodji Seketeli <dodji@redhat.com>
369 * name-lookup.c (kept_level_p): Don't forget the case of levels
370 having using directives.
372 2008-12-08 Richard Henderson <rth@redhat.com>
375 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
376 * decl.c (record_unknown_type): Likewise.
377 (start_enum, finish_enum): Likewise.
379 2008-12-05 Jakub Jelinek <jakub@redhat.com>
382 * error.c (dump_expr): Handle BIT_FIELD_REF.
384 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
387 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
390 2008-12-04 Jason Merrill <jason@redhat.com>
393 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
395 * class.c (check_bases_and_members): Rather than assuming any
396 user-declared default constructor is complex here.
398 2008-12-04 Richard Guenther <rguenther@suse.de>
401 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
402 pointer access with TREE_NO_WARNING.
404 2008-12-03 Jason Merrill <jason@redhat.com>
407 * init.c (build_value_init): Do initial zero-initialization
408 of a class with an implicitly-defined constructor using
409 build_zero_init rather than in build_value_init.
410 (build_value_init_1): Fold into build_value_init.
413 * parser.c (cp_parser_conversion_type_id): Diagnose
414 'operator auto' here.
415 * decl.c (grokdeclarator): Not here.
418 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
419 on explicit constructors.
420 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
421 CONSTRUCTOR_IS_DIRECT_INIT.
423 2008-12-02 Jason Merrill <jason@redhat.com>
425 PR c++/35782, c++/37860
426 * call.c (build_user_type_conversion_1): Remember
428 (convert_like_real): Likewise.
429 (build_over_call): Don't require the copy constructor
430 for copy-list-initialization.
431 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
434 * decl.c (cp_finish_decl): Handle =default and =delete for
437 2008-12-01 Jakub Jelinek <jakub@redhat.com>
440 * parser.c (cp_parser_omp_for_loop): Handle auto.
441 * pt.c (tsubst_omp_for_iterator): Likewise.
443 2008-11-28 Jason Merrill <jason@redhat.com>
446 * init.c (perform_member_init): Fix value-initialization.
447 (build_value_init_1): Add assert to catch cases that will break
449 (build_default_init): Remove.
450 * cp-tree.h: Remove its prototype.
451 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
452 value-initialization.
455 * parser.c (cp_parser_class_name): Only call
456 maybe_note_name_used_in_class if we actually found a class name.
458 2008-11-25 Jason Merrill <jason@redhat.com>
461 * decl2.c (check_classfn): Error rather than abort on parameter
464 2008-11-20 Jason Merrill <jason@redhat.com>
467 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
470 * call.c (build_over_call): Take the address of the function even
472 (build_new_method_call): Remember the type of the called function
475 2008-11-19 Dodji Seketeli <dodji@redhat.com>
478 * pt.c (coerce_template_template_parm): Use the more robust
479 uses_template_parms instead of dependent_type_p.
481 2008-11-19 Dodji Seketeli <dodji@redhat.com>
484 * pt.c (lookup_template_class): Check pointers before dereferencing
486 * error.c (dump_template_decl): Likewise.
488 2008-11-19 Jason Merrill <jason@redhat.com>
491 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
492 that names a class for linkage purposes.
495 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
496 name is not a declaration.
499 * pt.c (instantiate_decl): Don't require a definition of
500 a template that is explicitly instantiated 'extern'.
502 2008-11-18 Jason Merrill <jason@redhat.com>
503 Jakub Jelinek <jakub@redhat.com>
506 * parser.c (cp_parser_type_id): Complain about auto.
507 * decl.c (grokdeclarator): Complain about parameters and
508 conversion functions declared with auto.
510 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
512 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
514 2008-11-17 Jakub Jelinek <jakub@redhat.com>
517 * init.c (constant_value_1): Handle TREE_LIST init.
519 2008-11-15 Jakub Jelinek <jakub@redhat.com>
522 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
523 argtype instead of result_type.
525 2008-11-14 Jason Merrill <jason@redhat.com>
528 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
529 for a non-dependent call.
532 * call.c (build_aggr_conv): Increment i.
534 2008-11-13 Jason Merrill <jason@redhat.com>
537 * typeck2.c (process_init_constructor_record): Update bitfield
539 (check_narrowing): Update bitfield handling, print source type.
541 2008-11-12 Jakub Jelinek <jakub@redhat.com>
545 2007-05-07 Mike Stump <mrs@apple.com>
546 * parser.c (check_empty_body): Add.
547 (cp_parser_iteration_statement): Add call to check_empty_body.
549 2008-11-12 Jason Merrill <jason@redhat.com>
552 * typeck.c (cp_build_modify_expr): Update bitfield handling.
554 2008-11-12 Jakub Jelinek <jakub@redhat.com>
557 * parser.c (cp_parser_simple_declaration): Don't commit
558 to tentative parse if parse errors were seen.
561 * error.c (dump_expr): Handle COMPLEX_EXPR.
563 2008-11-10 Jakub Jelinek <jakub@redhat.com>
566 * parser.c (cp_parser_enum_specifier): After parsing :,
567 parse definitely. Don't return early if type specifier
570 2008-11-06 David Edelsohn <edelsohn@gnu.org>
573 * g++spec.c (LIBSTDCXX_STATIC): New.
574 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
577 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
580 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
583 2008-11-05 Richard Guenther <rguenther@suse.de>
586 * decl.c (start_preparsed_function): Use the correct type for
587 building the RESULT_DECL.
589 2008-10-31 Jakub Jelinek <jakub@redhat.com>
592 * decl.c (grokdeclarator): Diagnose auto function decl without
593 late return type and late return type function decl where type
597 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
600 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
603 * class.c (check_bitfield_decl): Rename min_precision to
604 tree_int_cst_min_precision.
605 * decl.c (finish_enum): Likewise.
607 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
610 * parser.c (cp_parser_token_starts_cast_expression): New.
611 (cp_parser_cast_expression): Peek the next token to decide whether
612 this could be a parenthesized constructor or is definitely an
615 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
618 * typeck.c (build_x_binary_op): Update call to
619 warn_about_parentheses.
620 * parser.c (cp_parser_binary_expression): Add note about passing
621 the correct code for unary expressions.
623 2008-10-24 Jakub Jelinek <jakub@redhat.com>
625 * Make-lang.in (check-c++-subtargets): New alias for
626 check-g++-subtargets.
627 (lang_checks_parallelized): Add check-g++.
628 (check_g++_parallelize): New variable.
630 2008-10-21 Richard Guenther <rguenther@suse.de>
632 * semantics.c (simplify_aggr_init_exprs_r): Remove.
633 (expand_or_defer_fn): Do not walk the function body to
634 simplify aggr_init_exprs.
636 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
639 * typeck.c (cp_common_type): New. The same as
640 type_after_usual_arithmetic_conversions but without promotions.
641 (type_after_usual_arithmetic_conversions): Do the promotions and
643 (common_type): Make it behave like the C version of this
644 function. Do not handle pointer types.
645 (common_pointer_type): Move handling of pointer types from
647 (cp_build_binary_op): Use common_pointer_type instead of
648 common_type in call to pointer_diff.
649 Use cp_common_type instead of common_type.
650 * cp-tree.h (common_pointer_type): Declare.
652 2008-10-14 Jakub Jelinek <jakub@redhat.com>
655 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
656 arguments if they don't already have COND_EXPR's type.
658 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
661 * pt.c (push_template_decl_real): Check that current_template_parms
663 (process_partial_specialization): Assert current_template_parms not
666 2008-10-13 Doug Evans <dje@google.com>
668 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
670 2008-10-10 Jakub Jelinek <jakub@redhat.com>
673 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
676 2008-10-09 Jakub Jelinek <jakub@redhat.com>
679 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
680 setting it to error_mark_node.
682 2008-10-07 Steve Ellcey <sje@cup.hp.com>
684 * decl.c (start_cleanup_fn): Declare as inline.
686 2008-10-06 Jason Merrill <jason@redhat.com>
688 PR c++/37376, other mangling issues
689 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
690 (write_member_name): Break out from...
691 (write_expression): ...here. Handle dependent COMPONENT_REF.
692 (write_template_arg): Wrap an argument pack in 'I'/'E'.
693 (write_builtin_type): Update char16/32_t mangling.
694 (write_nested_name, write_prefix): Don't forget template args
696 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
699 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
701 * typeck.c (build_x_indirect_ref): Add location argument.
702 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
703 (cp_build_unary_op): Add location argument.
704 (cp_build_modify_expr): Same.
705 * class.c (build_base_path): Pass location to build_indirect_ref.
706 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
709 2008-10-05 Dodji Seketeli <dodji@redhat.com>
712 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
713 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
714 of the innermost containing BLOCK.
716 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
719 * error.c (dump_function_decl): Save the exceptions in case of
720 error about incompatible specifications in a specialization.
722 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
724 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
726 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
729 * parser.c (cp_parser_selection_statement): Fix uninitialized
732 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
736 * decl.c (grokdeclarator): Set the type for typedefs to a
737 nested-name-specifier to error_mark_node.
739 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
741 * parser.c (cp_parser_selection_statement): Implement here the
742 -Wempty-body warning for `if' and `else' statements.
743 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
745 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
748 * name-lookup.c (maybe_process_template_type_declaration): Check
749 return value of push_template_decl_real for error_mark_node.
751 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
753 * semantics.c (finish_fname): Pass location to fname_decl.
755 2008-09-23 Jakub Jelinek <jakub@redhat.com>
758 * semantics.c (finish_omp_for): If processing_template_decl, just build
759 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
761 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
763 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
764 (get_member_function_from_ptrfunc): Same.
765 (build_x_binary_op): Same.
766 (build_binary_op): Same.
767 (cp_build_binary_op): New location argument.
768 (pointer_diff): Pass location to cp_build_binary_op.
769 (cp_truthvalue_conversion): Pass location to build_binary_op.
770 (convert_ptrmem): Pass location to cp_build_binary_op.
771 (cp_build_modify_expr): Same.
772 (build_ptrmemfunc): Same.
773 * init.c (expand_cleanup_for_base): Pass location to
774 c_common_truthvalue_conversion.
775 (build_new_1): Pass location to cp_build_binary_op.
776 (build_vec_delete_1): Pass location to *build_binary_op,
777 c_common_truthvalue_conversion.
778 (build_vec_init): Same.
779 (build_delete): Same.
780 * decl.c (compute_array_index_type): Same.
781 * call.c (build_new_op): Same.
782 * rtti.c (build_dynamic_cast_1): Same.
783 * cp-tree.h: Add argument to cp_build_binary_op.
784 * semantics.c (handle_omp_for_class_iterator): Pass location to
785 *build_binary_op, c_common_truthvalue_conversion.
786 * decl2.c (get_guard_cond): Same.
788 2008-09-17 Richard Guenther <rguenther@suse.de>
791 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
792 result to the correct type.
794 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
797 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
798 parameter for duplicate.
800 2008-09-17 Jason Merrill <jason@redhat.com>
803 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
805 2008-09-17 Jakub Jelinek <jakub@redhat.com>
808 * typeck.c (build_array_ref): Use protected_set_expr_location instead
809 of SET_EXPR_LOCATION when ret might not be an expression.
811 2008-09-17 Jan Hubicka <jh@suse.cz>
814 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
816 2008-09-16 Jakub Jelinek <jakub@redhat.com>
819 * semantics.c (finish_compound_literal): Return error_mark_node if
823 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
826 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
828 * decl.c (duplicate_decls): Call error_at.
829 (grokfndecl): New location argument. Use location if available.
830 (grokdeclarator): Pass declarator location to grokfndecl.
831 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
832 * decl2.c (check_classfn): Use error_at.
833 * parser.c (cp_parser_init_declarator): Set function_start_locus
835 (cp_parser_member_declaration): Set id_loc for function declarators.
837 2008-09-09 Jan Hubicka <jh@suse.cz>
840 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
842 2008-09-09 Jakub Jelinek <jakub@redhat.com>
845 * tree.c (array_type_nelts_top): Add size_one_node instead of
848 2008-09-09 Jason Merrill <jason@redhat.com>
851 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
854 2008-09-09 Jakub Jelinek <jakub@redhat.com>
857 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
858 being error_operand_p. Don't clear value if it was error_mark_node.
860 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
862 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
863 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
864 * semantics.c (anon_aggr_type_p): Remove.
866 2008-09-06 Jason Merrill <jason@redhat.com>
869 * parser.c (cp_parser_parameter_declaration_list): Process the
870 PARM_DECLs as we go and push them. Return a TREE_LIST.
871 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
872 (cp_parser_direct_declarator): Create a binding level and
873 suppress deprecated warnings in the parameter list.
874 (make_call_declarator): PARMS is now a tree.
875 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
876 * decl.h (enum deprecated_states, deprecated_state): Move here.
878 (type_is_deprecated): New fn.
879 (grokparms): PARMLIST is a tree now. Warn about parms that
880 use deprecated types.
881 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
883 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
884 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
886 * name-lookup.c (pushtag): Look through function parameter scopes.
887 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
888 when we're parsing a function declarator.
890 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
893 * tree.c (cp_build_qualified_type_real): Deal with sharing of
894 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
897 2008-09-04 Ian Lance Taylor <iant@google.com>
899 * parser.c (check_no_duplicate_clause): Change code parameter to
900 enum omp_clause_code.
902 2008-09-03 Jakub Jelinek <jakub@redhat.com>
905 * decl.c (cp_finish_decl): Only set
906 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
909 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
911 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
912 deferred_mark_used_calls vector and exit early.
913 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
915 (finish_function): Set defer_mark_used_calls for the duration of the
916 function. Call mark_used on any queued decls.
918 2008-09-02 Jason Merrill <jason@redhat.com>
921 * call.c (build_over_call): Make =delete work with SFINAE.
922 * class.c (resolve_address_of_overloaded_function): Likewise.
924 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
925 threadprivate_or_deleted_p.
926 (CP_DECL_THREADPRIVATE_P): Adjust.
927 (DECL_DELETED_FN): Likewise.
928 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
929 (SD_DELETED): New macro.
930 * parser.c (cp_parser_init_declarator): Use them.
931 * decl.c (start_decl): Use them.
933 * decl2.c (mark_used): Give =deleted error even in sizeof.
935 * typeck2.c (check_narrowing): Downgrade narrowing error to
938 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
940 * typeck.c (build_array_ref): Use new location argument.
941 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
942 * call.c (build_new_op): Same.
943 * decl2.c (grok_array_decl): Same.
944 * cp-tree.h (build_array_ref): Add location argument to prototype.
946 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
948 * typeck.c (build_x_indirect_ref): Add location argument.
949 * class.c (build_base_path): Pass location to build_indirect_ref.
950 * pt.c (tsubst_copy_and_build): Pass location to
951 finish_label_address_expr.
952 * parser.c (cp_parser_unary_expression): Same.
954 2008-08-31 Jason Merrill <jason@redhat.com>
956 Implement late-specified return type using 'auto'.
957 * cp-tree.h (struct cp_declarator): Add late_return_type field to
959 * parser.c (cp_parser_late_return_type_opt): New fn.
960 (cp_parser_direct_declarator): Use it.
961 (make_call_declarator): Put it in the declarator.
962 * decl.c (grokdeclarator): Splice in late-specified return type.
963 * pt.c (splice_late_return_type): New fn.
965 2008-08-29 Michael Meissner <gnu@the-meissners.org>
967 * decl.c (builtin_function_1): Take a bool argument to decide
968 whether to use pushdecl or pushdecl_top_level.
969 (duplicate_decls): Copy function specific target and optimization
970 options on duplicate declarations.
971 (cxx_builtin_function): Update builtin_function_1 call.
972 (cxx_builtin_function_ext_scope): New function, guarantee that the
973 declaration is done at global scope.
975 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
976 macro, define builtin function hook for delayed machine specific
979 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
981 2008-08-30 Jason Merrill <jason@redhat.com>
984 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
986 2008-08-29 Jason Merrill <jason@redhat.com>
988 Implement C++0x 'auto' semantics.
989 * decl.c (start_decl_1): Don't complain about auto being incomplete.
990 (cp_finish_decl): Deduce auto.
991 * init.c (build_new): Handle 'new auto'.
992 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
993 message for auto than for normal template type parms.
994 * pt.c (type_dependent_expression_p): Handle { }.
995 (make_auto): New function.
996 (listify_autos): New function.
997 (do_auto_deduction): New function.
998 (is_auto): New function.
999 (type_uses_auto): New function.
1000 * cp-tree.h: Declare them.
1001 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
1002 treat auto as a declspec.
1003 (cp_parser_simple_type_specifier): It's a type-specifier.
1005 2008-08-29 Mark Mitchell <mark@codesourcery.com>
1007 * mangle.c (write_type): Add target-specific manglings for
1008 non-fundamental types to the substitution table.
1011 2008-08-29 Jakub Jelinek <jakub@redhat.com>
1015 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
1016 Adjust debug_hooks->imported_module_or_decl callers.
1018 2008-08-29 Jan Hubicka <jh@suse.cz>
1020 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
1022 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1025 * decl.c (reshape_init_r): Check init for error_mark_node.
1027 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1030 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
1031 (finish_return_stmt): Likewise.
1032 (finish_switch_condition): Likewise.
1034 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1036 * cp-tree.h: Fix #error directive.
1038 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
1040 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
1041 usual arithmetic conversions on scoped enumeration types.
1042 (common_type): Ditto.
1043 (default_conversion): Don't perform integral promotions on scoped
1045 (build_array_ref): Scoped enumeration types can't be used as
1047 * decl.c (start_enum): If building a C++0x scoped enumeration,
1048 enter its scope. If provided with an underlying type, check that
1049 underlying type and set up the enumeration type accordingly.
1050 (finish_enum): Only compute an underlying type if the underlying
1051 type isn't already fixed, and only convert the enumerator values
1052 now if we've just computed the underlying type. Finish the scope
1053 of C++0x scoped enumerations.
1054 (build_enumerator): For enumerations with a fixed underlying type,
1055 check the enumerator values when the enumerator is defined.
1056 (lookup_enumerator): New.
1057 * call.c (standard_conversion): Don't allow assignment from
1058 integers to scoped enumeration types, even with -fpermissive.
1059 Don't convert from scoped enumerations to bool or any arithmetic
1061 (build_conditional_expr): Don't per the usual arithmetic
1062 conversions for scoped enumeration types.
1063 (convert_like_real): Check complain to see if we should
1065 * error.c (class_key_or_enum_as_string): Print scoped enums.
1066 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1068 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1069 (SCOPED_ENUM_P): New.
1070 (UNSCOPED_ENUM_P): New.
1071 (SET_SCOPED_ENUM_P): New.
1072 (ENUM_UNDERLYING_TYPE): New.
1073 * pt.c (lookup_template_class): Update the instantiation of enum
1074 types to deal with C++0x scoped enumerations and underlying
1076 * name-lookup.c (begin_scope): Deal with scoped enumeration
1078 (lookup_qualified_name): Deal with lookup into enumeration types.
1079 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1080 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1081 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1082 parse a type-name that can be an enumeration type.
1083 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1084 (cp_parser_elaborated_type_specifier): Parse the
1085 optional `struct' or `class' following enum (in C++0x).
1086 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1089 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1091 * typeck.c: Update all calls to pedwarn.
1094 * error.c: Likewise.
1096 * name-lookup.c: Likewise.
1097 * parser.c: Likewise.
1099 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1102 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1105 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1107 * parser.c: Update all calls to inform.
1108 * typeck.c: Likewise.
1110 * class.c: Likewise.
1112 * method.c: Likewise.
1113 * friend.c: Likewise.
1114 * typeck2.c: Likewise.
1116 * name-lookup.c: Likewise.
1119 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1122 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1124 2008-08-18 Tomas Bily <tbily@suse.cz>
1126 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1128 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1130 * typeck.c: Update all callers of permerror.
1132 * class.c: Likewise.
1135 * except.c: Likewise.
1137 * typeck2.c: Likewise.
1139 * semantics.c: Likewise.
1140 * name-lookup.c: Likewise.
1142 * decl2.c: Likewise.
1143 * parser.c: Likewise.
1145 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1148 * pt.c (check_template_shadow): Change to return a bool.
1149 * name-lookup.c (push_class_level_binding): Early return if
1150 check_template_shadow returns false.
1151 * cp-tree.h (check_template_shadow): Adjust declaration.
1153 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1156 * decl.c (grokdeclarator): In case of extern and initializer, return
1157 error_mark_node after the error.
1159 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1162 * decl.c (grokfndecl): Call check_main_parameters_type only if
1165 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1168 * parser.c (cp_parser_class_head): Early return error_mark_node in
1169 case of global qualification of class name or qualified name that
1170 does not name a class.
1172 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1175 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1177 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1180 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1181 Delete forward declarations. Check that toplev.h has not been
1182 included before this file. Include toplev.h and diagnostic.h.
1183 * error.c (cp_cpp_error): Use DK_PEDWARN.
1184 (cxx_incomplete_type_diagnostic): Update declaration.
1185 (cxx_incomplete_type_error): Use DK_ERROR.
1186 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1187 as argument. Use emit_diagnostic.
1188 (cxx_incomplete_type_error): Use DK_ERROR.
1189 (add_exception_specifier): Use diagnostic_t instead of custom
1191 * typeck.c (complete_type_or_else): Update call to
1192 cxx_incomplete_type_diagnostic.
1193 * init.c (build_delete): Likewise.
1194 * call.c (diagnostic_fn_t): Remove unused typedef.
1195 (build_temp): Pass a pointer to diagnostic_t.
1196 (convert_like_real): Use emit_diagnostic.
1197 (joust): Check return value of warning before giving informative
1199 * friend.c (do_friend): Check return value of warning
1200 before giving informative note.
1201 * parser.c (cp_parser_template_id): Likewise.
1203 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1206 * class.c (check_bases_and_members): Warn with -Wuninitialized
1209 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1212 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1213 and make sure it is not a union.
1215 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1217 * semantics.c (finish_decltype_type): Initialize type.
1219 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1221 * semantics.c (finish_decltype_type): Handle calls to function
1222 pointers and references to functions properly.
1224 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1227 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1228 following a type-id is an error when in C++0x mode.
1230 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1233 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1235 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1238 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1240 2008-08-05 Jason Merrill <jason@redhat.com>
1243 * decl.c (build_ptrmemfunc_type): Don't require structural
1244 comparison of PMF types.
1245 * tree.c (cp_build_qualified_type_real): Don't clear
1246 a valid TYPE_PTRMEMFUNC_TYPE.
1247 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1250 2008-08-04 Jason Merrill <jason@redhat.com>
1253 * typeck2.c (check_narrowing): Allow narrowing conversion
1254 from an explicit floating-point constant.
1257 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1260 2008-08-04 Simon Baldwin <simonb@google.com>
1263 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1264 the declaration's id is followed by a semicolon.
1266 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1269 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1270 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1272 2008-07-31 Jason Merrill <jason@redhat.com>
1275 * init.c (build_new_1): Don't convert pointer to the data type
1276 until we're actually going to treat it as that type.
1279 * tree.c (build_aggr_init_expr): Split out...
1280 (build_cplus_new): ...from here.
1281 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1282 * init.c (build_new_1): new T() means value-initialization,
1283 not default-initialization.
1284 (build_vec_init): Likewise.
1285 (build_value_init_1): Use build_aggr_init_expr.
1287 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1290 * decl2.c (fix_temporary_vars_context_r): New function.
1291 (one_static_initialization_or_destruction): Make sure temporary
1292 variables part of the initialiser have their DECL_CONTEXT()
1295 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1298 * typeck.c (build_binary_op): Encapsulate code into
1301 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1304 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1305 TYPE_UID instead of pointers.
1307 2008-07-29 Jan Hubicka <jh@suse.cz>
1309 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1310 * decl.c (duplicate_decls): Likewise.
1311 (grokfndecl): Likewise.
1312 (start_method): Likewise.
1313 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1315 * pt.c (register_specialization, regenerate_decl_from_template):
1317 * decl2.c (grokfield): Likewise.
1319 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1322 * decl.c (duplicate_decls): Merge USED flags.
1324 2008-07-27 Jason Merrill <jason@redhat.com>
1327 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1329 2008-07-28 Richard Guenther <rguenther@suse.de>
1331 Merge from gimple-tuples-branch.
1333 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1335 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1338 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1340 * decl.c (finish_function): Call gimple_body after cp_genericize.
1342 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1344 * optimize.c: Include gimple.h instead of tree-gimple.h.
1345 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1346 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1349 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1351 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1353 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1355 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1357 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1359 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1361 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1362 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1363 (cxx_omp_clause_copy_ctor): Same.
1364 (cxx_omp_clause_assign_op): Same.
1366 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1368 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1369 (cp_gimplify_expr): Adjust caller.
1371 2008-05-11 Doug Kwan <dougkwan@google.com>
1373 * init.c (build_vec_delete): Add type conversion for argument
1374 0 of POINTER_PLUS_EXPR.
1376 2008-04-29 Doug Kwan <dougkwan@google.com>
1378 * decl2 (File): Include "gimple.h"
1379 (cp_write_global_declarations): Use gimple_body instead of
1381 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1383 2008-04-10 Diego Novillo <dnovillo@google.com>
1385 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1387 * optimize.c (maybe_clone_body): Re-enable call to
1389 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1390 code with call to gimple_unreachable.
1391 (cp_genericize): Fix handling of clone bodies.
1393 2008-04-04 Diego Novillo <dnovillo@google.com>
1395 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1397 * optimize.c (maybe_clone_body): Re-enable.
1399 2008-02-19 Diego Novillo <dnovillo@google.com>
1400 Oleg Ryjkov <olegr@google.com>
1402 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1404 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1405 argument to gimple_seq *. Update all users.
1406 (gimplify_must_not_throw_expr): Likewise.
1408 2008-02-04 Oleg Ryjkov <olegr@google.com>
1410 * except.c: Include gimple.h
1411 (cp_protect_cleanup_actions): Convert to tuples.
1412 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1414 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1416 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1417 instead of annotating each block manually.
1419 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1421 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1422 (gimplify_for_stmt): Same.
1423 (gimplify_switch_stmt): Same.
1424 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1426 [WHILE_STMT]: Return GS_OK.
1427 [SWITCH_STMT]: Same.
1428 [CONTINUE_STMT]: Same.
1430 (cp_genericize): Set gimple_body() of cloned functions when needed.
1432 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1434 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1435 (cp_gimplify_init_expr): Convert to tuples.
1436 (gimplify_must_not_throw_expr): Make function return a
1437 gimplify_status and convert to tuples.
1439 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1441 * cp-gimplify.c (genericize_try_block): Enable and do not call
1443 (genericize_catch_block): Same.
1444 (genericize_eh_spec_block): Same.
1445 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1446 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1448 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1450 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1451 * decl.c (finish_function): Use gimple_body instead of
1453 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1454 * cp-gimplify.c (genericize_try_block): Comment out.
1455 (genericize_catch_block): Same.
1456 (genericize_eh_spec_block): Same.
1457 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1458 (gimplify_for_stmt): Comment out.
1459 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1460 (cp_gimplify_omp_for): Same.
1461 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1462 Comment out call to gimplify_stmt and append_to_statement_list.
1463 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1464 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1465 (cp_gimplify_expr): Same.
1466 Comment out calls to genericize_*_block. Comment out call to
1469 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1472 * class.c (type_has_user_provided_default_constructor): Handle
1475 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1477 * decl.c (push_library_fn): Add a parameter for the exceptions that
1478 the function may throw.
1479 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1481 (build_library_fn): Change to static.
1482 * cp-tree.h: Adjust declarations.
1483 * except.c (declare_nothrow_library_fn): New.
1484 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1485 do_allocate_exception): Use the latter, adjust the declarations
1486 (ie, add empty exception-specification), consistently with the
1487 actual implementation in libsupc++.
1489 2008-07-25 Jan Hubicka <jh@suse.cz>
1491 * typeck.c (inline_conversion): Remove.
1492 (cp_build_function_call): Do not use inline_conversion.
1493 * decl.c (duplicate_decls): Do not insist on inline being declared
1495 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1496 from being output. We now remove static functions always.
1497 (finish_function): Do return warning on all static functions.
1498 * call.c (build_over_call): Do not use inline_conversion.
1499 * cp-tree.h (possibly_inlined_p): Declare.
1500 (inline_conversion): Remove.
1501 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1502 * decl2.c (cp_write_global_declarations): Likewise.
1503 (mark_used): Likewise.
1504 (possibly_inlined_p): New functions.
1506 2008-07-25 Jason Merrill <jason@redhat.com>
1508 * class.c (type_has_user_provided_default_constructor): Handle
1511 2008-07-23 Jan Hubicka <jh@suse.cz>
1513 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1514 (grogfndecl): Drop flag_inline_trees code.
1515 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1516 * lex.c (cxx_init): Do not set unit-at-a-time.
1518 2008-07-23 Jason Merrill <jason@redhat.com>
1520 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1521 trying to mangle a decl with no name.
1523 Implement defaulted/deleted functions as per N2346
1524 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1525 (DECL_DELETED_FN): New macro.
1526 (DECL_DEFAULTED_FN): New macro.
1527 * class.c (user_provided_p): New fn.
1528 (defaultable_fn_p): New fn.
1529 (type_has_user_provided_constructor): New fn.
1530 (type_has_user_provided_default_constructor): New fn.
1531 (check_methods): A defaulted fn is still trivial.
1532 (check_bases_and_members): Likewise.
1533 * decl.c (grok_special_member_properties): Likewise.
1534 (duplicate_decls): Complain about redeclaring a function as deleted.
1535 (start_decl): initialized==2 means deleted.
1536 (cp_finish_decl): Handle deleted/defaulted semantics.
1537 * decl2.c (grokfield): Likewise.
1538 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1539 Complain about using a deleted fn.
1540 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1541 (perform_member_init): Check for a user-provided default constructor
1542 even if TYPE_NEEDS_CONSTRUCTING.
1543 (build_new_1): Likewise.
1544 * call.c (build_over_call): Don't call mark_used twice.
1545 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1546 * search.c (check_final_overrider): Check for deleted mismatch.
1547 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1548 (cp_parser_pure_specifier): Handle =default and =delete.
1550 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1552 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1555 * typeck.c: All calls to pedwarn changed.
1556 * decl.c: All calls to pedwarn changed.
1557 * call.c: All calls to pedwarn changed.
1558 * error.c: All calls to pedwarn changed.
1559 * typeck2.c: All calls to pedwarn changed.
1560 * pt.c: All calls to pedwarn changed.
1561 * name-lookup.c: All calls to pedwarn changed.
1562 * parser.c: All calls to pedwarn changed.
1564 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1566 * call.c: Fix comment typos.
1567 * class.c: Likewise.
1568 * cp-tree.h: Likewise.
1569 * cxx-pretty-print.c: Likewise.
1572 * name-lookup.c: Likewise.
1573 * operators.def: Likewise.
1574 * parser.c: Likewise.
1577 * typeck.c: Likewise.
1579 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1583 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1584 copy constructors and copy assignment operators proper.
1586 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1588 * parser.c (cp_token): Remove in_system_header.
1589 (eof_token): Remove in_system_header.
1590 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1591 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1592 (cp_parser_member_declaration): Use in_system_header_at.
1593 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1594 (pop_tinst_level): Don't set in_system_header.
1595 (instantiate_class_template): Don't set in_system_header.
1596 (instantiate_decl): Don't set in_system_header.
1597 (instantiate_pending_templates): Don't set in_system_header.
1599 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1602 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1603 TYPE_NOTHROW_P, not TREE_NOTHROW.
1604 (trait_expr_value): Likewise.
1606 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1609 * call.c (convert_like_real): Don't take the error code path
1610 when a rvalue or base conversion has the bad_p field set.
1612 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1614 * rtti.c (emit_support_tinfos): Add char16_type_node and
1616 * typeck2.c (digest_init): Support char16_t and char32_t.
1618 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1620 * cvt.c (convert_to_void): Avoid C++ keywords.
1621 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1623 * friend.c (is_friend): Likewise.
1624 * init.c (perform_member_init): Likewise.
1625 * mangle.c (write_template_prefix, write_template_template_param):
1627 * name-lookup.c (do_namespace_alias, do_using_directive,
1628 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1629 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1630 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1632 * pt.c (is_specialization_of_friend, lookup_template_class,
1633 push_tinst_level, instantiate_class_template,
1634 tsubst_copy_and_build): Likewise.
1635 * tree.c (add_stmt_to_compound): Likewise.
1636 * typeck.c (finish_class_member_access_expr): Likewise.
1638 2008-07-17 Julian Brown <julian@codesourcery.com>
1639 Mark Mitchell <mark@codesourcery.com>
1641 * decl2.c (determine_visibility): Allow target to override
1642 visibility of class data.
1644 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1647 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1648 semantics to the current WP (N2691).
1650 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1653 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1654 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1655 complies with exception specification constraints.
1657 2008-07-14 Jason Merrill <jason@redhat.com>
1659 * lex.c (init_reswords): Always set D_OBJC.
1661 2008-07-11 Tom Tromey <tromey@redhat.com>
1662 Ian Lance Taylor <iant@google.com>
1664 * lex.c (struct resword, reswords): Don't define.
1665 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1666 (init_reswords): Clarify mask code. Use c_common_reswords rather
1669 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1672 * decl.c (grokdeclarator): Warn about initializing variables
1673 of storage class 'extern' only after the type of the declarator
1674 has been properly computed.
1676 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1679 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1680 carries the location of the primary type.
1681 * parser.c (cp_parser_check_type_definition): Update documentation.
1682 (cp_parser_check_for_definition_in_return_type,
1683 cp_parser_check_for_invalid_template_id,
1684 cp_parser_set_decl_spec_type,
1685 cp_parser_check_for_definition_in_return_type,
1686 cp_parser_diagnose_invalid_type_name,
1687 cp_parser_new_expression, cp_parser_explicit_instantiation,
1688 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1689 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1692 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1696 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1697 Add a location_t parameter so that
1698 error message can have a more accurate location.
1699 * cp-tree.h: Updated prototype
1700 * pt.c (tsubst_qualified_id): Use location in error messages.
1701 * parser.c (cp_parser_postfix_expression,
1702 cp_parser_objc_statement, cp_parser_trait_expr,
1703 cp_parser_token_is_class_key,
1704 cp_parser_uncommitted_to_tentative_parse_p,
1705 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1706 cp_parser_error, cp_parser_name_lookup_error,
1707 cp_parser_simulate_error, cp_parser_check_decl_spec,
1708 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1709 cp_parser_diagnose_invalid_type_name,
1710 cp_parser_parse_and_diagnose_invalid_type_name,
1711 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1712 cp_parser_string_literal, cp_parser_primary_expression,
1713 cp_parser_primary_expression, cp_parser_unqualified_id,
1714 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1715 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1716 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1717 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1718 cp_parser_jump_statement, cp_parser_block_declaration,
1719 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1720 cp_parser_function_specifier_opt, cp_parser_decltype,
1721 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1722 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1723 cp_parser_type_parameter, cp_parser_template_id,
1724 cp_parser_template_name, cp_parser_template_argument): Likewise.
1726 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1729 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1730 on function return type.
1732 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1735 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1736 on function return type in case of system header.
1738 2008-07-09 Raksit Ashok <raksit@google.com>
1740 * parser.c (cp_parser_postfix_expression): New warning based on flag
1741 warn_disallowed_functions.
1743 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1746 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1747 functions declared with a storage class qualifier.
1749 2008-07-03 Richard Guenther <rguenther@suse.de>
1752 * typeck.c (cp_build_function_call): Move code to verify
1753 builtin function arguments ...
1754 * call.c (build_cxx_call): ... here.
1756 2008-07-02 Jason Merrill <jason@redhat.com>
1758 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1760 Implement WG21 N2672, Initializer List proposed wording
1761 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1762 (struct lang_type_class): Add has_list_ctor bitfield.
1763 (TYPE_HAS_LIST_CTOR): New macro.
1764 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1765 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1766 (LOOKUP_NO_NARROWING): New macro.
1767 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1768 * parser.c (cp_parse_braced_list): Split out from...
1769 (cp_parser_initializer_clause): ...here.
1770 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1772 (cp_lexer_next_token_is_not_keyword): New fn.
1773 (cp_parser_parenthesized_expression_list): Handle { }.
1774 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1775 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1776 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1777 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1778 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1779 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1780 (cp_parser_save_member_function_body): Likewise.
1781 * call.c (conversion_kind): Add ck_list, ck_aggr.
1782 (struct conversion): Add check_narrowing bitfield, conversion list.
1783 (build_list_conv): New fn.
1784 (build_aggr_conv): New fn.
1785 (implicit_conversion): Call them.
1786 (standard_conversion): Set check_narrowing if appropriate.
1787 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1788 (build_user_type_conversion_1): When converting from an init list,
1789 we allow additional conversions except when calling a copy ctor.
1790 (convert_like_real): Calling an explicit ctor for an init list is
1791 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1792 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1793 class doesn't have a list ctor, break the {} into a TREE_LIST.
1794 (compare_ics): ck_list is better than other UDCs.
1795 (set_up_extended_ref_temp): Split out from initialize_reference.
1796 (is_std_init_list): New fn.
1797 (is_list_ctor): New fn.
1798 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1799 (reshape_init_array_1): Pass it to build_constructor.
1800 (reshape_init_class): Ditto.
1801 (initialize_artificial_var): Pass the appropriate type.
1802 (build_aggr_init_full_exprs): Split out from...
1803 (check_initializer): ...here. Handle new semantics.
1804 (build_init_list_var_init): New subroutine of check_initializer.
1805 (grokdeclarator): Converting constructors can have more than one parm.
1806 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1807 * init.c (expand_default_init): Only do digest_init for aggregates.
1808 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1809 build_constructor_from_list.
1810 (generic_initializer, ptr_initializer): Ditto.
1811 (ptm_initializer, class_initializer): Ditto.
1812 (get_pseudo_ti_init): Ditto.
1813 * error.c (dump_type): Handle init_list_type_node.
1814 (maybe_warn_cpp0x): New fn.
1815 (maybe_varn_variadic_templates): Call it.
1816 * cvt.c (ocp_convert): Handle conversion from { }.
1817 * tree.c (build_array_of_n_type): New fn.
1818 * typeck2.c (store_init_value): Use init_list_type_node.
1819 (digest_init): Likewise.
1820 (check_narrowing): New fn.
1821 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1822 of vector of constructor elts. Handle non-aggregate types. Make
1823 constant literals static.
1824 * pt.c: (tsubst_copy_and_build): Adjust.
1825 (unify): Handle { }.
1826 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1828 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1830 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1831 (comp_ptr_ttypes_const): Likewise.
1833 2008-07-01 Andrew Haley <aph@redhat.com>
1835 * decl.c (finish_constructor_body): Don't set the return value of
1836 the constructor if the constructor is that of a Java type.
1838 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1841 * decl2.c (is_late_template_attribute): If the first attribute
1842 argument is IDENTIFIER_NODE, don't consider it when checking
1843 if arguments are value or type dependent.
1845 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1848 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1851 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1853 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1855 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1858 * repo.c (repo_emit_p): Put const static data members initialized
1859 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1862 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1865 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1868 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1871 * typeck.c (cp_build_function_call): Show example syntax in
1874 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1876 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1877 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1878 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1879 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1880 pedwarn to permerror.
1881 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1882 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1883 * identify_goto, check_previous_goto_1, check_goto, define_label,
1884 check_tag_decl, start_decl, check_class_member_definition_namespace,
1885 grokfndecl, grokdeclarator): Likewise.
1886 * except.c (check_handlers): Likewise.
1887 * typeck2.c (digest_init): Likewise.
1888 * pt.c (check_specialization_namespace,
1889 check_explicit_instantiation_namespace,
1890 maybe_process_partial_specialization, check_explicit_specialization,
1891 convert_template_argument, do_decl_instantiation,
1892 do_type_instantiation, instantiate_decl): Likewise.
1893 * semantics.c (finish_template_type_parm): Likewise.
1894 * name-lookup.c (pushdecl_maybe_friend,
1895 check_for_out_of_scope_variable): Likewise.
1896 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1897 coerce_new_type): Likewise.
1898 * parser.c (cp_parser_nested_name_specifier_opt,
1899 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1900 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1901 (cp_parser_parameter_declaration): Check flag_permissive instead of
1902 flag_pedantic_errors.
1903 * call.c (joust): Change pedwarn to warning.
1904 * friend.c (make_friend_class): Likewise.
1906 2008-06-16 Jan Hubicka <jh@suse.cz>
1908 * method.c: Include cgraph.h.
1909 (use_thunk): Use cgraph_add_new_function instead of calling backend
1912 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1914 * parser.c: Fix comment typo.
1916 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1919 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1920 grokdeclarator and apply it to the created declaration.
1921 * cp-tree.h (grokbitfield): Update prototype.
1922 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1923 since they are now applied in grokbitfield. Adjusted the call to
1925 (cp_parser_objc_class_ivars): Likewise.
1927 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1930 * class.c (type_requires_array_cookie): Do not consider delete[]
1931 operators with an ellipsis as second argument.
1933 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1936 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1939 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1942 * pt.c (maybe_process_partial_specialization): Check the tree
1943 returned by push_template_decl for error_mark_node.
1944 * parser.c (cp_parser_class_head): Likewise, check the tree
1945 returned by the latter.
1947 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1950 * decl.c (grokdeclarator): In case of wrong return type return
1951 immediately error_mark_node.
1953 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1955 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1956 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1957 finish_omp_taskwait): New prototypes.
1958 (cxx_omp_clause_default_ctor): Add outer argument.
1959 (finish_omp_for): Add new clauses argument.
1960 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1961 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1962 (cxx_omp_clause_default_ctor): Add outer argument.
1963 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1964 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1965 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1966 Add par_clauses argument. If decl is present in parallel's
1967 lastprivate clause, change that clause to shared and add
1968 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1969 Fix wording of error messages. Adjust finish_omp_for caller.
1970 Add clauses argument. Parse loops with random access iterators.
1971 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1973 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1974 cp_parser_omp_for_loop callers.
1975 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1977 (cp_parser_omp_clause_name): Handle collapse and untied
1979 (cp_parser_omp_clause_schedule): Handle auto schedule.
1980 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1981 and PRAGMA_OMP_CLAUSE_UNTIED.
1982 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1983 (OMP_TASK_CLAUSE_MASK): Define.
1984 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1985 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1986 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1987 PRAGMA_OMP_TASKWAIT.
1988 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1989 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1990 (tsubst_omp_for_iterator): New function.
1991 (dependent_omp_for_p): New function.
1992 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1993 loops. Adjust finish_omp_for caller. Handle loops with random
1994 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1995 (tsubst_expr): Handle OMP_TASK.
1996 * semantics.c (cxx_omp_create_clause_info): New function.
1997 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1998 OMP_CLAUSE_COLLAPSE.
1999 (cxx_omp_predetermined_sharing): Removed.
2000 * semantics.c (finish_omp_for): Allow pointer iterators. Use
2001 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
2002 collapsed for loops. Adjust c_finish_omp_for caller. Add new
2003 clauses argument. Fix check for type dependent cond or incr.
2004 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
2005 fold_convert to convert incr amount to difference_type. Only
2006 fold if not in template. If decl is mentioned in lastprivate
2007 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
2008 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
2010 (finish_omp_threadprivate): Allow static class members of the
2012 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
2013 finish_omp_taskwait): New functions.
2015 * parser.c (cp_parser_binary_expression): Add prec argument.
2016 (cp_parser_assignment_expression): Adjust caller.
2017 * cp-tree.h (outer_curly_brace_block): New prototype.
2018 * decl.c (outer_curly_brace_block): No longer static.
2020 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2023 * pt.c (push_template_decl_real): Consistently return error_mark_node
2026 2008-06-02 Tomas Bily <tbily@suse.cz>
2028 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
2029 (cp_build_unary_op): Likewise.
2030 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
2031 (maybe_warn_about_returning_address_of_local): Likewise.
2033 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
2036 * pt.c (tsubst_initializer_list): Consistently check the tree
2037 returned by tsubst_pack_expansion for error_mark_node.
2039 2008-05-27 Michael Matz <matz@suse.de>
2042 * call.c (build_new_op): Make warning conditional on
2045 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
2048 * call.c (convert_like_real): Convert bitfield to desired type
2049 before creating temporary.
2051 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2053 * Makefile.in: Adjusted dependencies on c-incpath.o.
2055 2008-05-23 Jakub Jelinek <jakub@redhat.com>
2058 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2059 fold_build_cleanup_point_expr on build_call_a results.
2062 * semantics.c (omp_clause_info_fndecl): New function.
2063 (finish_omp_clauses): Use it.
2065 2008-05-21 Jakub Jelinek <jakub@redhat.com>
2068 * cp-tree.h (check_array_initializer): New prototype.
2069 * decl.c (check_array_initializer): New function.
2070 (check_initializer): Call it.
2071 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2073 2008-05-21 Tom Tromey <tromey@redhat.com>
2075 * mangle.c (save_partially_mangled_name): Remove.
2076 (restore_partially_mangled_name): Likewise.
2077 (write_encoding): Update.
2078 (write_unqualified_name): Likewise.
2079 (start_mangling): Always use name_obstack. Remove 'ident_p'
2081 (get_identifier_nocopy): Remove.
2082 (finish_mangling_internal): Rename from finish_mangling.
2083 (finish_mangling): New function.
2084 (finish_mangling_get_identifier): Likewise.
2085 (partially_mangled_name, partially_mangled_name_len): Remove.
2086 (mangle_decl_string): Change return type. Update.
2087 (mangle_decl, mangle_type_string, mangle_special_for_type,
2088 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2089 mangle_ref_init_variable): Update.
2091 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2094 * semantics.c (begin_class_definition): Extend checks on the first
2097 2008-05-12 Tomas Bily <tbily@suse.cz>
2099 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2100 * call.c (build_over_call): Likewise.
2101 * error.c (dump_expr): Use CASE_CONVERT.
2102 * class.c (fixed_type_or_null): Likewise.
2104 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2106 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2108 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2111 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2113 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2114 DECL_LOOPING_CONST_OR_PURE_P attributes.
2115 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2118 2008-05-02 Simon Baldwin <simonb@google.com>
2121 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2123 2008-05-01 Simon Baldwin <simonb@google.com>
2125 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2127 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2130 * pt.c (more_specialized_fn): Stop the loop even if there are no
2131 arguments before ellipsis.
2133 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2136 * parser.c (cp_parser_lookup_name): Look through single function
2140 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2141 COMPOUND_EXPR if the second argument would be error_mark_node.
2143 2008-04-28 Jason Merrill <jason@redhat.com>
2144 Liu Guanwei <liu_gw@163.com>
2147 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2148 in default arguments.
2150 2008-04-25 Jan Hubicka <jh@suse.cz>
2152 * typeck.c (check_return_expr): Update.
2153 * decl.c (start_preparsed_function): Update.
2154 * method.c (use_thunk): Update.
2156 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2159 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2160 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2161 * decl2.c (is_late_template_attribute): Only make vector_size
2162 late tmpl attribute if argument is type or value dependent.
2163 (cp_reconstruct_complex_type): New function.
2165 2008-04-24 Richard Guenther <rguenther@suse.de>
2167 * typeck.c (cp_build_function_call): Call
2168 check_builtin_function_arguments.
2170 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2172 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2173 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2174 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2175 * class.c (build_base_path): Don't set TREE_INVARIANT.
2176 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2177 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2178 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2179 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2180 (generic_initializer): Don't set TREE_INVARIANT.
2181 (ptr_initializer): Don't set TREE_INVARIANT.
2182 (ptm_initializer): Don't set TREE_INVARIANT.
2183 (class_initializer): Don't set TREE_INVARIANT.
2184 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2185 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2186 (build_template_parm_index): Don't set TREE_INVARIANT.
2187 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2188 (process_template_parm): Don't set TREE_INVARIANT.
2190 2008-04-22 Jason Merrill <jason@redhat.com>
2193 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2194 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2195 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2197 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2200 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2201 expression is errorneous.
2203 2008-04-21 Jason Merrill <jason@redhat.com>
2206 * tree.c (cp_tree_equal): Handle FIXED_CST.
2209 * pt.c (template_template_parm_bindings_ok_p): Set
2210 processing_template_decl while in this function.
2212 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2214 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2215 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2216 char16_t and char32_t.
2217 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2218 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2219 extended builtin type "u8char{16,32}_t".
2220 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2222 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2223 (cp_parser_is_string_literal): Idem.
2224 (cp_parser_string_literal): Idem.
2225 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2227 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2228 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2229 * typeck.c (string_conv_p): Support char16_t and char32_t.
2231 2008-04-17 Jason Merrill <jason@redhat.com>
2234 * call.c (build_user_type_conversion_1): Represent second step of
2235 copy-init with an rvalue conversion.
2236 (convert_like_real) [ck_user]: Don't implicitly add it here.
2238 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2241 * decl.c (layout_var_decl): If extern or static var has variable
2242 size, set TREE_TYPE (decl) to error_mark_node.
2244 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2247 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2250 2008-04-09 Jason Merrill <jason@redhat.com>
2253 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2254 not a pushed variable.
2256 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2258 * call.c (build_op_delete_call): Fix quotation in warning message.
2259 * decl.c (grokdeclarator): Quote keyword in error message.
2260 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2263 * parser.c (cp_parser_check_type_definition): Print error string
2264 directly rather than using "%s".
2265 (cp_parser_postfix_expression): Fix quotation.
2266 (cp_parser_decltype): Likewise.
2267 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2269 * parser.c (cp_parser_non_integral_constant_expression): Build error
2270 message with CONCAT rather than using "%s".
2271 (cp_parser_primary_expression): Fix quotation.
2272 (cp_parser_postfix_expression): Likewise.
2273 (cp_parser_postfix_dot_deref_expression): Likewise.
2274 (cp_parser_unary_expression): Likewise.
2275 (cp_parser_new_expression): Likewise.
2276 (cp_parser_delete_expression): Likewise.
2278 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2279 as `)', not as `('. Fix quotation.
2280 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2281 (cp_parser_primary_expression): Likewise.
2282 (cp_parser_nested_name_specifier_opt): Likewise.
2283 (cp_parser_postfix_expression): Likewise.
2284 (cp_parser_postfix_open_square_expression): Likewise.
2285 (cp_parser_parenthesized_expression_list): Likewise.
2286 (cp_parser_pseudo_destructor_name): Likewise.
2287 (cp_parser_new_expression): Likewise.
2288 (cp_parser_direct_new_declarator): Likewise.
2289 (cp_parser_delete_expression): Likewise.
2290 (cp_parser_cast_expression): Likewise.
2291 (cp_parser_question_colon_clause): Likewise.
2292 (cp_parser_builtin_offsetof): Likewise.
2293 (cp_parser_trait_expr): Likewise.
2294 (cp_parser_label_for_labeled_statement): Likewise.
2295 (cp_parser_compound_statement): Likewise.
2296 (cp_parser_selection_statement): Likewise.
2297 (cp_parser_condition): Likewise.
2298 (cp_parser_iteration_statement): Likewise.
2299 (cp_parser_already_scoped_statement): Likewise.
2300 (cp_parser_simple_declaration): Likewise.
2301 (cp_parser_linkage_specification): Likewise.
2302 (cp_parser_static_assert): Likewise.
2303 (cp_parser_decltype): Likewise.
2304 (cp_parser_conversion_function_id): Likewise.
2305 (cp_parser_operator_function_id): Likewise.
2306 (cp_parser_operator): Likewise.
2307 (cp_parser_type_parameter): Likewise.
2308 (cp_parser_template_id): Likewise.
2309 (cp_parser_explicit_instantiation): Likewise.
2310 (cp_parser_explicit_specialization): Likewise.
2311 (cp_parser_enum_specifier): Likewise.
2312 (cp_parser_namespace_definition): Likewise.
2313 (cp_parser_namespace_alias_definition): Likewise.
2314 (cp_parser_using_declaration): Likewise.
2315 (cp_parser_using_directive): Likewise.
2316 (cp_parser_asm_definition): Likewise.
2317 (cp_parser_direct_declarator): Likewise.
2318 (cp_parser_ptr_operator): Likewise.
2319 (cp_parser_parameter_declaration_clause): Likewise.
2320 (cp_parser_initializer_clause): Likewise.
2321 (cp_parser_class_specifier): Likewise.
2322 (cp_parser_member_specification_opt): Likewise.
2323 (cp_parser_member_declaration): Likewise.
2324 (cp_parser_pure_specifier): Likewise.
2325 (cp_parser_constant_initializer): Likewise.
2326 (cp_parser_base_clause): Likewise.
2327 (cp_parser_exception_specification_opt): Likewise.
2328 (cp_parser_try_block): Likewise.
2329 (cp_parser_function_try_block): Likewise.
2330 (cp_parser_handler): Likewise.
2331 (cp_parser_throw_expression): Likewise.
2332 (cp_parser_asm_operand_list): Likewise.
2333 (cp_parser_attributes_opt): Likewise.
2334 (cp_parser_label_declaration): Likewise.
2335 (cp_parser_constructor_declarator_p): Likewise.
2336 (cp_parser_template_declaration_after_export): Likewise.
2337 (cp_parser_single_declaration): Likewise.
2338 (cp_parser_objc_message_expression): Likewise.
2339 (cp_parser_objc_message_args): Likewise.
2340 (cp_parser_objc_encode_expression): Likewise.
2341 (cp_parser_objc_defs_expression): Likewise.
2342 (cp_parser_objc_protocol_expression): Likewise.
2343 (cp_parser_objc_selector_expression): Likewise.
2344 (cp_parser_objc_protocol_refs_opt): Likewise.
2345 (cp_parser_objc_typename): Likewise.
2346 (cp_parser_objc_method_keyword_params): Likewise.
2347 (cp_parser_objc_superclass_or_category): Likewise.
2348 (cp_parser_objc_try_catch_finally_statement): Likewise.
2349 (cp_parser_objc_synchronized_statement): Likewise.
2350 (cp_parser_objc_throw_statement): Likewise.
2351 (cp_parser_omp_var_list_no_open): Likewise.
2352 (cp_parser_omp_clause_default): Likewise.
2353 (cp_parser_omp_clause_if): Likewise.
2354 (cp_parser_omp_clause_num_threads): Likewise.
2355 (cp_parser_omp_clause_reduction): Likewise.
2356 (cp_parser_omp_clause_schedule): Likewise.
2357 (cp_parser_omp_critical): Likewise.
2358 (cp_parser_omp_for_loop): Likewise.
2359 (cp_parser_omp_sections_scope): Likewise.
2361 * parser.c (cp_parser_template_parameter_list): Simplify.
2363 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2365 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2367 2008-04-07 Jason Merrill <jason@redhat.com>
2370 * class.c (type_has_user_nondefault_constructor): A template
2371 counts as a nondefault constructor.
2373 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2375 * decl.c (cxx_push_function_context): Delete.
2376 (cxx_pop_function_context): Delete.
2377 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2379 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2380 LANG_HOOKS_FUNCTION_FINAL): Delete.
2381 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2382 LANG_HOOKS_MISSING_NORETURN_OK_P.
2383 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2385 * semantics.c (current_stmt_tree): Fix comment.
2387 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2390 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2391 before calling fold_offsetof.
2393 2008-04-03 Tom Tromey <tromey@redhat.com>
2395 * Make-lang.in (c++_OBJS): New variable.
2397 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2399 * optimize.c (clone_body): New, from tree-inline.c.
2401 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2403 * method.c (synthesize_method): Use {push,pop}_function_context.
2404 * name-lookup.c (push_to_top_level): Likewise.
2405 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2407 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2410 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2413 2008-03-27 Tom Tromey <tromey@redhat.com>
2415 * Make-lang.in: Revert automatic dependency patch.
2417 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2420 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2421 (build_compound_expr): New, for compatibility with C
2422 build_compound_expr.
2423 (cp_build_compound_expr): Renamed from build_compound_expr.
2424 (build_c_cast): New, for compatibility with C build_c_cast.
2425 (cp_build_c_cast): Renamed from build_c_cast.
2426 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2427 * decl.c (cxx_maybe_build_cleanup): Ditto.
2428 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2429 (cp_build_compound_expr): Renamed from build_compound_expr.
2430 (build_c_cast): Add C-compatible prototype.
2431 (cp_build_c_cast): Renamed from build_c_cast.
2432 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2433 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2435 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2437 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2438 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2439 ending in a pack expansion, both of which can occur when
2440 substituting into a nested template.
2441 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2442 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2443 * parser.c (cp_parser_template_parameter): Deal with unnamed
2444 non-type template parameter packs identified by pack expansions in
2447 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2450 * pt.c (apply_late_template_attributes): Don't call tsubst on
2451 first attribute argument if it is IDENTIFIER_NODE.
2454 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2455 and LTGT_EXPR to pp_expression.
2457 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2459 * pt.c (coerce_template_template_parm): Moved the body of the loop
2460 of coerce_template_template_parms here, to make iteration over a
2461 template argument pack simpler.
2462 Also, allow matching of a template parameter pack in the template
2463 template parameter to a template parameter in the template
2465 (coerce_template_template_parms): Deal with variadic template
2466 template parameters. Use coerce_template_template_parm.
2467 (unify): Make sure we coerce the template template argument's
2468 template arguments to the template template parameter's template
2469 parameters, not the other way around.
2471 2008-03-25 Tom Tromey <tromey@redhat.com>
2473 * Make-lang.in: Remove .o targets.
2474 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2476 (c++_OBJS): New variable.
2477 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2479 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2481 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2482 (composite_pointer_type): Ditto.
2483 (common_type): Fix call to composite_pointer_type.
2484 (cxx_sizeof_nowarn): New; used to be a macro.
2485 (cxx_sizeof_expr): Add SFINAE support.
2486 (cxx_alignof_expr): Ditto.
2487 (decay_conversion): Fix calls for SFINAE support.
2488 (rationalize_conditional_expr): Add SFINAE support.
2489 (build_class_member_access_expr): Ditto.
2490 (finish_class_member_access_expr): Ditto.
2491 (build_x_indirect_ref): Ditto.
2492 (build_indirect_ref): Original version renamed to
2493 cp_build_indirect_ref; new version provides a bridge from
2495 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2497 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2498 (build_function_call): Original version renamed to
2499 cp_build_function_call; new version provides a bridge from
2501 (cp_build_function_call): Was build_function_call; added SFINAE
2503 (convert_arguments): Add SFINAE support.
2504 (build_x_binary_op): Ditto.
2505 (build_binary_op): Original version renamed to cp_build_binary_op;
2506 new version provides a bridge from c-common.
2507 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2508 (pointer_diff): Fix calls for SFINAE.
2509 (build_x_unary_op): Add SFINAE support.
2510 (condition_conversion): Fix calls for SFINAE.
2511 (build_unary_op): Original version renamed to cp_build_unary_op;
2512 new version provides a bridge from c-common.
2513 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2514 (unary_complex_lvalue): Fix calls for SFINAE.
2515 (build_x_conditional_expr): Add SFINAE support.
2516 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2517 (build_x_compound_expr): Add SFINAE support.
2518 (convert_ptrmem): Fix calls for SFINAE.
2519 (build_static_cast_1): Add SFINAE support.
2520 (build_static_cast): Ditto.
2521 (build_reinterpret_cast_1): Ditto.
2522 (build_reinterpret_cast): Ditto.
2523 (build_const_cast_1): Ditto.
2524 (build_const_cast): Ditto.
2525 (build_c_cast): Ditto.
2526 (build_modify_expr): Original version renamed to
2527 cp_build_modify_expr; new version provides a bridge from c-common.
2528 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2530 (build_x_modify_expr): Add SFINAE support.
2531 (build_ptrmemfunc): Fix calls for SFINAE.
2532 (convert_for_assignment): Add SFINAE support.
2533 (convert_for_initialization): Ditto.
2534 (check_return_expr): Fix calls for SFINAE.
2535 (lvalue_or_else): Add SFINAE support.
2536 * init.c (perform_member_init): Fix calls for SFINAE.
2537 (emit_mem_initializers): Ditto.
2538 (expand_virtual_init): Ditto.
2539 (expand_cleanup_for_base): Ditto.
2540 (build_aggr_init): Add SFINAE support.
2541 (expand_default_init): Ditto.
2542 (expand_aggr_init_1): Fix calls for SFINAE.
2543 (build_offset_ref): Ditto.
2544 (build_new_1): Add SFINAE support.
2546 (build_vec_delete_1): Fix calls for SFINAE.
2547 (get_temp_regvar): Ditto.
2548 (build_vec_init): Add SFINAE support.
2549 (build_dtor_call): Fix calls for SFINAE.
2550 (build_delete): Ditto.
2551 (push_base_cleanups): Ditto.
2552 (build_vec_delete_1): Ditto.
2553 * class.c (build_base_path): Fix calls for SFINAE.
2554 (build_simple_base_path): Ditto.
2555 (convert_to_base_statically): Ditto.
2556 (build_vfn_ref): Ditto.
2557 (resolve_address_of_overloaded_function): Ditto.
2558 * decl.c (check_initializer): Fix calls for SFINAE.
2559 (register_dtor_fn): Ditto.
2560 (compute_array_index_type): Ditto.
2561 (finish_enum): Ditto.
2562 (start_preparsed_function): Ditto.
2563 (cxx_maybe_build_cleanup): Ditto.
2564 * call.c (convert_like): Add COMPLAIN argument.
2565 (convert_like_with_context): Ditto.
2566 (build_this): Fix calls for SFINAE.
2567 (build_user_type_conversion): Ditto.
2568 (resolve_args): Ditto.
2569 (build_new_function_call): Add SFINAE support.
2570 (build_operator_new_call): Fix calls for SFINAE.
2571 (build_object_call): Add SFINAE support.
2572 (build_conditional_expr): Ditto.
2573 (build_new_op): Ditto.
2574 (build_op_delete_call): Fix calls for SFINAE.
2575 (build_temp): Ditto.
2576 (convert_like_real): Add SFINAE support.
2577 (build_x_va_arg): Fix calls for SFINAE.
2578 (convert_default_arg): Ditto.
2579 (build_over_call): Add SFINAE support.
2580 (build_java_interface_fn_ref): Fix calls for SFINAE.
2581 (build_special_member_call): Add SFINAE support.
2582 (build_new_method_call): Ditto.
2583 (perform_implicit_conversion): Ditto.
2584 (perform_direct_initialization_if_possible): Ditto.
2585 (initialize_reference): Fix calls for SFINAE.
2586 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2587 * rtti.c (build_headof): Fix calls for SFINAE.
2588 (get_tinfo_decl_dynamic): Ditto.
2589 (get_typeid): Ditto.
2590 (build_dynamic_cast_1): Add SFINAE support.
2591 (build_dynamic_cast): Ditto.
2592 (tinfo_base_init): Fix calls for SFINAE.
2593 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2594 (do_end_catch): Ditto.
2595 (initialize_handler_parm): Ditto.
2596 (expand_start_catch_block): Ditto.
2597 (do_allocate_exception): Ditto.
2598 (do_free_exception): Ditto.
2599 (build_throw): Ditto.
2600 * cvt.c (build_up_reference): Fix calls for SFINAE.
2601 (convert_to_reference): Ditto.
2602 (ocp_convert): Ditto.
2603 (convert_to_void): Add SFINAE support.
2604 * tree.c (build_dummy_object): Fix calls for SFINAE.
2605 (stabilize_expr): Ditto.
2606 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2608 (build_new_method_call): Ditto.
2609 (build_special_member_call): Ditto.
2610 (build_new_op): Ditto.
2611 (perform_implicit_conversion): Ditto.
2612 (perform_direct_initialization_if_possible): Ditto.
2613 (convert_to_void): Ditto.
2614 (build_aggr_init): Ditto.
2616 (build_vec_init): Ditto.
2617 (build_dynamic_cast): Ditto.
2618 (finish_call_expr): Ditto
2619 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2620 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2621 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2622 (finish_class_member_access_expr): Ditto.
2623 (build_x_indirect_ref): Ditto.
2624 (cp_build_indirect_ref): New.
2625 (cp_build_function_call): Add tsubst_flags_t parameter.
2626 (build_x_unary_op): Ditto.
2627 (cp_build_unary_op): New.
2628 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2629 (build_x_compound_expr): Ditto.
2630 (build_compound_expr): Ditto.
2631 (build_static_cast): Ditto.
2632 (build_reinterpret_cast): Ditto.
2633 (build_const_cast): Ditto.
2634 (build_c_cast): Ditto.
2635 (build_x_modify_expr): Ditto.
2636 (cp_build_modify_expr): New.
2637 (convert_for_initialization): Add tsubst_flags_t parameter.
2638 (cp_build_binary_op): Remove macro; add function declaration.
2639 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2640 (lvalue_or_else): Ditto.
2641 (build_functional_cast): Ditto.
2642 * typeck2.c (digest_init): Fix calls for SFINAE.
2643 (process_init_constructor_array): Ditto.
2644 (process_init_constructor_record): Ditto.
2645 (build_x_arrow): Ditto.
2646 (build_m_component_ref): Ditto.
2647 (build_functional_cast): Add SFINAE support.
2648 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2649 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2650 (finish_expr_stmt): Ditto.
2651 (finish_for_expr): Ditto.
2652 (finish_asm_stmt): Ditto.
2653 (finish_non_static_data_member): Ditto.
2654 (finish_qualified_id_expr): Ditto.
2655 (finish_call_expr): Add SFINAE support.
2656 (finish_increment_expr): Fix calls for SFINAE.
2657 (finish_unary_op_expr): Ditto.
2658 (simplify_aggr_init_expr): Ditto.
2659 (finish_omp_clauses): Ditto.
2660 (finish_omp_for): Ditto.
2661 (finish_omp_barrier): Ditto.
2662 (finish_omo_flush): Ditto.
2663 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2664 (build_anon_union_vars): Ditto.
2665 (get_guard_cond): Ditto.
2667 (one_static_initialization_or_destruction): Ditto.
2668 (do_static_initialization_or_destruction): Ditto.
2669 (generate_ctor_or_dtor_function): Ditto.
2670 (build_offset_ref_call_from_tree): Ditto.
2671 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2672 (cp_parser_postfix_dot_deref_expression): Ditto.
2673 (cp_parser_unary_expression): Ditto.
2674 (cp_parser_new_expression): Ditto.
2675 (cp_parser_cast_expression): Ditto.
2676 (cp_parser_binary_expression): Ditto.
2677 (cp_parser_question_colon_clause): Ditto.
2678 (cp_parser_assignment_expression): Ditto.
2679 (cp_parser_expression): Ditto.
2680 (cp_parser_builtin_offsetof): Ditto.
2681 (cp_parser_template_argument): Ditto.
2682 (cp_parser_functional_cast): Ditto.
2684 2008-03-24 Tom Tromey <tromey@redhat.com>
2686 * lex.c (handle_pragma_interface): Don't copy the filename.
2687 (handle_pragma_implementation): Copy filename using xstrdup.
2689 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2691 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2692 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2693 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2694 (PROMOTES_TO_AGGR_TYPE): Remove.
2695 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2696 * typeck.c (unary_complex_lvalue, build_modify_expr,
2697 convert_for_initialization): Adjust.
2698 * init.c (is_aggr_type): Remove.
2699 (is_class_type): Add.
2700 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2701 build_delete): Adjust.
2702 * lex.c (make_aggr_type): Remove.
2703 (make_class_type): Add.
2704 (cxx_make_type): Adjust.
2705 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2707 * decl.c (build_typename_type, make_typename_type,
2708 make_unbound_class_template, cxx_init_decl_processing,
2709 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2710 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2711 grok_op_properties, xref_tag, check_function_type): Adjust.
2712 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2713 add_builtin_candidate, add_builtin_candidates,
2714 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2715 is_subseq, compare_ics): Adjust.
2716 * method.c (use_thunk): Adjust.
2717 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2718 create_tinfo_types): Adjust.
2719 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2720 build_up_reference, convert_to_reference, convert_from_reference,
2721 ocp_convert, build_expr_type_conversion): Adjust.
2722 * tree.c (bind_template_template_parm, error_type): Adjust.
2723 * dump.c (cp_dump_tree): Adjust.
2724 * search.c (lookup_member): Adjust.
2725 * friend.c (make_friend_class, do_friend): Adjust.
2726 * typeck2.c (store_init_value, process_init_constructor_array,
2727 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2728 build_functional_cast): Adjust.
2729 * pt.c (finish_member_template_decl, process_template_parm,
2730 lookup_template_class, tsubst_function_type, tsubst,
2731 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2733 * semantics.c (begin_class_definition, finish_base_specifier,
2734 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2736 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2737 do_class_using_decl, lookup_qualified_name,
2738 maybe_process_template_type_declaration): Adjust.
2739 * decl2.c (grok_array_decl, check_member_template,
2740 constrain_class_visibility): Adjust.
2741 * parser.c (cp_parser_class_name): Adjust.
2743 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2745 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2747 2008-03-17 Jason Merrill <jason@redhat.com>
2750 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2751 a temp directly to a reference as per DR391.
2753 2008-03-12 Richard Guenther <rguenther@suse.de>
2757 2008-02-04 Richard Guenther <rguenther@suse.de>
2760 * decl.c (record_builtin_java_type): Make jboolean a
2761 integer type again where its mode doesn't match that of bool.
2763 2008-01-25 Richard Guenther <rguenther@suse.de>
2766 * decl.c (record_builtin_java_type): Make __java_boolean
2768 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2769 after TYPE_MAIN_VARIANT check.
2771 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2774 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2778 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2779 DECL_P in not a variable and appears more than once error messages.
2781 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2785 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2789 * typeck.c (structural_comptypes): Call cp_comptypes.
2790 (comptypes): New; called from the C/C++ common bits to perform
2792 (cp_comptypes): Renamed from comptypes, which is already used,
2793 with a different signature, by the C++ front end.
2794 (build_reinterpret_cast_1): Call cp_comptypes.
2795 (ptr_reasonably_similar): Ditto.
2796 * decl.c (decls_match): Ditto.
2797 * cvt.c (convert_to_reference): Ditto.
2798 * cp-tree.h (same_type_p): Ditto.
2799 (same_or_base_type_p): Ditto.
2800 (comptypes): Rename to cp_comptypes.
2801 * pt.c (canonical_type_parameter): Call cp_comptypes.
2803 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2805 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2806 test for equivalence between pointer and references.
2808 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2811 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2812 (check_field_decls): Likewise.
2813 (note_name_declared_in_class): Likewise.
2814 * call.c (build_new_op): Likewise.
2815 (convert_like_real): Likewise.
2816 (build_over_call): Likewise.
2817 * lex.c (unqualified_fn_lookup_error): Likewise.
2818 * parser.c (cp_parser_template_id): Likewise.
2819 * cvt.c (warn_ref_binding): Likewise.
2820 (convert_to_reference): Likewise.
2821 (ocp_convert): Likewise.
2822 (convert_to_void): Use error instead of pedwarn.
2823 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2824 * decl.c (compute_array_index_type): Use constant_expression_error.
2826 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2828 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2829 that auto is either a storage class or a simple type specifier,
2830 depending on the dialect.
2831 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2832 specifier in C++98 mode, error in C++0x mode (since we don't
2833 support auto as a type specifier, yet).
2834 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2835 storage specifier in C++0x mode.
2836 (cp_parser_simple_type_specifier): Parse `auto' as a
2837 simple-type-specifier, but error because we don't support it yet.
2839 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2841 * parser.c (cp_parser_nonclass_name): New.
2842 (cp_parser_pseudo_destructor_name): Use it instead of
2843 cp_parser_type_name.
2844 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2846 2008-02-29 Tom Tromey <tromey@redhat.com>
2848 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2849 (cp_lexer_get_preprocessor_token): Update.
2850 (cp_lexer_set_source_position_from_token): Don't call
2851 restore_input_file_stack.
2852 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2854 2008-02-28 Richard Guenther <rguenther@suse.de>
2857 2008-02-26 Richard Guenther <rguenther@suse.de>
2859 * decl.c (duplicate_decls): Remove decl from global mapping
2860 before ggc_freeing it.
2862 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2865 * rtti.c: Include c-pragma.h.
2866 (push_abi_namespace, pop_abi_namespace): New functions.
2867 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2868 create_tinfo_types, emit_support_tinfos): Use them.
2869 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2871 2008-02-26 Jason Merrill <jason@redhat.com>
2874 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2875 to name the struct for linkage purposes even if it has attributes.
2876 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2878 2008-02-26 Tom Tromey <tromey@redhat.com>
2880 * parser.c (eof_token): Remove old location code.
2881 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2882 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2884 (cp_write_global_declarations): Likewise.
2885 * lex.c (cxx_init): Remove old location code.
2886 (handle_pragma_implementation): Remove test of
2887 USE_MAPPED_LOCATION.
2888 * pt.c (tsubst): Remove old location code.
2889 * error.c (cp_print_error_function): Remove test of
2890 USE_MAPPED_LOCATION.
2891 * decl.c (pop_label): Remove old location code.
2892 (finish_function): Likewise.
2894 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2897 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2899 2008-02-26 Richard Guenther <rguenther@suse.de>
2901 * decl.c (duplicate_decls): Remove decl from global mapping
2902 before ggc_freeing it.
2904 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2907 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2909 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2911 * typeck.c (build_class_member_access_expr): Add appropriate
2912 OPT_W* parameter to warning.
2913 (build_reinterpret_cast_1): Likewise.
2914 * name-lookup.c (push_overloaded_decl): Likewise.
2916 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2919 * error.c (dump_expr): Handle CONJ_EXPR.
2921 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2924 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2925 (dump_expr): Handle FIXED_CST.
2927 2008-02-24 Jason Merrill <jason@redhat.com>
2929 * parser.c (cp_parser_declaration): Handle "inline namespace".
2930 (cp_parser_namespace_definition): Likewise.
2933 * name-lookup.c (arg_assoc_namespace): Look down into inline
2936 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2938 * typeck.c (check_for_casting_away_constness): Use 1 single
2939 argument, the type of cast, to decide what diagnostics generate.
2940 (build_static_cast_1): Remove unused code. Update call to
2941 check_for_casting_away_constness.
2942 (build_reinterpret_cast_1): Update call to
2943 check_for_casting_away_constness.
2944 (build_const_cast_1): Likewise.
2946 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2948 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2949 VEC_NEW_EXPR), forward to pp_expression.
2950 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2952 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2955 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2957 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2960 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2961 template decls' function decl.
2963 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2967 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2970 * pt.c (determine_specialization): In case of function templates,
2971 when the type of DECL does not match FN there is no match.
2973 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2976 * typeck.c (build_binary_op): Warn about floating point
2977 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2979 2008-02-19 Jason Merrill <jason@redhat.com>
2982 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2983 while we look for possible bindings.
2985 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2988 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2992 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2993 vars. Afterwards ensure v is VAR_DECL.
2996 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2997 call cp_finish_decl.
2998 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
3001 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
3006 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
3007 is error_mark_node, return an error early.
3008 (find_parameter_packs_r): Pass the pointer set along to recursive
3009 calls of cp_walk_subtrees; don't try to manage the pointer set
3011 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
3012 (make_pack_expansion): Ditto.
3013 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
3014 a second pass through the tree with find_parameter_packs_r; that
3015 second pass no longer does anything.
3016 (push_template_decl_real): If we have an erroneous declaration,
3017 set its type to error_mark_node before returning an error.
3019 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
3022 * pt.c (tsubst_initializer_list): Deal with the use of
3023 VOID_TYPE_NODE to indicate value-initialization of the bases.
3025 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3026 Jason Merrill <jason@redhat.com>
3030 * class.c (type_has_user_nondefault_constructor): New fn.
3031 * cp-tree.h: Declare it.
3032 * init.c (emit_mem_initializers): Use it for -W warning about
3033 missing base initializer.
3035 2008-02-14 Paolo Carlini <pcarlini@suse.de>
3038 * pt.c (determine_specialization): In case of function templates,
3039 when the type of DECL does not match FN there is no match.
3041 2008-02-13 Jakub Jelinek <jakub@redhat.com>
3042 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3045 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
3046 are not identifier :: ~, return before calling cp_parser_type_name.
3048 2008-02-13 Jason Merrill <jason@redhat.com>
3050 PR c++/34962, c++/34937, c++/34939
3051 * decl2.c (is_late_template_attribute): Always defer attributes
3052 vector_size and weak.
3055 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3056 of enumerators, too.
3058 2008-02-12 Jason Merrill <jason@redhat.com>
3061 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3062 if we're doing conversions to call a user-defined conversion function.
3064 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
3067 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3070 2008-02-12 Jakub Jelinek <jakub@redhat.com>
3073 * init.c (build_new_1): Don't create placement_expr before
3074 constructing alloc_call. Verify that the pointer is passed by
3075 value to operator new.
3077 2008-02-11 Jason Merrill <jason@redhat.com>
3080 * pt.c (tsubst): Don't look up a template typedef in an explicit
3083 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3086 * tree.c (cp_build_qualified_type_real): When building a
3087 cv-qualified array type, build it as a unique type with
3088 build_cplus_array_type_1 and then adopt the unqualified type's
3091 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3094 * decl.c (groktypename): Check grokdeclarator return.
3096 2008-02-10 Jason Merrill <jason@redhat.com>
3099 * decl2.c (cp_write_global_declarations): Don't write out static
3100 data members with DECL_IN_AGGR_P set.
3102 2008-02-08 Jason Merrill <jason@redhat.com>
3105 * tree.c (build_target_expr_with_type): Handle void initializer.
3106 (bot_manip): Remap slot before recursing.
3108 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3111 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3113 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3116 * tree.c: Include tree-flow.h.
3117 (build_target_expr): Check type compatibility.
3118 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3119 * call.c (convert_like_real): Convert bitfield to expected type.
3121 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3125 * typeck.c (structural_comptypes): Call cp_comptypes.
3126 (comptypes): New; called from the C/C++ common bits to perform
3128 (cp_comptypes): Renamed from comptypes, which is already used,
3129 with a different signature, by the C++ front end.
3130 (build_reinterpret_cast_1): Call cp_comptypes.
3131 (ptr_reasonably_similar): Ditto.
3132 * decl.c (decls_match): Ditto.
3133 * cvt.c (convert_to_reference): Ditto.
3134 * cp-tree.h (same_type_p): Ditto.
3135 (same_or_base_type_p): Ditto.
3136 (comptypes): Rename to cp_comptypes.
3137 * pt.c (canonical_type_parameter): Call cp_comptypes.
3139 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3142 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3143 value dependent expression.
3145 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3148 * decl2.c (save_template_attributes): When we're modifying the
3149 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3150 all of the other variants to add those same attributes. Otherwise,
3151 the main variant will be inconsistent with those other variants.
3153 2008-02-04 Richard Guenther <rguenther@suse.de>
3156 * decl.c (record_builtin_java_type): Make jboolean a
3157 integer type again where its mode doesn't match that of bool.
3159 2008-02-02 Jason Merrill <jason@redhat.com>
3160 Mark Mitchell <mark@codesourcery.com>
3163 * init.c (build_value_init_1): New function.
3164 (build_value_init): New function.
3165 * typeck2.c (build_functional_cast): Call it.
3166 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3168 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3169 TYPE_HAS_CONSTRUCTOR.
3170 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3171 add_implicitly_declared_members): Adjust.
3172 (check_field_decls): Adjust. Remove warnings about reference/const
3173 in class without constructor.
3174 (check_bases_and_members): Adjust. Give those warnings here instead.
3175 * decl.c (fixup_anonymous_aggr): Adjust.
3176 (check_initializer): Adjust, clarify logic slightly.
3177 (grok_special_member_properties): Adjust, only set if user-provided.
3178 * rtti.c (create_tinfo_types): Don't set.
3179 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3180 Use same_type_ignoring_top_level_qualifiers_p.
3181 * pt.c (check_explicit_specialization): Adjust.
3182 (instantiate_class_template): Adjust.
3184 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3185 Jakub Jelinek <jakub@redhat.com>
3189 * typeck.c (structural_comptypes): Handle comparisons of
3190 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3192 * mangle.c (write_builtin_type): Map down to the canonical type,
3193 which will be one of the predefined type nodes.
3195 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3198 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3199 bits to allow for expansion of the number of middle end tree
3202 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3213 * typeck.c (check_return_expr): Tweak call to
3214 check_for_bare_parameter_packs.
3215 * class.c (add_method): Be careful with error_mark_nodes.
3216 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3218 * pt.c (struct find_parameter_pack_data): Remove
3220 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3221 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3222 (make_pack_expansion): Ditto.
3223 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3225 (process_template_parm): Tweak call to
3226 check_for_bare_parameter_packs.
3227 (push_template_decl_real): Tweak calls to
3228 check_for_bare_parameter_packs. If bare parameter packs are found
3229 in the list of exceptions, clear out that list after giving an
3231 * semantics.c (finish_cond): Tweak call to
3232 check_for_bare_parameter_packs.
3233 (finish_expr_stmt): Ditto.
3234 (finish_for_expr): Ditto.
3235 (finish_switch_cond): Ditto.
3236 (finish_mem_initializers): Ditto.
3237 (finish_member_declaration): Ditto.
3238 (finish_static_assert): Check for bare parameter packs in the
3240 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3241 attributes of a declaration.
3242 * parser.c (cp_parser_using_declaration): Tweak call to
3243 check_for_bare_parameter_packs.
3244 (cp_parser_base_clause): Ditto.
3246 2008-01-28 Jason Merrill <jason@redhat.com>
3249 * class.c (build_base_path): Fix !want_pointer case.
3251 2008-01-27 Jason Merrill <jason@redhat.com>
3254 * class.c (build_base_path): Fix previous change.
3256 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3259 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3262 2008-01-26 Richard Guenther <rguenther@suse.de>
3265 * typeck.c (build_binary_op): Remove code to shorten compares.
3267 2008-01-25 Richard Guenther <rguenther@suse.de>
3270 * decl.c (record_builtin_java_type): Make __java_boolean
3272 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3273 after TYPE_MAIN_VARIANT check.
3275 2008-01-25 Jason Merrill <jason@redhat.com>
3278 * class.c (build_base_path): Don't mess with virtual access if
3280 * call.c (standard_conversion): Don't check whether source type
3283 * decl2.c (is_late_template_attribute): Don't defer attribute
3284 visibility just because the type is dependent.
3286 2008-01-25 Jason Merrill <jason@redhat.com>
3287 Mark Mitchell <mark@codesourcery.com>
3290 * call.c (standard_conversion): Allow conversion from integer/real
3292 (compare_ics): Such a conversion is worse than a normal arithmetic
3295 2008-01-25 Richard Guenther <rguenther@suse.de>
3298 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3301 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3304 * pt.c (push_template_decl_real): Return error_mark_node in case
3305 of template definition of non-template.
3307 2008-01-24 Jason Merrill <jason@redhat.com>
3310 * decl2.c (is_late_template_attribute): Defer any attribute with
3311 dependent args. Also defer type attributes if the type is dependent.
3313 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3314 Alexandre Oliva <aoliva@redhat.com>
3317 * call.c (reference_binding): For bitfields use the declared bitfield
3319 (add_builtin_candidates): Likewise.
3320 * class.c (layout_class_type): For bitfields copy over the
3321 original type quals.
3323 2008-01-22 Jason Merrill <jason@redhat.com>
3326 * decl.c (groktypename): Also ignore attributes on dependent
3327 possibly-class types.
3330 * friend.c (do_friend): Check for prior declaration of a friend
3331 function of a local class.
3332 * name-lookup.c (lookup_name_innermost_nonclass_level):
3334 * name-lookup.h: Declare it.
3336 2008-01-22 Tom Tromey <tromey@redhat.com>
3339 * init.c (build_new_1): Only disallow Java aggregates.
3341 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3344 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3345 if decl or init is error_mark_node.
3348 * error.c (dump_expr): Handle VECTOR_CST.
3350 2008-01-21 Jason Merrill <jason@redhat.com>
3353 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3356 * pt.c (retrieve_local_specialization): Robustify.
3357 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3360 * pt.c (tsubst): Only call retrieve_local_specialization if the
3361 original typedef was in a function template.
3364 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3366 2008-01-21 Richard Guenther <rguenther@suse.de>
3369 * error.c (cp_print_error_function): Deal with recursive
3372 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3375 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3377 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3381 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3382 on non-IS_AGGR_TYPE scope.
3383 (constructor_name_p): Assert IS_AGGR_TYPE.
3385 2008-01-18 Ian Lance Taylor <iant@google.com>
3388 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3389 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3390 DECL_IS_OPERATOR_NEW flag.
3392 2008-01-16 Richard Guenther <rguenther@suse.de>
3395 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3396 for conversions to type variants.
3398 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3400 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3401 declaration and code. Update copyright year.
3403 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3406 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3407 know we have a class type.
3409 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3412 * pt.c (coerce_template_parameter_pack): When substituting into
3413 the type of a non-type template parameter pack. use the
3414 deduced/substituted arguments.
3415 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3416 can be a parameter pack with the ellipsis following it. When we
3417 have an erroneous declaration, allow it to be a parameter pack.
3418 (cp_parser_template_parameter): Complain about default
3419 arguments on non-type template parameter packs, and parse them
3420 using the new cp_parser_default_argument.
3421 (cp_parser_parameter_declaration): Complain about parameter packs
3422 with default arguments. Move parsing of default arguments into a
3423 new function, cp_parser_default_argument.
3424 (cp_parser_default_argument): New; extracted from
3425 cp_parser_parameter_declaration.
3427 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3433 * typeck.c (check_return_expr): If there are bare parameter packs
3434 in the return value, set it to error_mark_node.
3435 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3436 * pt.c (find_parameter_packs_r): Look at the type of
3437 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3438 (check_for_bare_parameter_packs): Flip the result: now returns
3439 TRUE when there were bare parameter packs, FALSE otherwise.
3440 (push_template_decl_real): Deal with flipped result of
3441 check_for_bare_parameter_packs.
3442 * semantics.c (finish_cond): If there are bare parameter packs in
3443 the conditional, set it to error_mark_node.
3444 (finish_expr_stmt): If there are bare parameter packs in the
3445 expression, set it to error_mark_node.
3446 (finish_for_expr): Ditto.
3447 (finish_switch_cond): If there are bare parameter packs in
3448 the conditional, set it to error_mark_node.
3449 (finish_mem_initializers): If there are bare parameter packs in
3450 the member initializer, set it to error_mark_node.
3451 (finish_member_declaration): Check the attributes of the
3452 declaration for bare parameter packs, and remove the attributes if
3453 any have bare parameter packs.
3454 * parser.c (cp_parser_using_declaration): Check the using
3455 declaration for bare parameter packs.
3456 (cp_parser_base_clause): If there are bare parameter packs in a
3457 base specifier, don't add it to the chain.
3459 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3462 * error.c (dump_simple_decl): Display ellipsis for template
3463 non-type parameter packs.
3464 (dump_decl): Display ellipsis for template type parameter packs.
3465 (dump_template_decl): Display ellipsis for template template
3467 * pt.c (redeclare_class_template): When redeclaring a class
3468 template, check for collisions between template parameters and
3469 template parameter packs.
3471 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3474 * pt.c (process_partial_specialization): Don't mark template
3475 parameters that occur in non-deduced contexts.
3476 (struct pair_fn_data): Add include_nondeduced_p.
3477 (for_each_template_parm_r): Only visit non-deduced contexts if
3478 include_nondeduced_p is set.
3479 (for_each_template_parm): Added parameter include_nondeduced_p,
3480 which states whether template parameters found in non-deduced
3481 contexts should be visited.
3482 (uses_template_parms): Visit all template parameters, even those
3483 in non-deduced contexts.
3485 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3488 * pt.c (check_default_tmpl_args): Check for parameter packs that
3489 aren't at the end of a primary template.
3490 (push_template_decl_real): Remove check for parameter packs that
3491 aren't at the end of a primary template; that now happens in
3492 check_default_tmpl_args.
3493 * semantics.c (finish_template_template_parm): Use
3494 check_default_tmpl_args to check for errors in the template
3497 2008-01-12 Doug Kwan <dougkwan@google.com>
3499 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3500 instead of OPT_Wreturn_type in warning due to ignored return type
3502 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3503 instead of OPT_Wreturn_type in warning due to ignored return type
3506 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3509 * semantics.c (finish_omp_for): Don't call
3510 fold_build_cleanup_point_expr if processing_template_decl.
3512 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3513 Jakub Jelinek <jakub@redhat.com>
3516 * error.c (dump_template_argument): Deal with TREE_LIST.
3518 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3520 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3521 long" in C++0x mode; change the warning to note that "long long"
3522 is only unsupported in C++98 mode.
3524 2007-12-20 Jason Merrill <jason@redhat.com>
3527 * call.c (standard_conversion): Derived-to-base is considered a
3528 standard conversion.
3530 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3533 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3534 call cp_parser_statement rather than
3535 cp_parser_already_scoped_statement.
3537 2007-12-18 Jason Merrill <jason@redhat.com>
3540 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3542 (dependent_type_p_r): Handle the domain of an array.
3544 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3545 Jakub Jelinek <jakub@redhat.com>
3550 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3551 bindings of template template parameters after all template
3552 arguments have been deduced.
3553 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3555 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3556 (unify): Deal with variadic, bound template template parameters.
3557 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3559 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3562 * decl.c (grokdeclarator): Reject friend sfk_constructor
3565 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3568 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3571 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3574 * cp-lang.c (cp_classify_record): New.
3575 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3577 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3580 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3583 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3584 dynamic_cast in a template.
3586 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3589 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3590 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3592 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3595 * error.c (dump_type_prefix, dump_type_suffix): Handle
3596 TYPE_PACK_EXPANSION.
3599 * error.c (dump_expr): Handle ABS_EXPR.
3601 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3605 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3606 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3607 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3608 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3609 flag_use_repository and repo_emit_p returned 2.
3611 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3614 * tree.c (stabilize_call, stabilize_init): Do nothing if
3615 processing_template_decl.
3617 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3620 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3621 error instead of assertion failure.
3622 * parser.c (cp_parser_decltype): If closing paren is not found,
3623 return error_mark_node.
3625 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3628 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3630 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3631 since arg_assoc_template_arg will deal with them (better).
3633 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3636 * pt.c (tsubst_exception_specification): Handle substitutions into
3637 member templates, where tsubst_pack_expansion returns a
3638 TYPE_PACK_EXPANSION.
3640 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3643 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3644 bindings for the template parameter pack, don't try to keep the
3645 empty deduced arguments.
3646 (unify): If a parameter is a template-id whose template argument
3647 list contains a pack expansion that is not at the end, then we
3648 cannot unify against that template-id.
3650 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3653 * pt.c (current_template_args): Use error_operand_p.
3655 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3658 * error.c (dump_decl): Handle TREE_BINFO.
3660 2007-12-01 Ollie Wild <aaw@google.com>
3663 * typeck.c (build_binary_op): Add conversion of pointers to function
3664 members appearing as operands to the equality operators.
3666 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3669 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3671 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3674 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3676 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3681 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3683 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3686 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3688 PR tree-optimization/34181
3689 * method.c (use_thunk): Don't inline the call in the thunk.
3692 * tree.c (decl_linkage): Static data members and static member
3693 functions in anonymous ns classes are lk_external.
3695 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3698 * decl.c (start_preparsed_function): Pass
3699 processing_template_decl for the new allocate_struct_function
3702 2007-11-25 Richard Guenther <rguenther@suse.de>
3704 * decl.c (poplevel): Use BLOCK_CHAIN.
3706 2007-11-24 Ollie Wild <aaw@google.com>
3708 * typeck.c (delta_from_ptrmemfunc): New function.
3709 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3710 (build_binary_op): Call delta_from_ptrmemfunc.
3712 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3716 * decl.c (cp_finish_decl): Disallow variable or field
3717 definitions if extern "Java" aggregates.
3718 (grokparms): Disallow parameters with extern "Java"
3720 (check_function_type): Disallow function return values
3721 with extern "Java" aggregates.
3722 * init.c (build_new_1): Disallow placement new with
3723 extern "Java" aggregates.
3725 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3726 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3729 * call.c (convert_like_real): Build a zero constant when __null is
3730 converted to an integer type.
3732 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3735 * decl2.c (cp_write_global_declarations): Issue error about static
3736 data members in anonymous namespace which are declared and used,
3739 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3742 * parser.c (cp_parser_class_head): Reject function template ids.
3745 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3746 when processing_template_decl to build_array_type.
3749 * pt.c (more_specialized_fn): Don't segfault if one or
3750 both argument list end with ellipsis.
3752 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3755 * semantics.c (finish_call_expr): Set
3756 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3757 or OVERLOAD with all noreturn functions.
3759 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3762 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3765 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3772 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3773 set to error_mark_node the outermost POINTER_TYPE to the pack if
3774 it is seen in a POINTER_TYPE.
3775 (push_template_decl_real): If check_for_bare_parameter_packs
3776 fails for function return type, set the return type to
3777 integer_type_node. If check_for_bare_parameter_packs failed
3778 for non-function, return error_mark_node.
3781 * call.c (build_new_op): Call resolve_args before calling
3784 2007-11-11 Tom Tromey <tromey@redhat.com>
3787 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3789 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3792 * pt.c (redeclare_class_template): Update error message. Use a
3793 note to show the previous declaration.
3794 (tsubst_friend_class): Use the location of the friend template as
3795 the input location before calling redeclare_class_template.
3797 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3800 * semantics.c (finish_pseudo_destructor_expr): Handle
3801 object == error_mark_node.
3803 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3806 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3807 is not scalar type, let finish_class_member_access_expr handle
3808 diagnostics. Pass BIT_NOT_EXPR argument to
3809 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3811 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3814 * decl.c (cp_complete_array_type): If any of the initializer
3815 elements are pack expansions, don't compute the array size yet.
3817 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3820 * tree.c (decl_linkage): Fields have no linkage.
3822 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3824 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3826 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3831 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3832 Be careful with ERROR_MARK_NODEs.
3833 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3836 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3839 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3842 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3846 * tree.c (c_build_qualified_type): Define bridge to
3847 cp_build_qualified_type.
3849 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3860 * typeck.c (check_return_expr): Pass address of retval to
3861 check_for_bare_parameter_packs.
3862 * class.c (build_base_field): Tolerate bases that have no layout
3864 (end_of_base): Ditto.
3865 * tree.c (canonical_type_variant): Be careful with
3867 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3869 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3870 which states whether parameter packs should be replaced with
3872 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3873 possible. If set_packs_to_error is set true, replace the parameter
3874 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3875 (uses_parameter_packs): Don't set parameter packs to
3877 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3878 which may be modified (if it is a parameter pack). Instructs
3879 find_parameter_packs_r to replace parameter packs with
3880 ERROR_MARK_NODE (so that they won't cause errors later on).
3881 (process_template_parm): Pass pointer to
3882 check_for_bare_parameter_packs.
3883 (process_partial_specialization): Replace pack expansions before
3884 the end of the template argument list with ERROR_MARK_NODE.
3885 (push_template_decl_real): Pass pointer to
3886 check_for_bare_parameter_packs. Replace parameter packs not at the
3887 end of the template parameter list with ERROR_MARK_NODE.
3888 (convert_template_argument): Be more careful about using DECL_NAME
3889 on only declarations.
3890 (unify): Can't unify against ERROR_MARK_NODE.
3891 * semantics.c (finish_cond): Pass pointer to
3892 check_for_bare_parameter_packs.
3893 (finish_expr_stmt): Ditto.
3894 (finish_for_expr): Ditto.
3895 (finish_switch_cond): Pass pointer to
3896 check_for_bare_parameter_packs, and call it before we put the
3897 condition into the statement.
3898 (finish_mem_initializers): Pass pointer to
3899 check_for_bare_parameter_packs.
3900 (finish_member_declaration): Ditto.
3901 * parser.c (cp_parser_base_clause): Ditto.
3903 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3906 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3907 with the final TREE_READONLY flag in place. processing_template_decl
3908 is known to be 0 in this part of function.
3911 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3912 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3913 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3914 * semantics.c (finish_omp_atomic): Revert most of the
3915 2007-02-05 changes, just keep the new representation of
3916 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3918 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3921 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3924 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3929 * typeck.c (merge_types): Don't lose rvalue references when
3931 * call.c (build_over_call): Don't elide move constructors just
3932 because the copy constructor is trivial (!).
3933 (compare_ics): If comparing cv-qualifiers fails, we can still order
3934 based on binding lvalues vs. rvalues.
3936 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3939 * pt.c (unify_pack_expansion): bring handling of function call
3940 arguments into line with type_unification_real.
3942 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3944 * typeck.c (build_binary_op): Use pedwarn instead of error for
3947 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3950 * parser.c (cp_parser_unary_expression): For &&label call
3951 cp_parser_non_integral_constant_expression and return error_mark_node
3952 if it returned true.
3955 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3956 is neither FUNCTION_TYPE nor METHOD_TYPE.
3958 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3961 * parser.c (cp_parser_nested_name_specifier_opt): Use
3962 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3963 typedef of currently open class.
3965 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3968 * error.c (dump_expr): Deal specially with statements.
3970 2007-11-01 Jason Merrill <jason@redhat.com>
3973 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3975 (lookup_template_class): Use it to get the outer template args
3976 for instantiating one.
3979 * pt.c (reduce_template_parm_level): tsubst the parameters
3980 of a template template parm.
3982 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3985 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3987 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3990 * parser.c (cp_parser_postfix_dot_deref_expression): If
3991 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3992 first and if that succeeds and type is SCALAR_TYPE_P, create
3996 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3997 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3998 as for std::type_info.
4000 2007-10-31 Paolo Carlini <pcarlini@suse.de>
4003 * cxx-pretty-print.c (pp_cxx_typeid_expression,
4004 pp_cxx_delete_expression): Change to static linkage.
4005 * cxx-pretty-print.h: Adjust declarations.
4006 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
4007 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
4008 MODOP_EXPR): Forward to pp_expression.
4010 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
4013 2007-10-31 Christian Bruel <christian.bruel@st.com>
4014 Mark Mitchell <mark@codesourcery.com>
4017 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
4018 if retval is volatile.
4020 2007-10-30 Jakub Jelinek <jakub@redhat.com>
4023 * decl2.c (build_offset_ref_call_from_tree): Call
4024 build_non_dependent_expr on object prior to building ADDR_EXPR from it
4025 if FN is DOTSTAR_EXPR.
4027 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
4031 * pt.c (find_parameter_packs_r): Fix typo in comment.
4032 (convert_template_argument): Look at the pattern of a pack
4033 expansion to determine what kind of entity we're converting.
4034 (coerce_template_parameter_pack): When we have coerced a non-type
4035 template parameter pack, substitute into the type of that pack.
4036 (tsubst_pack_expansion): When our substitution of a parameter pack
4037 is a "trivial" substitution of itself, just substitute into the
4038 pack expansion rather than actually expanding.
4040 2007-10-29 Jakub Jelinek <jakub@redhat.com>
4043 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
4044 for non-integral type bitfields. Return true if bitfield is correct, false
4045 error has been diagnosed.
4046 (check_field_decls): If check_bitfield_decl returned false, call also
4049 2007-10-28 Paolo Carlini <pcarlini@suse.de>
4050 Mark Mitchell <mark@codesourcery.com>
4053 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4054 class member error out and return.
4056 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4058 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4059 to current_function_decl rather than 0.
4062 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4064 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4066 2007-10-27 Jason Merrill <jason@redhat.com>
4069 * call.c (convert_default_arg): Detect recursion.
4071 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4074 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4075 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4077 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4079 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4081 2007-10-26 Jason Merrill <jason@redhat.com>
4084 * pt.c (get_template_info): New fn.
4085 (template_class_depth): Use it.
4086 (push_template_decl_real): Check that the template args of the
4087 definition match the args of the previous declaration.
4089 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4092 * decl2.c (coerce_new_type): Do not allow a default argument for
4093 the first parameter.
4095 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4098 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4099 don't see the leading '('. Only lookup names if we get an
4102 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4105 * parser.c (cp_parser_parenthesized_expression_list): Set
4106 greater_than_is_operator_p to true in between the parens.
4108 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4111 * decl.c (grokdeclarator): In case of conflicting specifiers
4112 just return error_mark_node.
4114 2007-10-26 Ollie Wild <aaw@google.com>
4116 * expr.c (cxx_expand_expr): Removed.
4117 * cp-tree.h (exx_expand_expr): Removed.
4118 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4121 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4124 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4126 2007-10-23 Jason Merrill <jason@redhat.com>
4128 PR c++/25950 (DR 391)
4129 * call.c (struct conversion): Remove check_copy_constructor_p.
4130 (reference_binding): Always bind a reference directly to a
4131 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4133 (check_constructor_callable): Remove.
4134 (convert_like_real): Don't call it.
4135 (initialize_reference): Don't call check_constructor_callable.
4136 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4137 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4138 conversions if LOOKUP_NO_TEMP_BIND.
4139 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4140 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4142 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4144 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4147 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4148 before checking if its type is integral.
4150 2007-10-22 Jason Merrill <jason@redhat.com>
4153 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4154 * pt.c (apply_late_template_attributes): Splice out dependent
4155 attributes from DECL_ATTRIBUTES.
4157 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4159 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4161 * typeck.c (build_binary_op) : Use appropriate warning option
4162 instead of unnamed warning.
4164 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4167 * pt.c (current_template_args): Do not change TREE_LIST elements
4168 with a TREE_VALUE of error_mark_node.
4170 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4172 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4173 * decl.c (start_decl): Tidy.
4174 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4176 (grokdeclarator): Clarify comment.
4178 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4181 * decl.c (grokfndecl): Return NULL after the "definition of
4182 implicitly-declared" error happened.
4184 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4187 * call.c (build_user_type_conversion_1): Do not consider conversion
4188 functions to convert a (possibly cv-qualified) object to the (possibly
4189 cv-qualified) same object type (or a reference to it), to a (possibly
4190 cv-qualified) base class of that type (or a reference to it).
4192 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4194 * pt.c (tsubst): Use template_parm_level_and_index.
4196 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4199 * parser.c (cp_parser_compound_statement): Handle label-declarations
4200 at the beginning of the compound statement.
4201 (cp_parser_block_declaration): Issue diagnostics about __label__
4202 not at the beginning of a block.
4204 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4207 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4208 to convert_template_argument.
4209 (coerce_template_parms): Return error_mark_node after fixed-length
4211 (tsubst_decl): Check for error_mark_node the return value of the
4212 first tsubst in 'case VAR_DECL'.
4214 2007-10-08 Ollie Wild <aaw@google.com>
4216 * typeck2.c (digest_init): Call cplus_expand_constant after
4217 convert_for_initialization.
4218 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4219 * expr.c (cplus_expand_constant): Updated function description.
4221 2007-10-04 Jason Merrill <jason@redhat.com>
4224 * call.c (initialize_reference): Handle local static reference
4227 2007-10-03 Jason Merrill <jason@redhat.com>
4230 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4231 (push_namespace): Here.
4232 (handle_namespace_attrs): New fn for the attr code.
4233 (leave_scope): Don't pop_visibility.
4234 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4235 * parser.c (cp_parser_namespace_definition): Call
4236 handle_namespace_attrs and pop_visibility as appropriate.
4239 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4241 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4243 * decl.c (duplicate_decls): Preserve linkage flags for mere
4244 redeclarations of gnu_inline definitions.
4246 2007-10-03 Jason Merrill <jason@redhat.com>
4249 * decl.c (wrap_cleanups_r): New fn.
4250 (wrap_temporary_cleanups): New fn.
4251 (initialize_local_var): Call it.
4253 2007-09-29 Jason Merrill <jason@redhat.com>
4256 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4257 constant to not have DECL_EXTERNAL if it's file-local.
4259 2007-09-28 Ollie Wild <aaw@google.com>
4262 2007-09-27 Ollie Wild <aaw@google.com>
4264 * typeck2.c (digest_init): Call cplus_expand_constant after
4265 convert_for_initialization.
4266 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4267 * expr.c (cplus_expand_constant): Updated function description.
4269 2007-09-28 Jason Merrill <jason@redhat.com>
4272 * class.c (layout_empty_base): Take rli parameter, update
4273 rli->record_align if empty base has user-specified alignment.
4274 (build_base_field): Pass rli to it.
4276 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4279 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4281 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4284 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4285 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4286 (dump_parameters): Just call dump_type for argument packs too.
4288 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4291 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4292 qualification by creating qualified PACK_EXPANSION_PATTERN and
4293 then calling make_pack_expansion on it.
4295 2007-09-27 Ollie Wild <aaw@google.com>
4297 * typeck2.c (digest_init): Call cplus_expand_constant after
4298 convert_for_initialization.
4299 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4300 * expr.c (cplus_expand_constant): Updated function description.
4302 2007-09-27 Jason Merrill <jason@redhat.com>
4305 * decl2.c (is_late_template_attribute): Don't crash on unknown
4308 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4311 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4312 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4313 spaces in the formatting.
4314 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4316 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4318 * error.c (cxx_print_error_function): Add third argument, pass
4319 it over to lhd_print_error_function.
4320 (cp_print_error_function): If diagnostic->abstract_origin, print
4322 * cp-tree.h (struct diagnostic_info): New forward decl.
4323 (cxx_print_error_function): Add third argument.
4325 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4328 * name-lookup.c (pushtag): Do not create an implicit typedef before
4329 the associated type declaration is known to be valid.
4331 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4333 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4334 rather than pointers.
4336 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4339 * search.c (check_final_overrider): Fail if
4340 targetm.comp_type_attributes returns 0.
4342 2007-09-24 Jason Merrill <jason@redhat.com>
4345 * pt.c (resolve_typename_type): Don't look things up in the original
4346 template if it would mean losing template arguments.
4348 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4351 * cp-tree.h (cxx_type_hash_eq): New prototype.
4352 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4353 * tree.c (cxx_type_hash_eq): New function.
4355 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4358 * tree.c (cp_build_qualified_type_real): Build a canonical
4359 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4361 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4365 * tree.c (cplus_array_compare): Compare pointers, not types.
4366 (build_cplus_array_type_1): Store new array type into the hash
4367 table before building the canonical type; build the canonical type
4369 (cp_build_qualified_type_real): Put all of the array types with
4370 cv-qualified element types into the C++ array hash table, built as
4371 variants of the unqualified versions.
4373 2007-09-23 Jason Merrill <jason@redhat.com>
4376 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4377 for deprecation warnings.
4379 2007-09-22 Jason Merrill <jason@redhat.com>
4382 * call.c (build_over_call): Warn about deprecated virtuals.
4385 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4386 (MAYBE_TAGGED_TYPE_P): Remove.
4387 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4388 instead of calling is_late_template_attribute again.
4389 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4390 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4391 Don't crash on typedefs from non-template classes.
4392 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4393 (is_late_template_attribute): All attributes applied to template
4394 parms or typename types are dependent. Static.
4395 (splice_template_attributes): Pass decl through.
4396 (save_template_attributes): Likewise.
4398 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4401 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4402 returned from tsubst_pack_expansion.
4403 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4404 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4406 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4409 * semantics.c (finish_id_expression): Use consistently
4410 context_for_name_lookup.
4411 * decl.c (fixup_anonymous_aggr): Fix error message for
4412 anonymous struct (vs union).
4414 2007-09-19 Jason Merrill <jason@redhat.com>
4417 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4418 (retrieve_specialization): Only tagged types use
4419 DECL_TEMPLATE_INSTANTIATIONS.
4420 (instantiate_class_template): Push nested classes too.
4421 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4423 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4424 * init.c (is_aggr_type): Remove redundant tests.
4425 * class.c (push_nested_class): Use CLASS_TYPE_P.
4427 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4430 * init.c (build_zero_init): If, recursively, build_zero_init
4431 returns a NULL_TREE, do not append it to the VEC of constructors.
4433 2007-09-18 Jason Merrill <jason@redhat.com>
4436 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4437 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4438 ATTR_FLAG_TYPE_IN_PLACE.
4439 (tsubst): Do unqualified lookup to find typedefs from current class.
4440 [ARRAY_TYPE]: Propagate alignment info.
4441 * decl2.c (is_late_template_attribute): Only defer handling of
4442 attribute aligned if the expression is dependent.
4443 (save_template_attributes): If we're deferring any attributes,
4444 make this a naming typedef.
4446 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4448 PR c++/33462 (again)
4449 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4450 va_arg instead of __builtin_va_arg.
4452 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4455 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4456 (pp_cxx_primary_expression): Use it.
4457 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4458 * error.c (dump_expr): Use it.
4460 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4463 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4464 out case TYPEID_EXPR to...
4465 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4466 and pp_cxx_right_paren.
4467 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4468 * error.c (dump_expr): Use it.
4470 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4473 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4474 (pp_cxx_primary_expression): Use it.
4475 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4476 * error.c (dump_expr): Use it.
4478 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4481 * init.c (build_new): Remove warning for zero-element
4484 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4487 * call.c (maybe_handle_implicit_object): Set this_p, clear
4488 rvaluedness_matches_p.
4489 (compare_ics): Do not compare rvaluedness matching when one of the
4490 operands is an implicit object.
4492 2007-09-14 Jason Merrill <jason@redhat.com>
4494 PR c++/17743, c++/19163
4495 * decl2.c (is_late_template_attribute): New fn.
4496 (splice_template_attributes, save_template_attributes): New fns.
4497 (cplus_decl_attributes): Call save_template_attributes.
4498 * pt.c (apply_late_template_attributes): New fn.
4499 (instantiate_class_template, tsubst_decl): Use it.
4500 * cp-tree.h: Declare is_late_template_attribute.
4502 2007-09-13 Tom Tromey <tromey@redhat.com>
4504 * parser.c (cp_lexer_new_main): Don't use
4505 c_lex_return_raw_strings.
4506 (cp_lexer_get_preprocessor_token): Update. Add special case when
4509 2007-09-11 Jan Hubicka <jh@suse.cz>
4511 * method.c (use_thunk): Use tree_rest_of_compilation
4512 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4513 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4514 * cp-tree.h (expand_body): Kill.
4515 (emit_associated_thunks): Declare.
4516 * semantics.c (emit_associated_thunks): Export.
4517 (expand_body): Kill.
4519 2007-09-09 David Daney <ddaney@avtrex.com>
4522 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4523 to calculate cookie_ptr.
4525 2007-09-08 Jason Merrill <jason@redhat.com>
4528 * pt.c (most_specialized_class): Set processing_template_decl
4529 while tsubsting partial spec args.
4531 2007-09-06 Jason Merrill <jason@redhat.com>
4533 * decl2.c (get_guard): Copy visibility from the guarded variable.
4535 2007-09-06 Jan Hubicka <jh@suse.cz>
4537 * semantics.c (expand_body): Do not mark arguments of clones used.
4539 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4542 * decl.c (cp_finish_decl): When processing_template_decl,
4543 deal correctly with init as TREE_LIST.
4545 2007-09-06 Tom Tromey <tromey@redhat.com>
4547 * decl.c (finish_function): Put return's location on line zero of
4550 2007-09-05 Jason Merrill <jason@redhat.com>
4553 * except.c (prepare_eh_type): Use type_decays_to.
4556 * init.c (build_delete): Use build_headof to get the address of the
4557 complete object if we aren't using the deleting destructor.
4558 * rtti.c (build_headof): No longer static.
4559 * cp-tree.h: Declare it.
4561 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4563 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4564 decl if a prototype for XX is provided with throw().
4567 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4568 on __*_chk non-__builtin_* decls.
4570 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4573 * semantics.c (finish_id_expression): Use context_for_name_lookup
4574 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4575 * class.c (finish_struct_anon): Deal correctly with anonymous
4576 structs (vs unions, as GNU extension) in error messages.
4578 2007-09-05 Jan Hubicka <jh@suse.cz>
4580 * sematics.c (expand_body): Remove unnecesary import_export_decl
4581 call, DECL_EXTERNAL checks and current_function_decl saving.
4583 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4585 PR c++/29731 (again)
4586 * parser.c (cp_parser_primary_expression): Return error_mark_node
4587 when a statement-expression is found in a template-argument list.
4589 2007-09-04 Jason Merrill <jason@redhat.com>
4591 * except.c (initialize_handler_parm): Use
4592 fold_build_cleanup_point_expr.
4595 * call.c (reference_binding): Don't look for user-defined conversions
4599 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4600 the MUST_NOT_THROW_EXPR.
4602 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4604 * decl.c (cp_finish_decl): Call determine_visibility before
4605 make_rtl_for_nonlocal_decl.
4607 2007-09-04 Jason Merrill <jason@redhat.com>
4610 * pt.c (most_specialized_class): Substitute outer template
4611 arguments into the arguments of a member template partial
4613 (strip_innermost_template_args): New fn.
4615 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4617 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4619 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4621 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4622 * decl.c (cp_make_fname_decl): Likewise,
4623 * parser.c (cp_parser_string_literal): Likewise,
4624 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4625 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4628 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4631 * typeck.c (build_unary_op): Fix error message for
4632 Boolean expression as operand to operator--.
4634 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4636 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4637 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4640 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4643 * init.c (build_default_init): Make extern.
4644 * cp-tree.h (build_default_init): Declare here.
4645 * pt.c (tsubst_expr): When the instantiation of the initializer of
4646 a variable results in an empty list, default-initialize the
4648 (tsubst_copy_and_build): When the instantiation of the initializer
4649 in a new expression results in an empty initializer list,
4650 default-initialize it.
4652 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4654 * mangle.c (write_type): Change mangling of rvalue reference from
4657 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4659 * decl.c (duplicate_decls): Remove duplicated line.
4661 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4664 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4665 BOUND_TEMPLATE_TEMPLATE_PARM.
4667 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4670 * search.c (lookup_member): Check the name argument for
4673 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4676 * parser.c (cp_parser_trait_expr): Check rerurn value of
4679 2007-08-30 Ollie Wild <aaw@google.com>
4681 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4682 convert_ptrmem for pointer to member conversions.
4683 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4684 (ocp_convert): Update cp_convert_to_pointer call.
4685 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4687 (build_static_cast_1): Check can_convert for conversions in either
4689 (get_delta_difference_1): New function.
4690 (get_delta_difference): Refactor to call get_delta_difference_1.
4692 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4694 * decl.c (start_preparsed_function): Set
4695 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4697 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4700 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4701 BOUND_TEMPLATE_TEMPLATE_PARM.
4703 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4707 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4708 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4710 2007-08-27 Jason Merrill <jason@redhat.com>
4713 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4714 Look inside STMT_EXPR.
4715 * semantics.c (stmt_expr_value_expr): New fn.
4716 * cp-tree.h: Declare it.
4719 * decl.c (groktypename): Ignore attributes applied to class type.
4721 2007-08-28 Richard Guenther <rguenther@suse.de>
4723 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4725 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4727 * error.c (dump_expr): Handle COMPLEX_CST.
4728 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4729 (pp_cxx_expression): Likewise.
4731 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4733 * decl.c (GNU_INLINE_P): New.
4734 (duplicate_decls): Handle gnu_inline. Merge attributes and
4735 some flags in overriding definitions.
4736 (redeclaration_error_message): Handle gnu_inline.
4737 (start_preparsed_function): Likewise.
4739 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4741 * call.c (sufficient_parms_p): Constify.
4742 * class.c (same_signature_p): Likewise.
4743 * cp-gimplify.c (is_invisiref_parm,
4744 cxx_omp_privatize_by_reference): Likewise.
4745 * cp-objcp-common.c (has_c_linkage): Likewise.
4746 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4747 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4748 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4749 num_artificial_parms_for, comp_template_parms,
4750 template_parameter_pack_p, any_dependent_template_arguments_p,
4751 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4752 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4753 zero_init_p, member_p, cp_lvalue_kind,
4754 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4755 varargs_function_p, is_dummy_object, special_function_kind,
4756 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4757 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4758 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4759 cp_has_mutable_p, at_least_as_qualified_p,
4760 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4761 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4762 * except.c (nothrow_libfn_p): Likewise.
4763 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4765 * pt.c (comp_template_parms, template_parameter_pack_p,
4766 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4767 any_dependent_template_arguments_p): Likewise.
4768 * repo.c (repo_export_class_p): Likewise.
4769 * semantics.c (anon_aggr_type_p): Likewise.
4770 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4771 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4772 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4773 zero_init_p, special_function_p): Likewise.
4774 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4775 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4776 compparms, invalid_nonstatic_memfn_p,
4777 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4778 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4779 cp_has_mutable_p, lvalue_or_else): Likewise.
4781 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4783 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4784 * cp-objcp-common.c (cp_tree_size): Ditto.
4785 * tree.c (cp_walk_subtrees): Ditto
4786 * cp-tree.def (TINST_LEVEL): Go away.
4787 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4788 move together with other non-tree structs.
4789 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4790 (union lang_tree_node): Eliminate tinst_level field.
4791 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4792 (current_instantiation, outermost_tinst_level): Return
4793 a "struct tinst_level *".
4795 * error.c (print_instantiation_partial_context): Change second
4796 parameter to a "struct tinst_level *". Replace accessor macros
4798 (print_instantiation_full_context): Likewise.
4799 * lex.c (in_main_input_context): Likewise.
4801 * pt.c (struct pending_templates): New.
4802 (pending_templates, last_pending_template): Use it as a type.
4803 (current_tinst_level): Change typo to "struct tinst_level *"
4804 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4805 (add_pending_template): Construct a "struct pending_template".
4806 Replace TINST_LEVEL accessor macros with field access.
4807 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4808 (pop_tinst_level): Likewise.
4809 (instantiate_pending_templates): Likewise. Factor common code used
4810 when an instantiation has been done.
4811 (outermost_tinst_level): Replace tree_last with loop.
4812 (current_instantiation): Return a "struct tinst_level *".
4814 2007-08-24 Ollie Wild <aaw@google.com>
4816 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4817 * name-lookup.h (cp_binding_level): Remove vtables member.
4819 2007-08-24 Richard Guenther <rguenther@suse.de>
4821 * tree.c (cp_cannot_inline_tree_fn): Remove.
4822 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4823 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4826 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4829 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4830 error_mark_node right away if build_expr_type_conversion
4834 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4835 is error_mark_node rather than NULL_TREE.
4836 * pt.c (check_explicit_specialization): Likewise.
4839 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4840 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4842 2007-08-22 Jason Merrill <jason@redhat.com>
4845 * pt.c (outermost_tinst_level): New function.
4846 * lex.c (in_main_input_context): New function.
4847 * cp-tree.h: Declare it.
4848 * decl2.c (constrain_class_visibility): Use it to avoid warning
4849 about uses of the anonymous namespace in the main input file.
4851 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4853 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4855 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4858 * class.c (finish_struct_1): Warn when a class has virtual
4859 functions and accessible non-virtual destructor.
4861 2007-08-20 Richard Guenther <rguenther@suse.de>
4865 * call.c (build_new_method_call): Convert initializer to
4867 * init.c (build_aggr_init): Do not fiddle with types.
4868 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4869 * except.c (build_throw): Do not drop qualifiers for the
4871 * typeck.c (get_member_function_from_ptrfunc): Do not
4872 fiddle with types, instead convert.
4873 (build_ptrmemfunc1): Convert to the target type for
4875 (gfc_trans_allocate): Convert result to target type.
4876 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4877 pointer-to-member structures shall have alias set zero as well.
4879 2007-08-20 Richard Guenther <rguenther@suse.de>
4881 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4883 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4884 (nonstatic_local_decl_p): Likewise.
4885 * tree.c (cp_auto_var_in_fn_p): Remove.
4886 * decl.c (nonstatic_local_decl_p): Remove.
4888 2007-08-20 Richard Guenther <rguenther@suse.de>
4890 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4892 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4893 cp_walk_subtrees lh parameter.
4894 (cp_walk_tree_without_duplicates): New define to
4895 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4896 * tree.c (count_trees): Call
4897 cp_walk_tree_without_duplicates.
4898 (verify_stmt_tree): Call cp_walk_tree.
4899 (break_out_target_exprs): Likewise.
4900 (WALK_SUBTREE): Likewise.
4901 * cp-gimplify.c (cp_genericize): Likewise.
4902 * cp-pt.c (find_parameter_packs_r): Likewise.
4903 (uses_parameter_packs): Likewise.
4904 (make_pack_expansion): Likewise.
4905 (check_for_bare_parameter_packs): Likewise.
4906 (for_each_template_parm): Likewise.
4907 * decl.c (check_default_argument): Call
4908 cp_walk_tree_without_duplicates.
4909 * except.c (build_throw): Likewise.
4910 * decl2.c (type_visibility): Likewise.
4911 * semantics.c (expand_or_defer_fn): Likewise.
4912 (finalize_nrv): Call cp_walk_tree.
4914 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4917 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4918 Initialize it with save_expr rather than get_temp_regvar.
4920 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4923 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4926 2007-08-17 Ollie Wild <aaw@google.com>
4929 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4930 declarations into appropriate slots for comparison. Fix type
4933 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4936 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4937 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4939 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4942 * parser.c (cp_parser_class_head): Improve error message.
4944 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4946 * pt.c (instantiate_decl): Set input_location
4947 for the function end.
4949 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4951 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4953 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4954 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4955 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4956 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4957 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4958 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4959 * typeck.c (cp_type_quals): Likewise.
4960 * typeck2.c (cxx_incomplete_type_diagnostic,
4961 cxx_incomplete_type_error): Likewise.
4963 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4966 * pt.c (tsubst_friend_function): When check_classfn
4967 returns error_mark_node likewise return it.
4969 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4972 * typeck.c (check_return_expr): Don't NRV optimize vars in
4974 * decl.c (finish_function): Comment fix.
4976 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4979 * pt.c (push_template_decl_real): Depending on TYPE_P
4980 use either TYPE_CONTEXT or DECL_CONTEXT.
4982 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4984 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4985 constructors and destructors return this.
4987 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4990 * decl2.c (check_classfn): Return error_mark_node in case of error;
4991 in that case, do not call add_method.
4992 * decl.c (start_decl): Deal with check_classfn returning
4994 (grokfndecl): Likewise.
4995 * pt.c (tsubst_friend_function): Likewise.
4997 2007-08-14 Andrew Pinski <pinskia@gmail.com>
5000 * typeck.c (build_binary_op): Disallow vector float types with
5001 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
5003 2007-08-11 Ian Lance Taylor <iant@google.com>
5005 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
5007 * cp-tree.h (cxx_get_alias_set): Update declaration.
5009 2007-08-10 Ollie Wild <aaw@google.com>
5011 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
5013 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
5015 (unqualified_namespace_lookup): Fix ambiguous_decl call.
5016 (lookup_using_namespace): Fix ambiguous_decl call.
5017 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
5019 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5021 * call.c (name_as_c_string): Use CONST_CAST.
5022 * decl.c (build_decl): Likewise.
5023 * parser.c (cp_parser_string_literal): Likewise.
5025 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5028 * error.c (dump_expr): Consistently use the *_cxx_*
5029 variants of the pretty-print functions.
5031 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5034 * decl.c (check_special_function_return_type): Just error
5035 on return type specified for conversion operator.
5037 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
5039 * typeck2.c (readonly_error): Handle general expressions.
5040 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
5042 2007-08-06 Dan Hipschman <dsh@google.com>
5044 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
5045 access function name.
5047 2007-08-04 Alfred Minarik <a.minarik@aon.at>
5050 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
5051 * g++spec.c (lang_specific_driver): Check them.
5053 2007-08-06 Paolo Carlini <pcarlini@suse.de>
5056 * pt.c (inline_needs_template_parms): Fix comment; change return type
5059 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
5062 2007-03-26 Dirk Mueller <dmueller@suse.de>
5064 * parser.c (cp_parser_member_declaration): Pedwarn
5065 about stray semicolons after member declarations.
5067 2007-08-02 Lee Millward <lee.millward@gmail.com>
5072 * parser.c (cp_parser_asm_definition): Detect and discard asm
5073 statements with invalid inputs or outputs.
5074 (cp_parser_asm_operand_list): Return error mark node if any
5075 of the operands are invalid. Adjust documentation.
5077 2007-08-02 Nick Clifton <nickc@redhat.com>
5079 * typeck.c: Change copyright header to refer to version 3 of the
5080 GNU General Public License and to point readers at the COPYING3
5081 file and the FSF's license web page.
5082 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5083 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5084 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5085 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5086 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5087 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5088 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5089 name-lookup.h, parser.c: Likewise.
5091 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5094 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5096 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5099 * semantics.c (finish_label_stmt): Reject the __label__
5100 extension outside function scopes.
5102 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5104 * parser.c (eof_token): Un-constify.
5105 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5106 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5109 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5111 * pt.c, tree.c, typeck2.c: Fix comment typos.
5113 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5114 Mark Mitchell <mark@codesourcery.com>
5117 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5118 hidden due to friend declarations in local classes.
5120 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5122 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5123 * cp-tree.def (DECLTYPE_TYPE): New.
5124 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5125 (dump_type_prefix): Ditto.
5126 (dump_type_suffix): Ditto.
5127 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5128 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5129 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5131 (DECLTYPE_TYPE_EXPR): New.
5132 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5133 (finish_declared_type): Declare.
5134 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5135 DECLTYPE_TYPE nodes.
5136 (pp_cxx_type_id): Ditto.
5137 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5138 (tsubst): Substitute into a DECLTYPE_TYPE node.
5139 (tsubst_copy): Ditto.
5140 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5142 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5143 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5144 structural equality (because we can't hash the expressions).
5145 (finish_declared_type): New.
5146 * lex.c (reswords): Add "decltype" keyword.
5147 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5148 (cp_parser_postfix_expression): Add member_access_only_p to
5149 restrict postfix expression to member access expressions.
5150 (cp_parser_unary_expression): Update call to
5151 cp_parser_postfix_expression to reflect new parameter.
5152 (cp_parser_declared_type): New.
5153 (cp_parser_simple_type_specifier): Parse decltype types.
5155 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5158 * call.c (convert_for_arg_passing): Only widen bitfields to their
5159 declared types if necessary.
5161 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5163 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5166 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5168 * decl.c (typename_hash, typename_compare): Constify.
5169 * mangle.c (hash_type, compare_type): Likewise.
5170 * pt.c (eq_local_specializations, hash_local_specialization):
5172 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5173 list_hash): Likewise.
5174 * typeck2.c (pat_compare): Likewise.
5176 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5178 * method.c (implicitly_declare_fn): Increase alignment if member
5179 function pointer format requires it.
5181 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5184 * typeck.c (check_return_expr): Do not pass a null argument
5187 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5190 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5193 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5196 * typeck.c (convert_arguments): Only use default args if we have
5200 * typeck.c (structural_comptypes): No need to check
5201 resolve_typename_type return value here.
5202 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5203 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5204 original type rather than error_mark_node in case of failure.
5205 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5206 resolve_typename_type result check.
5207 (cp_parser_direct_declarator, cp_parser_head,
5208 cp_parser_constructor_declarator_p): Likewise.
5210 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5212 * pt.c (template_parms_variadic_p): Remove.
5213 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5215 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5218 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5219 argument to dump_aggr_init_expr_args instead of false.
5221 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5223 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5224 canonical types; otherwise, fall back to structural type
5225 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5226 internal compiler error if the canonical types are wrong.
5228 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5231 * parser.c (cp_parser_make_indirect_declarator): When the
5232 the code argument is ERROR_MARK return cp_error_declarator.
5234 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5237 * decl.c (cxx_init_decl_processing): Don't set
5238 force_align_functions_log.
5239 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5240 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5241 FUNCTION_DECL, return its alignment.
5243 2007-07-09 Richard Guenther <rguenther@suse.de>
5245 * decl.c (start_preparsed_function): Do not promote return type.
5247 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5250 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5252 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5255 * pt.c (resolve_overloaded_unification): Robustify. Return a
5257 (type_unification_real): Adjust accordingly.
5259 2007-07-06 Richard Guenther <rguenther@suse.de>
5261 * init.c (build_new_1): Use the correct pointer type.
5262 * typeck2.c (build_m_component_ref): Likewise.
5264 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5267 * init.c (build_zero_init): Always build an initializer for
5269 * typeck2.c (build_functional_cast): Use build_zero_init.
5272 * init.c (build_new_1): Always pass the allocation function to
5273 build_op_delete_call.
5274 * call.c (build_op_delete_call): Handle operator delete with a
5275 variable-argument list. Do not issue an error when no matching
5276 deallocation function is available for a new operator.
5279 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5280 * decl.c (value_dependent_init_p): New function.
5281 (cp_finish_decl): Use it.
5282 * pt.c (value_dependent_expression_p): Use
5283 any_value_dependent_elements_p.
5284 * parser.c (cp_parser_primary_expression): Add comment about
5285 treating dependent qualified names as integral
5286 constant-expressions.
5288 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5290 * decl.c (build_ptrmemfunc_type): Always use structural equality
5291 tests when comparing pointer-to-member-function types, because the
5292 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5295 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5297 * init.c (build_new): Tweak comment.
5299 2007-06-29 Dave Brolley <brolley@redhat.com>
5302 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5303 type to its base type and number of elements here.
5304 * init.c (build_new): Call complete_type_or_else to ensure that the
5305 type is complete and to issue a diagnostic if it is not.
5306 (build_new_1): Don't call complete_type_or_else here.
5308 2007-07-03 Richard Guenther <rguenther@suse.de>
5311 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5314 2007-07-02 Simon Baldwin <simonb@google.com>
5316 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5317 for inner-style nested forward declarations that don't declare
5320 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5323 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5324 DECL_P in not a variable and appears more than once error messages.
5326 2007-07-01 Ollie Wild <aaw@google.com>
5328 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5329 (select_decl): Remove function.
5330 (unqualified_namespace_lookup): Populate binding by calling
5331 ambiguous_decl. Remove select_decl call.
5332 (lookup_qualified_name): Remove select_decl call.
5333 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5334 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5335 generation when name lookup is ambiguous.
5337 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5340 * init.c (build_new_1): Use structural equality on the copy of the
5343 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5345 * decl2.c (determine_visibility): Implement
5346 flag_visibility_ms_compat effect on type info.
5347 * decl.c (cxx_init_decl_processing): Implement
5348 global effect of flag_visibility_ms_compat.
5350 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5352 * decl2.c (start_objects): Mark constructor-running function
5355 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5358 * decl.c (grokdeclarator): Reset friendp for member functions declared
5359 friend of their own class.
5361 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5363 * decl2.c (determine_visibility): Don't look for dllexport here.
5364 (determine_visibility_from_class): Tidy.
5366 2007-06-18 Simon Baldwin <simonb@google.com>
5369 * parser.c (cp_parser_single_declaration): Added check for storage
5370 class other than sc_none in parsed declaration, and a flag to indicate
5371 if the call is part of an explicit template specialization parse.
5372 * (cp_parser_explicit_specialization): Specialization check flag added
5373 to call to cp_parser_single_declaration(), set true.
5374 * (cp_parser_template_declaration_after_export): Specialization check
5375 flag added to call to cp_parser_single_declaration(), set false.
5376 * pt.c (check_explicit_specialization): Added code to copy visiblity
5377 and linkage from the templated function to the explicit specialization.
5379 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5381 * typeck.c (build_binary_op): For templates build the
5382 expression in pieces to avoid the assert in build2_stat.
5383 (get_member_function_from_ptrfunc):
5384 Change over to using POINTER_PLUS_EXPR and convert
5385 the second operand to sizetype.
5386 * typeck2.c (build_m_component_ref): Likewise.
5387 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5388 instead of PLUS_EXPR for pointers.
5389 (build_new_1): Likewise.
5390 (build_vec_delete_1): Likewise.
5391 (build_vec_delete): Likewise.
5392 * class.c (build_base_path): Likewise.
5393 (build_base_path): Likewise.
5394 (convert_to_base_statically): Likewise.
5395 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5396 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5397 instead of PLUS_EXPR.
5398 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5399 instead of PLUS_EXPR for pointers.
5400 * call.c (build_special_member_call): Likewise.
5401 * rtti.c (build_headof): Likewise.
5402 Use sizetype instead of ptrdiff_type_node.
5403 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5404 instead of PLUS_EXPR for pointers.
5405 * except.c (expand_start_catch_block): Do a
5406 NEGATIVE and then a POINTER_PLUS_EXPR instead
5408 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5409 PLUS_EXPR on pointer types over to use
5410 POINTER_PLUS_EXPR and remove the conversion
5411 to the pointer types.
5412 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5413 adding to a pointer type. Use size_int instead of
5414 ssize_int. Convert the index to sizetype before
5415 adding it to the pointer.
5417 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5419 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5420 (DECL_ANON_UNION_VAR_P): New macro.
5421 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5422 than DECL_VAR_MARKED_P, to keep track of which variables we have
5424 * decl.c (redeclaration_error_message): Complain about redeclaring
5425 anonymous union members at namespace scope.
5426 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5428 2007-06-14 Geoff Keating <geoffk@apple.com>
5430 * decl2.c (determine_visibility): Ensure that functions with
5431 hidden types as parameters are hidden.
5434 * decl2.c (determine_visibility): Remove duplicate code for
5437 2007-06-12 Ian Lance Taylor <iant@google.com>
5440 * init.c (avoid_placement_new_aliasing): New static function.
5441 (build_new_1): Call it.
5443 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5445 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5446 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5448 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5451 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5452 on init, the non-decl cond operand and increment value.
5454 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5457 * decl.c (check_initializer): Report an error when a brace enclosed
5458 initializer is used for a non-aggregate type in C++98.
5459 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5461 (grokdeclarator): Likewise.
5462 (move_fn_p): Likewise.
5463 * typeck.c (check_return_expr): Likewise.
5464 * call.c (reference_binding): Likewise.
5465 * error.c (cp_cpp_error): Likewise.
5466 * pt.c (check_default_tmpl_args): Likewise.
5468 * lex.c (init_reswords): Likewise.
5469 * parser.c (p_parser_primary_expression): Likewise.
5470 (TOKEN_PRECEDENCE): Likewise.
5471 (cp_parser_init_declarator): Likewise.
5472 (cp_parser_ptr_operator): Likewise.
5473 (cp_parser_parameter_declaration): Likewise.
5474 (cp_parser_enclosed_template_argument_list): Likewise.
5475 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5476 (cp_parser_next_token_ends_template_argument_p): Likewise.
5478 2007-06-04 Simon Baldwin <simonb@google.com>
5480 * decl.c (grokdeclarator): Readability change. Moved case labels
5481 into direct switch statement scope.
5483 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5485 * call.c (convert_like_real): Remove pointless code.
5487 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5489 * decl.c (get_atexit_fn_ptr_type): New function.
5490 (get_atexit_node): Use it.
5491 (start_cleanup_fn): Likewise.
5492 (register_dtor_fn): Use the object's destructor, instead of a
5493 separate cleanup function, where possible.
5494 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5495 (atexit_fn_ptr_type_node): New macro.
5496 * decl2.c (build_cleanup): Use build_address.
5498 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5500 * typeck.c (build_binary_op): Include types in error.
5502 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5505 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5506 needs runtime initialization.
5508 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5511 * semantics.c (finish_trait_expr): Complete the types.
5513 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5514 Douglas Gregor <doug.gregor@gmail.com>
5515 Pedro Lamarao <pedro.lamarao@mndfck.org>
5516 Howard Hinnant <howard.hinnant@gmail.com>
5520 * typeck.c (comptypes): Don't consider rvalue and lvalue
5521 reference types to be equivalent.
5522 (check_return_expr): Move from certain lvalues when returning
5524 * decl.c (grokdeclarator): Implement reference collapsing.
5525 (copy_fn_p): Don't consider constructors taking rvalue references
5526 to be copy constructors.
5528 * call.c (conversion): New "rvaluedness_matches_p" member.
5529 (convert_class_to_reference): Require reference type as first
5530 parameter instead of base type.
5531 (reference_binding): Add logic to handle rvalue references.
5532 (implicit_conversion): Update inaccurate comment.
5533 (convert_like_real): Disable creation of temporaries that are
5534 impossible to initialize for types with move constructors.
5535 (build_over_call): Elide move constructors when possible.
5536 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5537 (maybe_handle_ref_bind): Return conversion instead of type node.
5538 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5539 determine preferred conversion sequences.
5540 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5541 (LOOKUP_PREFER_RVALUE): New.
5542 (DECL_MOVE_CONSTRUCTOR_P): New.
5543 (struct cp_declarator): Add "reference" member for reference
5544 types, with new "rvalue_ref" flag.
5545 (cp_build_reference_type): Declare.
5546 (move_fn_p): Declare.
5547 * error.c (dump_type_prefix): Format rvalue reference types
5548 correctly in error messages.
5549 * except.c (build_throw): Move from certain lvalues when
5551 * mangle.c (write_type): Mangle rvalue references differently
5552 than regular references.
5553 * parser.c (make_reference_declarator): Add boolean parameter for
5555 (cp_parser_make_indirect_declarator): New.
5556 (cp_parser_new_declarator_opt): Call
5557 cp_parser_make_indirect_declarator.
5558 (cp_parser_conversion_declarator_opt): Ditto.
5559 (cp_parser_declarator): Ditto.
5560 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5562 * pt.c (tsubst): Implement reference collapsing.
5563 (maybe_adjust_types_for_deduction): Implement special template
5564 parameter deduction rule for rvalue references.
5565 (type_unification_real): Update calls to
5566 maybe_adjust_types_for_deduction.
5567 (try_one_overload): Ditto.
5568 (unify_pack_expansion): Ditto.
5569 * tree.c (lvalue_p_1): Handle rvalue reference types.
5570 (cp_build_reference_type): New.
5572 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5575 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5576 variables that need runtime initialization.
5578 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5581 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5582 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5583 case POSTDECREMENT_EXPR>): Return the error_mark_node
5584 if either the real or imaginary parts would an
5587 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5588 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5591 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5592 token is a closing brace, false if there are no tokens left.
5593 (cp_parser_namespace_alias_definition): Only consume the next token if
5594 it is a closing brace.
5596 * parser.c (cp_parser_class_specifier): Likewise.
5598 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5600 * semantics.c (finish_member_declaration): Fix a typo in the
5603 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5615 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5616 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5617 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5618 whether everything was okay. Fix indentation.
5619 (push_template_decl_real): Check for bare parameter packs in
5620 function parameters; where errors occur, mark the parameter types
5621 with ERROR_MARK_NODEs to avert ICEs.
5622 (coerce_template_parameter_pack): New.
5623 (coerce_template_parms): Moved parameter pack coercion into
5624 coerce_template_parameter_pack, and permit it anywhere in the
5625 template parameter list (not just at the end). Parameter and
5626 argument indices can vary (somewhat) separately now, so add
5627 PARM_IDX and ARG_IDX.
5628 (fn_type_unification): Don't set an argument pack as incomplete if
5629 no argument pack was deduced.
5630 (type_unification_real): If a type parameter is a parameter pack
5631 and has not otherwise been deduced, it will be deduced to an empty
5633 (more_specialized_fn): Use the actual lengths of the argument
5634 lists when comparing against expansions.
5635 * semantics.c (finish_member_declaration): If a field's type has
5636 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5638 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5641 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5643 2007-05-22 Ollie Wild <aaw@google.com>
5645 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5646 (unqualified_namespace_lookup): Adds check for hidden types.
5648 2007-05-22 Ollie Wild <aaw@google.com>
5650 * decl.c (duplicate_decls): Verify namespace names are unique.
5652 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5654 * decl.c (cxx_maybe_build_cleanup): Handle
5655 __attribute__((cleanup)).
5657 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5659 * cvt.c (cp_convert_and_check): Don't check warnings if the
5662 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5664 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5666 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5669 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5670 type only if is a class type (5.2.8/4).
5672 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5674 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5675 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5676 c_common_unsigned_type.
5678 2007-05-11 Silvius Rus <rus@google.com>
5680 * typeck.c (build_indirect_ref): Add call to
5681 strict_aliasing_warning.
5682 (build_reinterpret_cast_1): Condition call to
5683 strict_aliasing_warning.
5685 2007-05-11 Jan Hubicka <jh@suse.cz>
5687 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5688 * decl2.c (start_objects): ctors and dtors are no longer public.
5689 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5691 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5693 * typeck.c (build_unary_op): Remove code that used to
5694 handle non lvalue increments/decrements.
5696 2007-05-07 Mike Stump <mrs@apple.com>
5698 * parser.c (check_empty_body): Add.
5699 (cp_parser_iteration_statement): Add call to check_empty_body.
5701 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5704 * mangle.c (write_mangled_name): Mangle static variable names.
5705 (write_unqualified_name): Use local-source-name for
5706 namespace-scope static variables.
5708 2007-05-04 Dirk Mueller <dmueller@suse.de>
5710 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5713 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5716 * decl2.c (constrain_class_visibility):
5717 Use strip_pointer_or_array_types instead of strip_array_types.
5719 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5722 * decl.c (reshape_init_r): Don't reshape the first element if it
5723 is a pointer to member function.
5725 2007-04-27 Simon Baldwin <simonb@google.com>
5727 * decl.c (grokparms): Changed message format from %qD to %qE.
5729 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5731 * error.c (maybe_warn_variadic_templates): Variadic templates are
5732 now in C++0x, so only warn about them in C++98 mode.
5734 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5737 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5738 integeral types from vectors types.
5740 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5743 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5744 for type dependent OMP_CLAUSE_DECLs.
5746 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5749 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5750 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5751 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5752 * init.c (build_zero_init): Adjust, as
5753 COMPLEX_TYPE is now a SCALAR_TYPE.
5754 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5755 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5757 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5759 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5760 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5761 (trait_expr_value): Adjust.
5763 2007-04-23 Simon Baldwin <simonb@google.com>
5765 * decl.c (grokparms): Added new error for duplicate function
5766 parameters names in function prototypes, to match gcc behavior.
5768 2007-04-23 Jan Hubicka <jh@suse.cz>
5770 * decl2.c (finish_objects): Do not call target constructor/destructor
5773 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5775 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5776 instead of checking GIMPLE_STMT_P in chain_next.
5778 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5781 * call.c (convert_for_arg_passing): Convert bitfields to their
5784 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5787 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5789 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5792 * decl2.c (constrain_class_visibility):
5793 Do not warn about the use of anonymous namespace in the main input file.
5795 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5797 * cp-tree.h (current_template_parms): Fix typo in comment.
5799 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5801 * cp-tree.h, error.c: Fix comment typos.
5803 2007-04-13 Jason Merrill <jason@redhat.com>
5806 * call.c (reference_binding): Add c_cast_p parm. If true,
5807 add quals to TO as needed to make it reference-compatible.
5809 2007-04-11 Jan Hubicka <jh@suse.cz>
5811 * class.c (convert_to_base_statically): Fold produced tree; verify
5812 that we are not processing template_decl.
5814 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5817 * class.c (build_base_path): Ensure that the converted pointer has
5818 the same cv-qualification as the input.
5820 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5822 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5824 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5826 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5828 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5829 * tree.c (cp_add_pending_fn_decls): Remove.
5830 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5832 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5834 Revert change removing staticp.
5836 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5838 * cp-objcp-common.c (cxx_staticp): Remove.
5839 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5840 * cp-tree.h (cxx_staticp):
5842 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5844 * class.c (check_for_override): Don't remove dllmport attribute
5847 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5850 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5851 type issue error and return early.
5853 2007-03-30 Jason Merrill <jason@redhat.com>
5856 * typeck.c (cp_type_readonly): New fn.
5857 * cp-tree.h: Declare it.
5858 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5859 (cp_finish_decl): Not here.
5861 2007-03-31 Richard Guenther <rguenther@suse.de>
5863 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5866 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5871 * parser.c (declarator_can_be_parameter_pack): New.
5872 (cp_parser_template_parameter): Only parse the `...' if the
5873 declarator can be a parameter pack.
5874 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5876 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5877 types (they could be used as array bounds).
5878 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5879 (tsubst_pack_expansion): Handle failure to expand parameter
5882 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5885 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5886 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5887 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5888 (CLASS_TYPE_NON_UNION_P): Add.
5889 (struct lang_type_class): Add has_complex_dflt.
5890 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5891 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5892 * cp-tree.def: Add TRAIT_EXPR.
5893 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5894 * lex.c (struct resword): Add __has_nothrow_assign,
5895 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5896 __has_trivial_constructor, __has_trivial_copy,
5897 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5898 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5899 __is_pod, __is_polymorphic, __is_union.
5900 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5901 (cp_parser_trait_expr): New.
5902 * semantics.c (finish_trait_expr, trait_expr_value
5903 classtype_has_nothrow_copy_or_assign_p): New.
5904 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5906 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5907 * class.c (check_bases, check_field_decl, check_bases_and_members):
5908 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5909 * pt.c (uses_template_parms, tsubst_copy_and_build,
5910 value_dependent_expression_p, type_dependent_expression_p): Deal with
5912 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5914 2007-03-29 Richard Guenther <rguenther@suse.de>
5916 * tree.c (cp_walk_subtrees): Do not set input_location.
5918 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5921 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5924 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5926 * parser.c (struct cp_parser): Update comment for
5927 greater_than_is_operator_p.
5928 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5929 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5930 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5931 !GREATER_THAN_IS_OPERATOR_P.
5932 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5933 `>>' operators that will become two `>' tokens in C++0x.
5934 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5935 mode, allowing it to terminate default arguments.
5936 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5937 `>>' like two consecutive `>' tokens.
5938 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5939 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5940 ends a template argument.
5942 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5944 * decl.c (redeclaration_error_message): Complain when redeclaring
5945 a friend function with default template arguments (C++0x mode only).
5946 * cp-tree.h (check_default_tmpl_args): Declare.
5947 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5948 template arguments in function templates. Add support for checking
5949 the default template arguments of friend templates.
5950 (push_template_decl_real): Fix call to check_default_tmpl_args.
5951 (type_unification_real): If a template parameter has not been
5952 deduced but provides a default template argument, substitute into
5953 that default template argument.
5954 * parser.c (cp_parser_init_declarator): When declaring (but not
5955 defining!) a function template in C++0x mode, check for default
5958 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5961 * decl.c (grokdeclarator): Deal with cv-qualified function type
5962 typedefs in the same way for member and non-member functions.
5964 2007-03-26 Dirk Mueller <dmueller@suse.de>
5966 * parser.c (cp_parser_member_declaration): Pedwarn
5967 about stray semicolons after member declarations.
5969 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5972 * pt.c (instantiate_decl): Set in_system_header.
5974 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5976 * cp-tree.h (current_tempalte_parms): Improve documentation.
5977 * pt.c (current_template_args): Likewise.
5980 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5981 not consume tokens when failing.
5983 2007-03-22 Jim Wilson <wilson@specifix.com>
5984 Mark Mitchell <mark@codesourcery.com>
5987 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5988 consistent with FROM.
5990 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5992 * error.c (dump_expr): Handle dependent names that designate types.
5993 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5995 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5997 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5999 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6001 * cvt.c (cp_convert_and_check) : Define.
6002 * cp-tree.h (cp_convert_and_check): Declare.
6003 * call.c (convert_conversion_warnings): Rename to
6004 conversion_null_warnings. The warning for floating-point to
6005 integer is handled by convert_and_check in convert_like_real.
6006 (convert_like_real): convert_conversion_warnings was renamed as
6007 conversion_null_warnings.
6008 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
6009 overflow and changes of value during conversion.
6011 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6014 * parser.c (cp_parser_statement): If 'namespace' is found, this
6015 only can be a namespace alias definition, so parse it now.
6016 (cp_parser_namespace_alias_definition): if we find an open brace
6017 instead of '=', then this is actually a misplaced namespace
6020 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6023 * decl.c (cxx_init_decl_processing): Move command-line options
6024 processing to c-opts.c.
6026 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
6028 * ptree.c (cxx_print_type): Use formatting markup for integers
6029 when printing template parameter index/level/orig level.
6030 (cxx_print_xnode): Ditto.
6031 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
6032 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
6033 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
6035 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
6036 rather than a HOST_WIDE_INT.
6037 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
6038 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
6040 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
6041 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
6042 IN_BASE_INITIALIZER bool bitfields.
6043 (struct cp_declarator): Make KIND a 4-bit field. Make
6044 PARAMETER_PACK_P a bool bitfield just after KIND.
6045 * pt.c (uses_parameter_packs): Destroy the pointer set.
6046 (make_pack_expansion): Ditto.
6047 (check_for_bare_parameter_packs): Ditto.
6048 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
6050 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
6053 * call.c (convert_default_arg): Instead of copying the node,
6056 2007-03-15 Dirk Mueller <dmueller@suse.de>
6059 * call.c (convert_conversion_warnings): New..
6060 (convert_like_real): .. factored out from here.
6061 (convert_conversion_warnings): Add warning about
6062 false being converted to NULL in argument passing.
6064 2007-03-14 Dirk Mueller <dmueller@suse.de>
6066 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6067 (finish_do_body): Warn about empty body in do/while statement.
6069 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6071 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6073 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6076 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6079 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6081 * repo.c (init_repo): Initialize random_seed saved options.
6082 (finish_repo): Adjust.
6084 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6087 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6090 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6092 * decl.c (compute_array_index_type): New warning flag warn_vla.
6094 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6097 * call.c (convert_default_arg): Copy non-constant arguments.
6099 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6102 * parser.c (cp_parser_postfix_expression): Disallow compound
6103 literals in constant expressions.
6106 * semantics.c (finish_typeof): Use unlowered_expr_type.
6108 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6111 * cp-tree.h (unlowered_expr_type): New function.
6112 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6113 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6114 (unlowered_expr_type): New function.
6115 (build_unary_op): Disallow predecrements of bool bitfields.
6116 * call.c (build_conditional_expr): Use unlowered_expr_type.
6117 * pt.c (type_unification_real): Likewise.
6119 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6122 * typeck.c (check_return_expr): Check for bare parameter packs.
6123 (comptypes): Compare template parameter packs and
6124 type pack expansions.
6125 * decl.c (grokdeclarator): Deal with the declaration of function
6127 (grokparms): Verify that the (optional) function parameter pack is
6128 at the end of the parameter list.
6129 (xref_basetypes): Handle pack expansions in the base class.
6130 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6131 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6132 (NONTYPE_ARGUMENT_PACK): New.
6133 (TYPE_PACK_EXPANSION): New.
6134 (EXPR_PACK_EXPANSION): New.
6135 (ARGUMENT_PACK_SELECT): New.
6136 * cp-objcp-common.c (cp_tree_size): Compute size of
6137 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6138 ARGUMENT_PACK_SELECT.
6139 * error.c (dump_template_argument): Print template argument packs.
6140 (dump_template_argument_list): Ditto.
6141 (dump_template_parameter): Dump `...' for template type parameter
6143 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6144 (dump_parameters): Print function parameter packs.
6145 (dump_template_parms): Print template argument packs.
6146 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6147 (maybe_warn_variadic_templates): New.
6148 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6149 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6150 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6152 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6153 (write_template_arg): Write argument packs as separate arguments.
6154 * cp-tree.h (struct template_parm_index_s): Add flag that
6155 indicates that the template parameter is actually a parameter
6157 (struct tree_argument_pack_select): New.
6158 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6159 (union lang_tree_node): Add argument_pack_select.
6160 (FUNCTION_PARAMETER_PACK_P): New.
6161 (PACK_EXPANSION_P): New.
6162 (PACK_EXPANSION_PATTERN): New.
6163 (SET_PACK_EXPANSION_PATTERN): New.
6164 (PACK_EXPANSION_PARAMETER_PACKS): New.
6165 (ARGUMENT_PACK_P): New.
6166 (ARGUMENT_PACK_ARGS): New.
6167 (SET_ARGUMENT_PACK_ARGS): New.
6168 (ARGUMENT_PACK_INCOMPLETE_P): New.
6169 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6170 (TEMPLATE_PARM_PARAMETER_PACK): New.
6171 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6172 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6173 (ARGUMENT_PACK_SELECT_INDEX): New.
6174 (ARGUMENT_PACK_SELECT_ARG): New.
6175 (struct cp_declarator): Add parameter_pack_p flag.
6176 (maybe_warn_variadic_templates): Declare.
6177 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6178 indicate a template parameter pack.
6179 (uses_parameter_packs): Declare.
6180 (template_parameter_pack_p): Declare.
6181 (template_parms_variadic_p): Declare.
6182 (make_pack_expansion): Declare.
6183 (check_for_bare_parameter_packs): Declare.
6184 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6185 sizeof... expressions.
6186 (pp_cxx_expression): Print pack expansions and non-type argument
6188 (pp_cxx_exception_specification): Print pack expansions.
6189 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6190 (pp_cxx_ctor_initializer): Print pack expansions.
6191 (pp_cxx_type_id): Print pack expansions.
6192 (pp_cxx_template_argument_list): Print argument packs.
6193 (pp_cxx_template_parameter): Print ellipsis for template parameter
6195 * pt.c (comp_template_parms): Compare template parameter packs.
6196 (template_parameter_pack_p): New.
6197 (template_parms_variadic_p): New.
6198 (template_args_variadic_p): New.
6199 (make_ith_pack_parameter_name): New.
6200 (struct find_parameter_pack_data): New.
6201 (find_parameter_packs_r): New.
6202 (uses_parameter_packs): New.
6203 (make_pack_expansion): New.
6204 (check_for_bare_parameter_packs): New.
6205 (expand_template_argument_pack): New.
6206 (reduce_template_parm_level): Propagate parameter pack flag.
6207 (process_template_parm): Add is_parameter_pack parameter to state
6208 when the parameter is actually a parameter pack. Create template
6209 parameter packs when is_parameter_pack is true.
6210 (current_template_args): The argument for a template parameter
6211 pack is an argument pack containing a single pack expansion.
6212 (process_partial_specialization): When checking that non-type
6213 argument expressions do not involve template parameters, loop over
6214 the arguments in argument packs separately.
6215 (push_template_decl_real): Check that the type of the declaration
6216 does not have any bare parameter packs. Check that primary
6217 templates have no more than one parameter pack, and that it comes
6218 at the end of the template parameter list.
6219 (convert_template_argument): Handle coercions for pack expansion
6220 expressions by coercing the pattern then rebuilding the expansion.
6221 (coerce_template_parms): When coercing the arguments for a
6222 variadic template, pack "extra" arguments into an argument pack.
6223 (coerce_template_template_parms): Cannot coerce between parameter
6224 packs and non-pack parameters.
6225 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6226 (comp_template_args): Expand all template arguments packs before
6227 comparing template argument lists.
6228 (mangle_class_name_for_template): Make argument packs as separate
6230 (for_each_template_parm_r): No need to handle BASELINK.
6231 (instantiate_class_template): Handle pack expansions in the base
6233 (tsubst_pack_expansion): New.
6234 (tsubst_template_args): Handle substitutions of argument packs and
6235 pack expansion into template argument lists.
6236 (tsubst_decl): Expand function parameter packs into separate
6237 function parameters.
6238 (tsubst_arg_types): Expand a type pack expansion into separate
6240 (tsubst_exception_specification): Handle pack expansions in
6241 exception specifiers.
6242 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6243 replacing a template parameter with its argument. If we encounter
6244 a substitution for an argument pack, just return the parameter
6246 (tsubst_copy): sizeof(X...) returns the number of elements in
6247 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6248 PARM_DECL is a parameter pack.
6249 (tsubst_expr): Expression pack expansions and argument packs
6250 cannot show up here; they will all be handled through function
6251 calls, sizeof, and template argument lists.
6252 (tsubst_copy_and_build): sizeof(X...) returns the number of
6253 elements in parameter pack X. Handle pack expansions in TREE_LIST
6254 and CONSTRUCTOR nodes.
6255 (fn_type_unification): Handle "incomplete" explicit template
6256 argument lists that specify some of the arguments for a template
6258 (type_unification_real): Unify arguments against pack expansions.
6259 (template_parm_level_and_index): New, helper function.
6260 (unify_pack_expansion): New.
6261 (unify): Unify argument packs on an argument-by-argument basis,
6262 handling variadic argument packs as well.
6263 (more_specialized_fn): Handle unification of function parameter
6264 packs. All things being equal, prefer non-variadic function
6265 templates to variadic function templates.
6266 (more_specialized_class): Prefer the variadic class template
6267 partial specialization that binds fewer arguments to a parameter
6269 (regenerate_decl_from_template): Expand function parameter packs
6270 into separate parameters.
6271 (instantiate_decl): Ditto.
6272 (tsubst_initializer_list): Handle pack expansions for base-class
6274 (dependent_type_p_r): Determine dependent types in argument packs
6275 and pack expansions.
6276 (value_dependent_expression_p): Determine value-dependence of
6277 non-type argument packs.
6278 (dependent_template_arg_p): Handle argument packs.
6279 * semantics.c (finish_cond): Check for bare parameter packs.
6280 (finish_expr_stmt): Ditto.
6281 (finish_for_expr): Ditto.
6282 (finish_switch_cond): Ditto.
6283 (finish_mem_initializers): Ditto.
6284 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6286 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6287 * parser.c (make_declarator): Declarator is not an expansion.
6288 (make_pointer_declarator): Transfer parameter pack flag to outer
6290 (make_reference_declarator): Ditto.
6291 (make_ptrmem_declarator): Ditto.
6292 (make_call_declarator): Ditto.
6293 (make_array_declarator): Ditto.
6294 (cp_parser_postfix_expression): Allow pack expansion expressions
6295 in the argument list for a call expression.
6296 (cp_parser_parenthesized_expression_list): Add new parameter
6297 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6298 into separate arguments."
6299 (cp_parser_new_placement): Allow pack expansion expressions.
6300 (cp_parser_new_initializer): Ditto.
6301 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6302 base-class initializer expansion.
6303 (cp_parser_mem_initializer): Ditto.
6304 (cp_parser_template_parameter_list): Keep track of whether the
6305 template parameter is a template parameter pack.
6306 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6307 template parameter pack.
6308 (cp_parser_type_parameter): Ditto.
6309 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6311 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6312 this declarator is a parameter pack.
6313 (cp_parser_parameter_declaration): The ellipsis does not end the
6314 parameter declaration, because it might be a parameter pack. Parse
6315 the ellipsis to indicate a parameter pack.
6316 (cp_parser_initializer): Allow pack expansions.
6317 (cp_parser_initializer_list): Allow ellipsis to create an
6318 initializer expansion.
6319 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6321 (cp_parser_type_id_list): Allow ellipsis to create an exception
6322 specifier expansion.
6323 (cp_parser_attribute_list): Don't allow pack expansions.
6324 (cp_parser_functional_cast): Allow pack expansions.
6325 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6326 compute the length of a parameter pack.
6327 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6328 end a template argument.
6329 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6330 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6333 2007-03-09 Dirk Mueller <dmueller@suse.de>
6335 * call.c (build_new_op): Call warn_logical_operator.
6337 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6340 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6343 * pt.c (any_template_arguments_need_structural_equality_p):
6346 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6348 * decl.c (grokdeclarator): Disable warnings for anonymous
6351 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6353 * typeck2.c (readonly_error): Always emit a hard error.
6354 Remove last argument.
6355 * cp-tree.h (readonly_error): Adjust prototype.
6356 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6357 * typeck.c (build_unary_op): Likewise.
6358 (build_modify_expr): Likewise.
6360 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6363 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6365 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6368 * parser.c (struct cp_parser): New IN_IF_STMT.
6369 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6370 returning if parsing the body of an 'if' statement or issuing an
6371 error and continuing.
6372 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6374 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6376 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6379 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6382 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6384 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6385 Objective-C++. Don't exit early if -shared-libgcc needs to be
6388 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6390 * typeck.c (common_base_type): Delete unused function.
6392 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6394 * Make-lang.in: Add dummy lang.install-pdf target.
6396 2007-03-01 Simon Baldwin <simonb@google.com>
6399 * decl.c (check_tag_decl): Added new warning for typedef ignored
6400 when it precedes an otherwise valid non-typedef declaration.
6402 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6404 * typeck.c (build_function_call): Store converted arguments
6405 in a stack-allocated array instead of building a list.
6406 (convert_arguments): Store arguments in the array passed in as an
6407 argument, and return the actual number of arguments.
6408 * call.c (build_call): Delete, and replace with...
6409 (build_call_n, build_call_a): New.
6410 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6411 (build_over_call): Store converted arguments in a stack-allocated
6412 array instead of building a list.
6413 (build_cxx_call): Pass arguments in an array instead of as a list.
6414 (build_java_interface_fn_ref): Rewrite to avoid constructing
6416 * tree.h: Update declarations to reflect above changes.
6417 * method.c (use_thunk): Use a stack-allocated array to hold
6418 the arguments instead of a list.
6419 * rtti.c (throw_bad_cast): Update call to cxx_call.
6420 (throw_bad_typeid): Likewise.
6421 (build_dynamic_cast_1): Likewise.
6422 * init.c (build_builtin_delete_call): Use build_call_n.
6423 * decl.c (expand_static_init): Likewise.
6424 * except.c (cp_protect_cleanup_actions): Likewise.
6425 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6426 (gimplify_must_not_throw_expr): Likewise.
6427 (cxx_omp_apply_fn): Use build_call_a.
6429 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6431 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6432 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6434 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6436 * cp-tree.h (static_ctors): Remove.
6437 * cp-tree.h (static_dtors): Likewise.
6438 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6439 refactoring of tree_map hierarchy.
6440 (decl_shadowed_for_var_insert): Likewise.
6441 * semantics.c (expand_body): Use c_expand_body.
6442 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6443 * decl2.c (static_ctors): Remove.
6444 (static_dtors): Likewise.
6445 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6446 objc_generate_static_init_call. Do not call static_[cd]tors.
6447 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6449 (cp_write_global_declarations): Likewise.
6451 2007-02-23 Richard Guenther <rguenther@suse.de>
6453 * class.c (note_name_declared_in_class): Make declaration
6454 changes meaning a pedwarn.
6456 2007-02-22 Michael Matz <matz@suse.de>
6459 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6460 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6461 dump_function_decl): Guard emitting outer scopes by new flag.
6462 * cp-lang.c (cxx_dwarf_name): New function.
6463 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6464 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6466 (push_template_decl_real, lookup_template_class): Remove calls
6469 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6471 * call.c (build_new_method_call): Ensure that explicit calls of
6472 destructors have type "void".
6474 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6476 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6477 and -Walways-true with -Waddress.
6478 * cvt.c (convert_to_void): Replace unconditional warning with
6481 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6483 * decl.c, tree.c: Fix comment typos.
6485 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6488 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6489 statement expression if we had an error mark node.
6491 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6492 Brooks Moses <brooks.moses@codesourcery.com>
6493 Lee Millward <lee.millward@codesourcery.com>
6495 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6496 Change class to tcc_vl_exp.
6498 * call.c (build_call): Use build_call_list instead
6500 (build_over_call): Likewise.
6501 (build_new_method_call): Use build_min_non_dep_call_list
6502 instead of build_min_non_dep.
6504 * error.c (dump_call_expr_args): New function.
6505 (dump_aggr_init_expr_args): New function.
6506 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6507 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6509 * cvt.c (convert_to_void): Use build_call_array instead
6510 of build3; use new AGGR_INIT_EXPR accessor macros.
6512 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6513 instead of TREE_CODE_LENGTH.
6515 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6516 AGGR_INIT_EXPR accessor macros.
6518 * cp-gimplify.c (cp_gimplify_init_expr): Use
6519 AGGR_INIT_EXPR_SLOT to set the slot operand.
6521 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6522 (AGGR_INIT_EXPR_SLOT): New macro.
6523 (AGGR_INIT_EXPR_ARG): New macro.
6524 (aggr_init_expr_nargs): New macro.
6525 (AGGR_INIT_EXPR_ARGP): New macro.
6526 (aggr_init_expr_arg_iterator): New.
6527 (init_aggr_init_expr_arg_iterator): New.
6528 (next_aggr_init_expr_arg): New.
6529 (first_aggr_init_expr_arg): New.
6530 (more_aggr_init_expr_args_p): New.
6531 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6532 (stabilize_aggr_init): New declaration.
6533 (build_min_non_dep_call_list): Likewise.
6535 * tree.c (process_aggr_init_operands): New function.
6536 (build_aggr_init_array) New function.
6537 (build_cplus_new): Update to use new CALL_EXPR and
6538 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6539 build_aggr_init_array.
6540 (build_min_non_dep_call_list) New function.
6541 (build_min_nt): Assert input code parameter is not a variable
6542 length expression class.
6543 (build_min, build_min_non_dep): Likewise.
6544 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6545 to check for equality instead of recursing. Handle tcc_vl_exp
6547 (stabilize_call): Update to only handle CALL_EXPRs, not
6548 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6549 (stabilize_aggr_init): New function.
6550 (stabilize_init): Use it.
6552 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6553 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6554 AGGR_INIT_EXPR accessor macros and argument iterators.
6556 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6557 build_vl_exp. Iterate through the operands, recursively
6558 processing each one.
6559 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6560 CALL_EXPR accessor macros.
6561 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6562 tree code classes. Use TREE_OPERAND_LENGTH instead of
6565 * semantics.c (finish_call_expr): Use build_nt_call_list
6566 instead of build_nt.
6567 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6568 accessor macros. Use build_call_array to construct the
6569 CALL_EXPR node instead of build3
6571 * decl2.c (build_offset_ref_call_from_tree): Use
6572 build_nt_call_list and build_min_non_dep_call_list instead
6573 of build_min_nt and build_min_non_dep.
6575 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6576 Use build_nt_call_list instead of build_min_nt.
6578 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6581 * call.c (build_conditional_expr): Improve error message.
6583 2007-02-13 Dirk Mueller <dmueller@suse.de>
6585 * friend.c (do_friend): Annotate warning about friend
6586 declarations in templates with OPT_Wnon_template_friend.
6587 Convert informal message from warning() to inform().
6589 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6590 Mark Mitchell <mark@codesourcery.com>
6593 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6594 instantiations for variables.
6596 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6599 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6600 Check warn_unused_value just once.
6602 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6605 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6606 (fn_type_unificiation): Likewise.
6607 (get_bindings): Likewise.
6609 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6612 * decl.c (finish_function): Use DECL_REPLACEABLE.
6613 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6615 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6617 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6619 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6621 * decl.c (grokvardecl): Don't error if !have_tls.
6622 (grokdeclarator): Likewise.
6623 * parser.c (cp_parser_omp_threadprivate): Likewise.
6625 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6628 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6629 parameters and result decls in omp clauses.
6630 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6633 2007-02-05 Dirk Mueller <dmueller@suse.de>
6636 * parser.c (cp_parser_class_specifier): Always initialize bases.
6638 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6640 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6641 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6642 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6644 * semantics.c (finish_omp_atomic): Store a whole expression node
6645 in operand 1, and integer_zero_node in operand 0, for dependent
6646 OMP_ATOMIC. Rewrite to make flow easier to understand.
6648 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6650 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6652 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6654 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6655 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6657 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6659 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6660 keyword warning to -Wc++0x-compat.
6662 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6664 * decl.c (grokdeclarator): Update documentation.
6666 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6669 * decl.c (grokdeclarator): If __thread is used together with
6670 a storage class other than extern and static, clear thread_p
6671 after issuing diagnostics and fall through to checking the
6674 2007-01-30 Roger Sayle <roger@eyesopen.com>
6676 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6677 calculating the size of an array (to avoid recursive errors).
6679 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6682 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6684 * call.c (convert_like_real): Don't warn when converting to
6687 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6689 * decl.c (pop_label): Replace warning with call to
6690 warn_for_unused_label.
6692 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6695 * semantics.c (finish_pseudo_destructor_expr): Check the
6696 destrutor name by calling check_dtor_name.
6698 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6700 * lex.c (D_CPP0X): Rename.
6702 (reswords): D_CPP0X -> D_CXX0X.
6703 (init_reswords): Ditto.
6704 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6705 of C++0x keywords as identifiers.
6707 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6710 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6713 2007-01-23 Ian Lance Taylor <iant@google.com>
6715 * typeck.c (convert_for_assignment): Only warn about a = b = c
6716 when converting to bool.
6718 2007-01-23 Roger Sayle <roger@eyesopen.com>
6720 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6722 * typeck.c (ignore_overflows): Remove the remaining uses of
6723 TREE_CONSTANT_OVERFLOW.
6725 2007-01-20 Jan Hubicka <jh@suse.cz>
6727 * decl2.c (start_objects, start_static_storage_duration_function):
6728 Do not make the functions uninlinable.
6730 2007-01-17 Ian Lance Taylor <iant@google.com>
6732 * class.c (add_method): Call VEC_reserve_exact rather than passing
6733 a negative size to VEC_reserve.
6735 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6738 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6740 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6743 * decl.c (make_typename_type): If the qualified name is not a
6744 type, issue an error.
6745 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6748 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6750 * rtti.c: Include target.h.
6751 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6752 don't emit typeinfo for fundamental types as weak.
6753 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6755 2007-01-08 Richard Guenther <rguenther@suse.de>
6757 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6759 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6761 * call.c (standard_conversion): Pass flag to
6762 vector_types_convertible_p to disallow emission of note.
6763 * typeck.c (convert_for_assignment): Pass flag to
6764 vector_types_convertible_p to allow emission of note.
6765 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6766 to disallow emission of note.
6768 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6771 * typeck.c (build_binary_op): Call overflow_warning if
6772 TREE_OVERFLOW_P is true for the result and not for any of the
6775 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6778 * class.c (add_method): Don't wait until template
6779 instantiation time to complain about duplicate methods.
6781 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6784 * semantics.c (finish_unary_op_expr): Warn only if result
6785 overflowed and operands did not.
6787 2007-01-05 Ian Lance Taylor <iant@google.com>
6789 * typeck.c (build_binary_op): Warn about comparing a non-weak
6792 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6794 * pt.c (tsubst): Propagate the need for structural equality checks
6795 when reducing the level of template parameters.
6797 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6799 * pt.c: Fix a comment typo.
6801 2007-01-02 Ian Lance Taylor <iant@google.com>
6803 * semantics.c (maybe_convert_cond): Optionally warn when using an
6804 assignment as a condition.
6805 * typeck.c (convert_for_assignment): Optionally warn about
6806 assigning the result of an assignment to a bool.
6808 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6810 * pt.c (canonical_template_parms): Correct typo in comment.
6812 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6814 * typeck.c (structural_comptypes): Renamed from "comptypes".
6815 (comptypes): Use canonical type information to perform fast type
6816 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6817 canonical type comparison returns the same results as we would see
6818 from the current, structural check. Support COMPARE_STRUCTURAL
6819 when we need structural checks.
6820 * decl.c (typename_compare): Fix comment.
6821 (build_typename_type): TYPENAME_TYPE nodes require structural
6822 equality checks, because they resolve different based on the
6824 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6825 require structural equality checks (for now).
6826 (build_ptrmemfunc_type): Build the canonical pointer to member
6828 (compute_array_index_type): Whenever we build a new index type
6829 to represent the size of an array in a template, we need to mark
6830 this index type as requiring structural equality. This goes for
6831 arrays with value-dependent sizes with the current ABI, or all
6833 * tree.c (cplus_array_hash): New.
6834 (struct cplus_array_info): New.
6835 (cplus_array_compare): New.
6836 (cplus_array_htab): New.
6837 (build_cplus_array_type_1): Use a hash table to cache the array
6838 types we build. Build the canonical array type for each array
6840 (cp_build_qualified_type_real): When building a cv-qualified array
6841 type, use the hash table of array types and build canonical array
6843 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6844 use structural equality (for now).
6845 * cp-tree.h (COMPARE_STRUCTURAL): New.
6846 * pt.c (canonical_template_parms): New.
6847 (canonical_type_parameter): New.
6848 (process_template_parm): Find the canonical type parameter.
6849 (lookup_template_class): When we have named the primary template
6850 type, set the canonical type for our template class to the primary
6851 template type. If any of the template arguments need structural
6852 equality checks, the template class needs structural equality
6854 (tsubst): When reducing the level of a template template
6855 parameter, we require structural equality tests for the resulting
6856 parameter because its template parameters have not had their types
6857 canonicalized. When reducing a template type parameter, find the
6858 canonical reduced type parameter.
6859 (any_template_arguments_need_structural_equality_p): New.