1 2009-02-04 Jakub Jelinek <jakub@redhat.com>
4 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
6 * mangle.c (write_expression): Handle COMPONENT_REF after handling
7 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
8 write_string ("dt") instead of using operators.def.
10 2009-02-03 Jason Merrill <jason@redhat.com>
12 * typeck.c (cp_build_unary_op): Only complain about taking address
15 2009-02-03 Jakub Jelinek <jakub@redhat.com>
18 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
21 * typeck2.c (digest_init_r): Don't call process_init_constructor
24 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
27 * pt.c (convert_nontype_argument_function): Expect expr to be an
31 * typeck.c (merge_types): Call resolve_typename_type if only
32 one type is a typename.
34 2009-02-02 Jason Merrill <jason@redhat.com>
37 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
40 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
43 * parser.c (cp_parser_pure_specifier): If there are no tokens left
44 do not call cp_lexer_consume_token.
46 2009-01-30 Jakub Jelinek <jakub@redhat.com>
49 * parser.c (cp_parser_already_scoped_statement): Handle __label__
52 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
55 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
57 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
60 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
62 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
64 * typeck.c (invalid_nonstatic_memfn_p): Use
65 DECL_NONSTATIC_MEMBER_FUNCTION_P.
67 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
70 * call.c (build_over_call): If convert_for_arg_passing returns
71 error_mark_node unconditionally return it.
73 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
75 * class.c (check_field_decls): Also inherit packed for bitfields
76 regardless of their type.
78 2009-01-22 Dodji Seketeli <dodji@redhat.com>
81 * decl2.c (grokfield): Reverting changes of PR c++/26693
82 (save_template_attributes): Likewise.
83 * decl.c (grokdeclarator): Likewise.
84 * name-lookup.c (pushdecl_maybe_friend): Likewise.
85 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
86 (append_type_to_template_for_access_check): Likewise.
87 * semantics.c (check_accessibility_of_qualified_id): Likewise.
88 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
90 (resolve_type_name_type): Likewise.
91 (append_type_to_template_for_access_check): Likewise.
93 2009-01-21 Dodji Seketeli <dodji@redhat.com>
96 * decl2.c (grokfield): when a typedef appears in a
97 class, create the typedef variant type node for it.
98 (save_template_attributes): Creating typedef variant type node
100 * decl.c (grokdeclarator): If the typedef'ed struct/class was
101 anonymous, set the proper type name to all its type variants.
102 * name-lookup.c (pushdecl_maybe_friend): Reuse the
103 set_underlying_type function to install typedef variant types.
104 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
106 (append_type_to_template_for_access_check): New entry points.
107 * semantics.c (check_accessibility_of_qualified_id):
108 When a typedef that is a member of a class appears in a template,
109 add it to the template. It will be ...
110 * pt.c (instantiate_class_template, instantiate_template ): ... access
111 checked at template instantiation time.
112 (tsubst): Handle the case of being called with NULL args.
113 (resolve_type_name_type): The type name should be the name of the
115 (append_type_to_template_for_access_check): New entry point.
117 2009-01-19 Jason Merrill <jason@redhat.com>
120 * parser.c (cp_parser_unqualified_id): In a template,
122 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
124 2009-01-16 Jason Merrill <jason@redhat.com>
127 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
128 * init.c (build_new): Don't call describable_type unless we
132 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
135 * search.c (protected_accessible_p): N doesn't vary.
137 2009-01-15 Jason Merrill <jason@redhat.com>
140 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
141 accept hidden friends.
143 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
146 * decl.c (grokdeclarator): Check for a non namespace/class context.
148 2009-01-15 Jason Merrill <jason@redhat.com>
152 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
153 a function isn't necessarily an lvalue. Take tree, not const_tree.
154 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
155 * typeck.c (lvalue_or_else): Likewise.
156 * cp-tree.h: Adjust prototypes.
158 2009-01-15 Steve Ellcey <sje@cup.hp.com>
161 * pt.c (tsubst): Check for NULL args.
163 2009-01-15 Dodji Seketeli <dodji@redhat.com>
166 * name-lookup.c (pushtag): Don't create members to types that are not
169 2009-01-14 Nick Clifton <nickc@redhat.com>
172 * parser.c: Pass cp_id_kind computed in
173 cp_parser_postfix_dot_deref_expression to
174 cp_parser_primary_expression.
176 2009-01-13 Jakub Jelinek <jakub@redhat.com>
179 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
180 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
183 2009-01-12 Jason Merrill <jason@redhat.com>
184 Steve Ellcey <sje@cup.hp.com>
187 * name-lookup.c (lookup_name_real): Keep looking past a hidden
190 2009-01-12 Dodji Seketeli <dodji@redhat.com>
193 * pt.c (parameter_of_template_p): New function.
194 * cp-tree.h: Declare it.
195 * name-lookup.c (binding_to_template_parms_of_scope_p): New
197 (outer_binding): Take template parameters in account when looking for
200 2009-01-12 Jason Merrill <jason@redhat.com>
203 * tree.c (pod_type_p): Return 1 for structs created by the back end.
205 2009-01-12 Jakub Jelinek <jakub@redhat.com>
208 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
209 offsetof member-designator, handle it as `[0].'.
212 * decl.c (start_function): If grokdeclarator hasn't returned
213 FUNCTION_DECL nor error_mark_node, issue diagnostics.
215 2009-01-11 Jakub Jelinek <jakub@redhat.com>
218 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
219 (gimplify_if_stmt): ... this.
220 (cp_gimplify_expr): Don't handle IF_STMT here.
221 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
223 2009-01-10 Andrew Pinski <pinskia@gmail.com>
226 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
229 * typeck2.c (build_functional_cast): Check for reference type and NULL
232 2009-01-09 Steve Ellcey <sje@cup.hp.com>
234 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
236 2009-01-09 Jakub Jelinek <jakub@redhat.com>
239 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
241 2009-01-09 John F. Carr <jfc@mit.edu>
244 * parser.c (cp_parser_class_specifier): Clear
245 parser->in_unbraced_linkage_specification_p while parsing class
248 2009-01-07 Jakub Jelinek <jakub@redhat.com>
251 * semantics.c (finish_goto_stmt): Convert destination to
254 2009-01-06 Jason Merrill <jason@redhat.com>
261 * pt.c (check_default_tmpl_args): Don't complain about
262 out-of-order parameter packs in the enclosing class
263 or parameter packs after default args.
264 (coerce_template_parms): If we have more than one
265 parameter pack, don't flatten argument packs.
266 (template_args_equal): Handle argument packs.
267 (comp_template_args): Don't flatten argument packs.
268 (check_instantiated_arg): Split out from...
269 (check_instantiated_args): Here. Handle arg packs.
270 (convert_template_argument): Just check that nontype argument
271 packs have the right type.
273 2009-01-05 Dodji Seketeli <dodji@redhat.com>
276 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
278 2009-01-05 Jason Merrill <jason@redhat.com>
281 * typeck2.c (process_init_constructor_union): Handle union with
284 * mangle.c (write_expression): Remove mangling for zero-operand
288 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
292 * class.c (defaultable_fn_p): Only operator== can be a copy
295 2009-01-02 Jason Merrill <jason@redhat.com>
298 * typeck2.c (process_init_constructor_union): Handle excess
300 (process_init_constructor_record): Likewise.
303 * typeck2.c (digest_init_r): Don't use process_init_constructor
304 for non-aggregate classes.
306 2008-12-31 Jakub Jelinek <jakub@redhat.com>
309 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
310 Return error_mark_node if cp_parser_non_integral_constant_expression
314 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
316 2008-12-29 Jakub Jelinek <jakub@redhat.com>
319 * parser.c (cp_parser_condition): Use cp_parser_require
320 instead of cp_lexer_consume_token to consume =.
323 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
325 2008-12-28 Jakub Jelinek <jakub@redhat.com>
328 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
329 around volatile iteration var in condition and/or increment
332 2008-12-27 Jakub Jelinek <jakub@redhat.com>
335 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
338 2008-12-21 Jason Merrill <jason@redhat.com>
341 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
343 2008-12-20 Jakub Jelinek <jakub@redhat.com>
344 Manuel López-Ibáñez <manu@gcc.gnu.org>
347 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
348 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
351 2008-12-19 Jakub Jelinek <jakub@redhat.com>
354 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
357 2008-12-18 Jakub Jelinek <jakub@redhat.com>
360 * init.c (perform_member_init): For value-initialized
361 references call permerror instead of warning and don't emit any
364 2008-12-18 Jason Merrill <jason@redhat.com>
367 * parser.c (cp_parser_token_starts_cast_expression): An EOF
368 can't start a cast-expression.
370 2008-12-17 Jason Merrill <jason@redhat.com>
372 * semantics.c (describable_type): New function.
373 (finish_decltype_type): Use it for dependent exprs.
374 * cp-tree.h: Declare it.
375 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
376 (write_expression): If skip_evaluation, use type stubs.
377 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
378 declarations of a function.
379 * init.c (build_new): Do auto deduction if type is describable.
380 * decl.c (cp_finish_decl): Likewise.
381 * parser.c (cp_parser_omp_for_loop): Likewise.
383 2008-12-10 Jason Merrill <jason@redhat.com>
386 * mangle.c (write_builtin_type): Add mangling for decimal floating
387 point and fixed point types.
388 (write_type): Pass FIXED_POINT_TYPE along.
390 2008-12-09 Mark Mitchell <mark@codesourcery.com>
393 * class.c (resolve_address_of_overloaded_function): Check
394 accessibility of member functions unless FLAGS indicates
396 * call.c (standard_conversion): Adjust flags passed to
398 (convert_default_arg): Do not perform access checks.
399 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
401 2008-12-08 Steve Ellcey <sje@cup.hp.com>
403 * decl2.c (mark_used): Remove assemble_external call.
405 2008-12-08 Dodji Seketeli <dodji@redhat.com>
408 * name-lookup.c (kept_level_p): Don't forget the case of levels
409 having using directives.
411 2008-12-08 Richard Henderson <rth@redhat.com>
414 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
415 * decl.c (record_unknown_type): Likewise.
416 (start_enum, finish_enum): Likewise.
418 2008-12-05 Jakub Jelinek <jakub@redhat.com>
421 * error.c (dump_expr): Handle BIT_FIELD_REF.
423 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
426 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
429 2008-12-04 Jason Merrill <jason@redhat.com>
432 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
434 * class.c (check_bases_and_members): Rather than assuming any
435 user-declared default constructor is complex here.
437 2008-12-04 Richard Guenther <rguenther@suse.de>
440 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
441 pointer access with TREE_NO_WARNING.
443 2008-12-03 Jason Merrill <jason@redhat.com>
446 * init.c (build_value_init): Do initial zero-initialization
447 of a class with an implicitly-defined constructor using
448 build_zero_init rather than in build_value_init.
449 (build_value_init_1): Fold into build_value_init.
452 * parser.c (cp_parser_conversion_type_id): Diagnose
453 'operator auto' here.
454 * decl.c (grokdeclarator): Not here.
457 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
458 on explicit constructors.
459 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
460 CONSTRUCTOR_IS_DIRECT_INIT.
462 2008-12-02 Jason Merrill <jason@redhat.com>
464 PR c++/35782, c++/37860
465 * call.c (build_user_type_conversion_1): Remember
467 (convert_like_real): Likewise.
468 (build_over_call): Don't require the copy constructor
469 for copy-list-initialization.
470 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
473 * decl.c (cp_finish_decl): Handle =default and =delete for
476 2008-12-01 Jakub Jelinek <jakub@redhat.com>
479 * parser.c (cp_parser_omp_for_loop): Handle auto.
480 * pt.c (tsubst_omp_for_iterator): Likewise.
482 2008-11-28 Jason Merrill <jason@redhat.com>
485 * init.c (perform_member_init): Fix value-initialization.
486 (build_value_init_1): Add assert to catch cases that will break
488 (build_default_init): Remove.
489 * cp-tree.h: Remove its prototype.
490 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
491 value-initialization.
494 * parser.c (cp_parser_class_name): Only call
495 maybe_note_name_used_in_class if we actually found a class name.
497 2008-11-25 Jason Merrill <jason@redhat.com>
500 * decl2.c (check_classfn): Error rather than abort on parameter
503 2008-11-20 Jason Merrill <jason@redhat.com>
506 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
509 * call.c (build_over_call): Take the address of the function even
511 (build_new_method_call): Remember the type of the called function
514 2008-11-19 Dodji Seketeli <dodji@redhat.com>
517 * pt.c (coerce_template_template_parm): Use the more robust
518 uses_template_parms instead of dependent_type_p.
520 2008-11-19 Dodji Seketeli <dodji@redhat.com>
523 * pt.c (lookup_template_class): Check pointers before dereferencing
525 * error.c (dump_template_decl): Likewise.
527 2008-11-19 Jason Merrill <jason@redhat.com>
530 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
531 that names a class for linkage purposes.
534 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
535 name is not a declaration.
538 * pt.c (instantiate_decl): Don't require a definition of
539 a template that is explicitly instantiated 'extern'.
541 2008-11-18 Jason Merrill <jason@redhat.com>
542 Jakub Jelinek <jakub@redhat.com>
545 * parser.c (cp_parser_type_id): Complain about auto.
546 * decl.c (grokdeclarator): Complain about parameters and
547 conversion functions declared with auto.
549 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
551 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
553 2008-11-17 Jakub Jelinek <jakub@redhat.com>
556 * init.c (constant_value_1): Handle TREE_LIST init.
558 2008-11-15 Jakub Jelinek <jakub@redhat.com>
561 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
562 argtype instead of result_type.
564 2008-11-14 Jason Merrill <jason@redhat.com>
567 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
568 for a non-dependent call.
571 * call.c (build_aggr_conv): Increment i.
573 2008-11-13 Jason Merrill <jason@redhat.com>
576 * typeck2.c (process_init_constructor_record): Update bitfield
578 (check_narrowing): Update bitfield handling, print source type.
580 2008-11-12 Jakub Jelinek <jakub@redhat.com>
584 2007-05-07 Mike Stump <mrs@apple.com>
585 * parser.c (check_empty_body): Add.
586 (cp_parser_iteration_statement): Add call to check_empty_body.
588 2008-11-12 Jason Merrill <jason@redhat.com>
591 * typeck.c (cp_build_modify_expr): Update bitfield handling.
593 2008-11-12 Jakub Jelinek <jakub@redhat.com>
596 * parser.c (cp_parser_simple_declaration): Don't commit
597 to tentative parse if parse errors were seen.
600 * error.c (dump_expr): Handle COMPLEX_EXPR.
602 2008-11-10 Jakub Jelinek <jakub@redhat.com>
605 * parser.c (cp_parser_enum_specifier): After parsing :,
606 parse definitely. Don't return early if type specifier
609 2008-11-06 David Edelsohn <edelsohn@gnu.org>
612 * g++spec.c (LIBSTDCXX_STATIC): New.
613 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
616 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
619 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
622 2008-11-05 Richard Guenther <rguenther@suse.de>
625 * decl.c (start_preparsed_function): Use the correct type for
626 building the RESULT_DECL.
628 2008-10-31 Jakub Jelinek <jakub@redhat.com>
631 * decl.c (grokdeclarator): Diagnose auto function decl without
632 late return type and late return type function decl where type
636 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
639 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
642 * class.c (check_bitfield_decl): Rename min_precision to
643 tree_int_cst_min_precision.
644 * decl.c (finish_enum): Likewise.
646 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
649 * parser.c (cp_parser_token_starts_cast_expression): New.
650 (cp_parser_cast_expression): Peek the next token to decide whether
651 this could be a parenthesized constructor or is definitely an
654 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
657 * typeck.c (build_x_binary_op): Update call to
658 warn_about_parentheses.
659 * parser.c (cp_parser_binary_expression): Add note about passing
660 the correct code for unary expressions.
662 2008-10-24 Jakub Jelinek <jakub@redhat.com>
664 * Make-lang.in (check-c++-subtargets): New alias for
665 check-g++-subtargets.
666 (lang_checks_parallelized): Add check-g++.
667 (check_g++_parallelize): New variable.
669 2008-10-21 Richard Guenther <rguenther@suse.de>
671 * semantics.c (simplify_aggr_init_exprs_r): Remove.
672 (expand_or_defer_fn): Do not walk the function body to
673 simplify aggr_init_exprs.
675 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
678 * typeck.c (cp_common_type): New. The same as
679 type_after_usual_arithmetic_conversions but without promotions.
680 (type_after_usual_arithmetic_conversions): Do the promotions and
682 (common_type): Make it behave like the C version of this
683 function. Do not handle pointer types.
684 (common_pointer_type): Move handling of pointer types from
686 (cp_build_binary_op): Use common_pointer_type instead of
687 common_type in call to pointer_diff.
688 Use cp_common_type instead of common_type.
689 * cp-tree.h (common_pointer_type): Declare.
691 2008-10-14 Jakub Jelinek <jakub@redhat.com>
694 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
695 arguments if they don't already have COND_EXPR's type.
697 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
700 * pt.c (push_template_decl_real): Check that current_template_parms
702 (process_partial_specialization): Assert current_template_parms not
705 2008-10-13 Doug Evans <dje@google.com>
707 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
709 2008-10-10 Jakub Jelinek <jakub@redhat.com>
712 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
715 2008-10-09 Jakub Jelinek <jakub@redhat.com>
718 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
719 setting it to error_mark_node.
721 2008-10-07 Steve Ellcey <sje@cup.hp.com>
723 * decl.c (start_cleanup_fn): Declare as inline.
725 2008-10-06 Jason Merrill <jason@redhat.com>
727 PR c++/37376, other mangling issues
728 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
729 (write_member_name): Break out from...
730 (write_expression): ...here. Handle dependent COMPONENT_REF.
731 (write_template_arg): Wrap an argument pack in 'I'/'E'.
732 (write_builtin_type): Update char16/32_t mangling.
733 (write_nested_name, write_prefix): Don't forget template args
735 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
738 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
740 * typeck.c (build_x_indirect_ref): Add location argument.
741 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
742 (cp_build_unary_op): Add location argument.
743 (cp_build_modify_expr): Same.
744 * class.c (build_base_path): Pass location to build_indirect_ref.
745 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
748 2008-10-05 Dodji Seketeli <dodji@redhat.com>
751 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
752 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
753 of the innermost containing BLOCK.
755 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
758 * error.c (dump_function_decl): Save the exceptions in case of
759 error about incompatible specifications in a specialization.
761 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
763 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
765 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
768 * parser.c (cp_parser_selection_statement): Fix uninitialized
771 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
775 * decl.c (grokdeclarator): Set the type for typedefs to a
776 nested-name-specifier to error_mark_node.
778 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
780 * parser.c (cp_parser_selection_statement): Implement here the
781 -Wempty-body warning for `if' and `else' statements.
782 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
784 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
787 * name-lookup.c (maybe_process_template_type_declaration): Check
788 return value of push_template_decl_real for error_mark_node.
790 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
792 * semantics.c (finish_fname): Pass location to fname_decl.
794 2008-09-23 Jakub Jelinek <jakub@redhat.com>
797 * semantics.c (finish_omp_for): If processing_template_decl, just build
798 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
800 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
802 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
803 (get_member_function_from_ptrfunc): Same.
804 (build_x_binary_op): Same.
805 (build_binary_op): Same.
806 (cp_build_binary_op): New location argument.
807 (pointer_diff): Pass location to cp_build_binary_op.
808 (cp_truthvalue_conversion): Pass location to build_binary_op.
809 (convert_ptrmem): Pass location to cp_build_binary_op.
810 (cp_build_modify_expr): Same.
811 (build_ptrmemfunc): Same.
812 * init.c (expand_cleanup_for_base): Pass location to
813 c_common_truthvalue_conversion.
814 (build_new_1): Pass location to cp_build_binary_op.
815 (build_vec_delete_1): Pass location to *build_binary_op,
816 c_common_truthvalue_conversion.
817 (build_vec_init): Same.
818 (build_delete): Same.
819 * decl.c (compute_array_index_type): Same.
820 * call.c (build_new_op): Same.
821 * rtti.c (build_dynamic_cast_1): Same.
822 * cp-tree.h: Add argument to cp_build_binary_op.
823 * semantics.c (handle_omp_for_class_iterator): Pass location to
824 *build_binary_op, c_common_truthvalue_conversion.
825 * decl2.c (get_guard_cond): Same.
827 2008-09-17 Richard Guenther <rguenther@suse.de>
830 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
831 result to the correct type.
833 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
836 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
837 parameter for duplicate.
839 2008-09-17 Jason Merrill <jason@redhat.com>
842 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
844 2008-09-17 Jakub Jelinek <jakub@redhat.com>
847 * typeck.c (build_array_ref): Use protected_set_expr_location instead
848 of SET_EXPR_LOCATION when ret might not be an expression.
850 2008-09-17 Jan Hubicka <jh@suse.cz>
853 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
855 2008-09-16 Jakub Jelinek <jakub@redhat.com>
858 * semantics.c (finish_compound_literal): Return error_mark_node if
862 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
865 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
867 * decl.c (duplicate_decls): Call error_at.
868 (grokfndecl): New location argument. Use location if available.
869 (grokdeclarator): Pass declarator location to grokfndecl.
870 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
871 * decl2.c (check_classfn): Use error_at.
872 * parser.c (cp_parser_init_declarator): Set function_start_locus
874 (cp_parser_member_declaration): Set id_loc for function declarators.
876 2008-09-09 Jan Hubicka <jh@suse.cz>
879 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
881 2008-09-09 Jakub Jelinek <jakub@redhat.com>
884 * tree.c (array_type_nelts_top): Add size_one_node instead of
887 2008-09-09 Jason Merrill <jason@redhat.com>
890 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
893 2008-09-09 Jakub Jelinek <jakub@redhat.com>
896 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
897 being error_operand_p. Don't clear value if it was error_mark_node.
899 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
901 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
902 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
903 * semantics.c (anon_aggr_type_p): Remove.
905 2008-09-06 Jason Merrill <jason@redhat.com>
908 * parser.c (cp_parser_parameter_declaration_list): Process the
909 PARM_DECLs as we go and push them. Return a TREE_LIST.
910 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
911 (cp_parser_direct_declarator): Create a binding level and
912 suppress deprecated warnings in the parameter list.
913 (make_call_declarator): PARMS is now a tree.
914 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
915 * decl.h (enum deprecated_states, deprecated_state): Move here.
917 (type_is_deprecated): New fn.
918 (grokparms): PARMLIST is a tree now. Warn about parms that
919 use deprecated types.
920 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
922 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
923 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
925 * name-lookup.c (pushtag): Look through function parameter scopes.
926 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
927 when we're parsing a function declarator.
929 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
932 * tree.c (cp_build_qualified_type_real): Deal with sharing of
933 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
936 2008-09-04 Ian Lance Taylor <iant@google.com>
938 * parser.c (check_no_duplicate_clause): Change code parameter to
939 enum omp_clause_code.
941 2008-09-03 Jakub Jelinek <jakub@redhat.com>
944 * decl.c (cp_finish_decl): Only set
945 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
948 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
950 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
951 deferred_mark_used_calls vector and exit early.
952 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
954 (finish_function): Set defer_mark_used_calls for the duration of the
955 function. Call mark_used on any queued decls.
957 2008-09-02 Jason Merrill <jason@redhat.com>
960 * call.c (build_over_call): Make =delete work with SFINAE.
961 * class.c (resolve_address_of_overloaded_function): Likewise.
963 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
964 threadprivate_or_deleted_p.
965 (CP_DECL_THREADPRIVATE_P): Adjust.
966 (DECL_DELETED_FN): Likewise.
967 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
968 (SD_DELETED): New macro.
969 * parser.c (cp_parser_init_declarator): Use them.
970 * decl.c (start_decl): Use them.
972 * decl2.c (mark_used): Give =deleted error even in sizeof.
974 * typeck2.c (check_narrowing): Downgrade narrowing error to
977 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
979 * typeck.c (build_array_ref): Use new location argument.
980 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
981 * call.c (build_new_op): Same.
982 * decl2.c (grok_array_decl): Same.
983 * cp-tree.h (build_array_ref): Add location argument to prototype.
985 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
987 * typeck.c (build_x_indirect_ref): Add location argument.
988 * class.c (build_base_path): Pass location to build_indirect_ref.
989 * pt.c (tsubst_copy_and_build): Pass location to
990 finish_label_address_expr.
991 * parser.c (cp_parser_unary_expression): Same.
993 2008-08-31 Jason Merrill <jason@redhat.com>
995 Implement late-specified return type using 'auto'.
996 * cp-tree.h (struct cp_declarator): Add late_return_type field to
998 * parser.c (cp_parser_late_return_type_opt): New fn.
999 (cp_parser_direct_declarator): Use it.
1000 (make_call_declarator): Put it in the declarator.
1001 * decl.c (grokdeclarator): Splice in late-specified return type.
1002 * pt.c (splice_late_return_type): New fn.
1004 2008-08-29 Michael Meissner <gnu@the-meissners.org>
1006 * decl.c (builtin_function_1): Take a bool argument to decide
1007 whether to use pushdecl or pushdecl_top_level.
1008 (duplicate_decls): Copy function specific target and optimization
1009 options on duplicate declarations.
1010 (cxx_builtin_function): Update builtin_function_1 call.
1011 (cxx_builtin_function_ext_scope): New function, guarantee that the
1012 declaration is done at global scope.
1014 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
1015 macro, define builtin function hook for delayed machine specific
1018 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
1020 2008-08-30 Jason Merrill <jason@redhat.com>
1023 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
1025 2008-08-29 Jason Merrill <jason@redhat.com>
1027 Implement C++0x 'auto' semantics.
1028 * decl.c (start_decl_1): Don't complain about auto being incomplete.
1029 (cp_finish_decl): Deduce auto.
1030 * init.c (build_new): Handle 'new auto'.
1031 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
1032 message for auto than for normal template type parms.
1033 * pt.c (type_dependent_expression_p): Handle { }.
1034 (make_auto): New function.
1035 (listify_autos): New function.
1036 (do_auto_deduction): New function.
1037 (is_auto): New function.
1038 (type_uses_auto): New function.
1039 * cp-tree.h: Declare them.
1040 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
1041 treat auto as a declspec.
1042 (cp_parser_simple_type_specifier): It's a type-specifier.
1044 2008-08-29 Mark Mitchell <mark@codesourcery.com>
1046 * mangle.c (write_type): Add target-specific manglings for
1047 non-fundamental types to the substitution table.
1050 2008-08-29 Jakub Jelinek <jakub@redhat.com>
1054 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
1055 Adjust debug_hooks->imported_module_or_decl callers.
1057 2008-08-29 Jan Hubicka <jh@suse.cz>
1059 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
1061 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1064 * decl.c (reshape_init_r): Check init for error_mark_node.
1066 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1069 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
1070 (finish_return_stmt): Likewise.
1071 (finish_switch_condition): Likewise.
1073 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1075 * cp-tree.h: Fix #error directive.
1077 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
1079 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
1080 usual arithmetic conversions on scoped enumeration types.
1081 (common_type): Ditto.
1082 (default_conversion): Don't perform integral promotions on scoped
1084 (build_array_ref): Scoped enumeration types can't be used as
1086 * decl.c (start_enum): If building a C++0x scoped enumeration,
1087 enter its scope. If provided with an underlying type, check that
1088 underlying type and set up the enumeration type accordingly.
1089 (finish_enum): Only compute an underlying type if the underlying
1090 type isn't already fixed, and only convert the enumerator values
1091 now if we've just computed the underlying type. Finish the scope
1092 of C++0x scoped enumerations.
1093 (build_enumerator): For enumerations with a fixed underlying type,
1094 check the enumerator values when the enumerator is defined.
1095 (lookup_enumerator): New.
1096 * call.c (standard_conversion): Don't allow assignment from
1097 integers to scoped enumeration types, even with -fpermissive.
1098 Don't convert from scoped enumerations to bool or any arithmetic
1100 (build_conditional_expr): Don't per the usual arithmetic
1101 conversions for scoped enumeration types.
1102 (convert_like_real): Check complain to see if we should
1104 * error.c (class_key_or_enum_as_string): Print scoped enums.
1105 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1107 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1108 (SCOPED_ENUM_P): New.
1109 (UNSCOPED_ENUM_P): New.
1110 (SET_SCOPED_ENUM_P): New.
1111 (ENUM_UNDERLYING_TYPE): New.
1112 * pt.c (lookup_template_class): Update the instantiation of enum
1113 types to deal with C++0x scoped enumerations and underlying
1115 * name-lookup.c (begin_scope): Deal with scoped enumeration
1117 (lookup_qualified_name): Deal with lookup into enumeration types.
1118 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1119 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1120 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1121 parse a type-name that can be an enumeration type.
1122 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1123 (cp_parser_elaborated_type_specifier): Parse the
1124 optional `struct' or `class' following enum (in C++0x).
1125 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1128 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1130 * typeck.c: Update all calls to pedwarn.
1133 * error.c: Likewise.
1135 * name-lookup.c: Likewise.
1136 * parser.c: Likewise.
1138 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1141 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1144 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1146 * parser.c: Update all calls to inform.
1147 * typeck.c: Likewise.
1149 * class.c: Likewise.
1151 * method.c: Likewise.
1152 * friend.c: Likewise.
1153 * typeck2.c: Likewise.
1155 * name-lookup.c: Likewise.
1158 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1161 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1163 2008-08-18 Tomas Bily <tbily@suse.cz>
1165 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1167 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1169 * typeck.c: Update all callers of permerror.
1171 * class.c: Likewise.
1174 * except.c: Likewise.
1176 * typeck2.c: Likewise.
1178 * semantics.c: Likewise.
1179 * name-lookup.c: Likewise.
1181 * decl2.c: Likewise.
1182 * parser.c: Likewise.
1184 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1187 * pt.c (check_template_shadow): Change to return a bool.
1188 * name-lookup.c (push_class_level_binding): Early return if
1189 check_template_shadow returns false.
1190 * cp-tree.h (check_template_shadow): Adjust declaration.
1192 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1195 * decl.c (grokdeclarator): In case of extern and initializer, return
1196 error_mark_node after the error.
1198 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1201 * decl.c (grokfndecl): Call check_main_parameters_type only if
1204 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1207 * parser.c (cp_parser_class_head): Early return error_mark_node in
1208 case of global qualification of class name or qualified name that
1209 does not name a class.
1211 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1214 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1216 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1219 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1220 Delete forward declarations. Check that toplev.h has not been
1221 included before this file. Include toplev.h and diagnostic.h.
1222 * error.c (cp_cpp_error): Use DK_PEDWARN.
1223 (cxx_incomplete_type_diagnostic): Update declaration.
1224 (cxx_incomplete_type_error): Use DK_ERROR.
1225 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1226 as argument. Use emit_diagnostic.
1227 (cxx_incomplete_type_error): Use DK_ERROR.
1228 (add_exception_specifier): Use diagnostic_t instead of custom
1230 * typeck.c (complete_type_or_else): Update call to
1231 cxx_incomplete_type_diagnostic.
1232 * init.c (build_delete): Likewise.
1233 * call.c (diagnostic_fn_t): Remove unused typedef.
1234 (build_temp): Pass a pointer to diagnostic_t.
1235 (convert_like_real): Use emit_diagnostic.
1236 (joust): Check return value of warning before giving informative
1238 * friend.c (do_friend): Check return value of warning
1239 before giving informative note.
1240 * parser.c (cp_parser_template_id): Likewise.
1242 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1245 * class.c (check_bases_and_members): Warn with -Wuninitialized
1248 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1251 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1252 and make sure it is not a union.
1254 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1256 * semantics.c (finish_decltype_type): Initialize type.
1258 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1260 * semantics.c (finish_decltype_type): Handle calls to function
1261 pointers and references to functions properly.
1263 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1266 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1267 following a type-id is an error when in C++0x mode.
1269 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1272 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1274 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1277 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1279 2008-08-05 Jason Merrill <jason@redhat.com>
1282 * decl.c (build_ptrmemfunc_type): Don't require structural
1283 comparison of PMF types.
1284 * tree.c (cp_build_qualified_type_real): Don't clear
1285 a valid TYPE_PTRMEMFUNC_TYPE.
1286 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1289 2008-08-04 Jason Merrill <jason@redhat.com>
1292 * typeck2.c (check_narrowing): Allow narrowing conversion
1293 from an explicit floating-point constant.
1296 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1299 2008-08-04 Simon Baldwin <simonb@google.com>
1302 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1303 the declaration's id is followed by a semicolon.
1305 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1308 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1309 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1311 2008-07-31 Jason Merrill <jason@redhat.com>
1314 * init.c (build_new_1): Don't convert pointer to the data type
1315 until we're actually going to treat it as that type.
1318 * tree.c (build_aggr_init_expr): Split out...
1319 (build_cplus_new): ...from here.
1320 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1321 * init.c (build_new_1): new T() means value-initialization,
1322 not default-initialization.
1323 (build_vec_init): Likewise.
1324 (build_value_init_1): Use build_aggr_init_expr.
1326 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1329 * decl2.c (fix_temporary_vars_context_r): New function.
1330 (one_static_initialization_or_destruction): Make sure temporary
1331 variables part of the initialiser have their DECL_CONTEXT()
1334 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1337 * typeck.c (build_binary_op): Encapsulate code into
1340 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1343 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1344 TYPE_UID instead of pointers.
1346 2008-07-29 Jan Hubicka <jh@suse.cz>
1348 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1349 * decl.c (duplicate_decls): Likewise.
1350 (grokfndecl): Likewise.
1351 (start_method): Likewise.
1352 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1354 * pt.c (register_specialization, regenerate_decl_from_template):
1356 * decl2.c (grokfield): Likewise.
1358 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1361 * decl.c (duplicate_decls): Merge USED flags.
1363 2008-07-27 Jason Merrill <jason@redhat.com>
1366 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1368 2008-07-28 Richard Guenther <rguenther@suse.de>
1370 Merge from gimple-tuples-branch.
1372 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1374 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1377 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1379 * decl.c (finish_function): Call gimple_body after cp_genericize.
1381 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1383 * optimize.c: Include gimple.h instead of tree-gimple.h.
1384 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1385 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1388 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1390 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1392 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1394 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1396 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1398 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1400 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1401 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1402 (cxx_omp_clause_copy_ctor): Same.
1403 (cxx_omp_clause_assign_op): Same.
1405 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1407 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1408 (cp_gimplify_expr): Adjust caller.
1410 2008-05-11 Doug Kwan <dougkwan@google.com>
1412 * init.c (build_vec_delete): Add type conversion for argument
1413 0 of POINTER_PLUS_EXPR.
1415 2008-04-29 Doug Kwan <dougkwan@google.com>
1417 * decl2 (File): Include "gimple.h"
1418 (cp_write_global_declarations): Use gimple_body instead of
1420 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1422 2008-04-10 Diego Novillo <dnovillo@google.com>
1424 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1426 * optimize.c (maybe_clone_body): Re-enable call to
1428 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1429 code with call to gimple_unreachable.
1430 (cp_genericize): Fix handling of clone bodies.
1432 2008-04-04 Diego Novillo <dnovillo@google.com>
1434 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1436 * optimize.c (maybe_clone_body): Re-enable.
1438 2008-02-19 Diego Novillo <dnovillo@google.com>
1439 Oleg Ryjkov <olegr@google.com>
1441 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1443 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1444 argument to gimple_seq *. Update all users.
1445 (gimplify_must_not_throw_expr): Likewise.
1447 2008-02-04 Oleg Ryjkov <olegr@google.com>
1449 * except.c: Include gimple.h
1450 (cp_protect_cleanup_actions): Convert to tuples.
1451 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1453 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1455 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1456 instead of annotating each block manually.
1458 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1460 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1461 (gimplify_for_stmt): Same.
1462 (gimplify_switch_stmt): Same.
1463 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1465 [WHILE_STMT]: Return GS_OK.
1466 [SWITCH_STMT]: Same.
1467 [CONTINUE_STMT]: Same.
1469 (cp_genericize): Set gimple_body() of cloned functions when needed.
1471 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1473 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1474 (cp_gimplify_init_expr): Convert to tuples.
1475 (gimplify_must_not_throw_expr): Make function return a
1476 gimplify_status and convert to tuples.
1478 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1480 * cp-gimplify.c (genericize_try_block): Enable and do not call
1482 (genericize_catch_block): Same.
1483 (genericize_eh_spec_block): Same.
1484 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1485 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1487 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1489 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1490 * decl.c (finish_function): Use gimple_body instead of
1492 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1493 * cp-gimplify.c (genericize_try_block): Comment out.
1494 (genericize_catch_block): Same.
1495 (genericize_eh_spec_block): Same.
1496 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1497 (gimplify_for_stmt): Comment out.
1498 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1499 (cp_gimplify_omp_for): Same.
1500 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1501 Comment out call to gimplify_stmt and append_to_statement_list.
1502 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1503 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1504 (cp_gimplify_expr): Same.
1505 Comment out calls to genericize_*_block. Comment out call to
1508 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1511 * class.c (type_has_user_provided_default_constructor): Handle
1514 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1516 * decl.c (push_library_fn): Add a parameter for the exceptions that
1517 the function may throw.
1518 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1520 (build_library_fn): Change to static.
1521 * cp-tree.h: Adjust declarations.
1522 * except.c (declare_nothrow_library_fn): New.
1523 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1524 do_allocate_exception): Use the latter, adjust the declarations
1525 (ie, add empty exception-specification), consistently with the
1526 actual implementation in libsupc++.
1528 2008-07-25 Jan Hubicka <jh@suse.cz>
1530 * typeck.c (inline_conversion): Remove.
1531 (cp_build_function_call): Do not use inline_conversion.
1532 * decl.c (duplicate_decls): Do not insist on inline being declared
1534 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1535 from being output. We now remove static functions always.
1536 (finish_function): Do return warning on all static functions.
1537 * call.c (build_over_call): Do not use inline_conversion.
1538 * cp-tree.h (possibly_inlined_p): Declare.
1539 (inline_conversion): Remove.
1540 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1541 * decl2.c (cp_write_global_declarations): Likewise.
1542 (mark_used): Likewise.
1543 (possibly_inlined_p): New functions.
1545 2008-07-25 Jason Merrill <jason@redhat.com>
1547 * class.c (type_has_user_provided_default_constructor): Handle
1550 2008-07-23 Jan Hubicka <jh@suse.cz>
1552 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1553 (grogfndecl): Drop flag_inline_trees code.
1554 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1555 * lex.c (cxx_init): Do not set unit-at-a-time.
1557 2008-07-23 Jason Merrill <jason@redhat.com>
1559 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1560 trying to mangle a decl with no name.
1562 Implement defaulted/deleted functions as per N2346
1563 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1564 (DECL_DELETED_FN): New macro.
1565 (DECL_DEFAULTED_FN): New macro.
1566 * class.c (user_provided_p): New fn.
1567 (defaultable_fn_p): New fn.
1568 (type_has_user_provided_constructor): New fn.
1569 (type_has_user_provided_default_constructor): New fn.
1570 (check_methods): A defaulted fn is still trivial.
1571 (check_bases_and_members): Likewise.
1572 * decl.c (grok_special_member_properties): Likewise.
1573 (duplicate_decls): Complain about redeclaring a function as deleted.
1574 (start_decl): initialized==2 means deleted.
1575 (cp_finish_decl): Handle deleted/defaulted semantics.
1576 * decl2.c (grokfield): Likewise.
1577 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1578 Complain about using a deleted fn.
1579 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1580 (perform_member_init): Check for a user-provided default constructor
1581 even if TYPE_NEEDS_CONSTRUCTING.
1582 (build_new_1): Likewise.
1583 * call.c (build_over_call): Don't call mark_used twice.
1584 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1585 * search.c (check_final_overrider): Check for deleted mismatch.
1586 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1587 (cp_parser_pure_specifier): Handle =default and =delete.
1589 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1591 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1594 * typeck.c: All calls to pedwarn changed.
1595 * decl.c: All calls to pedwarn changed.
1596 * call.c: All calls to pedwarn changed.
1597 * error.c: All calls to pedwarn changed.
1598 * typeck2.c: All calls to pedwarn changed.
1599 * pt.c: All calls to pedwarn changed.
1600 * name-lookup.c: All calls to pedwarn changed.
1601 * parser.c: All calls to pedwarn changed.
1603 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1605 * call.c: Fix comment typos.
1606 * class.c: Likewise.
1607 * cp-tree.h: Likewise.
1608 * cxx-pretty-print.c: Likewise.
1611 * name-lookup.c: Likewise.
1612 * operators.def: Likewise.
1613 * parser.c: Likewise.
1616 * typeck.c: Likewise.
1618 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1622 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1623 copy constructors and copy assignment operators proper.
1625 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1627 * parser.c (cp_token): Remove in_system_header.
1628 (eof_token): Remove in_system_header.
1629 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1630 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1631 (cp_parser_member_declaration): Use in_system_header_at.
1632 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1633 (pop_tinst_level): Don't set in_system_header.
1634 (instantiate_class_template): Don't set in_system_header.
1635 (instantiate_decl): Don't set in_system_header.
1636 (instantiate_pending_templates): Don't set in_system_header.
1638 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1641 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1642 TYPE_NOTHROW_P, not TREE_NOTHROW.
1643 (trait_expr_value): Likewise.
1645 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1648 * call.c (convert_like_real): Don't take the error code path
1649 when a rvalue or base conversion has the bad_p field set.
1651 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1653 * rtti.c (emit_support_tinfos): Add char16_type_node and
1655 * typeck2.c (digest_init): Support char16_t and char32_t.
1657 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1659 * cvt.c (convert_to_void): Avoid C++ keywords.
1660 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1662 * friend.c (is_friend): Likewise.
1663 * init.c (perform_member_init): Likewise.
1664 * mangle.c (write_template_prefix, write_template_template_param):
1666 * name-lookup.c (do_namespace_alias, do_using_directive,
1667 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1668 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1669 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1671 * pt.c (is_specialization_of_friend, lookup_template_class,
1672 push_tinst_level, instantiate_class_template,
1673 tsubst_copy_and_build): Likewise.
1674 * tree.c (add_stmt_to_compound): Likewise.
1675 * typeck.c (finish_class_member_access_expr): Likewise.
1677 2008-07-17 Julian Brown <julian@codesourcery.com>
1678 Mark Mitchell <mark@codesourcery.com>
1680 * decl2.c (determine_visibility): Allow target to override
1681 visibility of class data.
1683 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1686 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1687 semantics to the current WP (N2691).
1689 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1692 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1693 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1694 complies with exception specification constraints.
1696 2008-07-14 Jason Merrill <jason@redhat.com>
1698 * lex.c (init_reswords): Always set D_OBJC.
1700 2008-07-11 Tom Tromey <tromey@redhat.com>
1701 Ian Lance Taylor <iant@google.com>
1703 * lex.c (struct resword, reswords): Don't define.
1704 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1705 (init_reswords): Clarify mask code. Use c_common_reswords rather
1708 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1711 * decl.c (grokdeclarator): Warn about initializing variables
1712 of storage class 'extern' only after the type of the declarator
1713 has been properly computed.
1715 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1718 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1719 carries the location of the primary type.
1720 * parser.c (cp_parser_check_type_definition): Update documentation.
1721 (cp_parser_check_for_definition_in_return_type,
1722 cp_parser_check_for_invalid_template_id,
1723 cp_parser_set_decl_spec_type,
1724 cp_parser_check_for_definition_in_return_type,
1725 cp_parser_diagnose_invalid_type_name,
1726 cp_parser_new_expression, cp_parser_explicit_instantiation,
1727 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1728 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1731 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1735 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1736 Add a location_t parameter so that
1737 error message can have a more accurate location.
1738 * cp-tree.h: Updated prototype
1739 * pt.c (tsubst_qualified_id): Use location in error messages.
1740 * parser.c (cp_parser_postfix_expression,
1741 cp_parser_objc_statement, cp_parser_trait_expr,
1742 cp_parser_token_is_class_key,
1743 cp_parser_uncommitted_to_tentative_parse_p,
1744 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1745 cp_parser_error, cp_parser_name_lookup_error,
1746 cp_parser_simulate_error, cp_parser_check_decl_spec,
1747 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1748 cp_parser_diagnose_invalid_type_name,
1749 cp_parser_parse_and_diagnose_invalid_type_name,
1750 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1751 cp_parser_string_literal, cp_parser_primary_expression,
1752 cp_parser_primary_expression, cp_parser_unqualified_id,
1753 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1754 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1755 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1756 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1757 cp_parser_jump_statement, cp_parser_block_declaration,
1758 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1759 cp_parser_function_specifier_opt, cp_parser_decltype,
1760 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1761 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1762 cp_parser_type_parameter, cp_parser_template_id,
1763 cp_parser_template_name, cp_parser_template_argument): Likewise.
1765 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1768 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1769 on function return type.
1771 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1774 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1775 on function return type in case of system header.
1777 2008-07-09 Raksit Ashok <raksit@google.com>
1779 * parser.c (cp_parser_postfix_expression): New warning based on flag
1780 warn_disallowed_functions.
1782 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1785 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1786 functions declared with a storage class qualifier.
1788 2008-07-03 Richard Guenther <rguenther@suse.de>
1791 * typeck.c (cp_build_function_call): Move code to verify
1792 builtin function arguments ...
1793 * call.c (build_cxx_call): ... here.
1795 2008-07-02 Jason Merrill <jason@redhat.com>
1797 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1799 Implement WG21 N2672, Initializer List proposed wording
1800 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1801 (struct lang_type_class): Add has_list_ctor bitfield.
1802 (TYPE_HAS_LIST_CTOR): New macro.
1803 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1804 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1805 (LOOKUP_NO_NARROWING): New macro.
1806 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1807 * parser.c (cp_parse_braced_list): Split out from...
1808 (cp_parser_initializer_clause): ...here.
1809 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1811 (cp_lexer_next_token_is_not_keyword): New fn.
1812 (cp_parser_parenthesized_expression_list): Handle { }.
1813 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1814 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1815 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1816 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1817 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1818 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1819 (cp_parser_save_member_function_body): Likewise.
1820 * call.c (conversion_kind): Add ck_list, ck_aggr.
1821 (struct conversion): Add check_narrowing bitfield, conversion list.
1822 (build_list_conv): New fn.
1823 (build_aggr_conv): New fn.
1824 (implicit_conversion): Call them.
1825 (standard_conversion): Set check_narrowing if appropriate.
1826 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1827 (build_user_type_conversion_1): When converting from an init list,
1828 we allow additional conversions except when calling a copy ctor.
1829 (convert_like_real): Calling an explicit ctor for an init list is
1830 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1831 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1832 class doesn't have a list ctor, break the {} into a TREE_LIST.
1833 (compare_ics): ck_list is better than other UDCs.
1834 (set_up_extended_ref_temp): Split out from initialize_reference.
1835 (is_std_init_list): New fn.
1836 (is_list_ctor): New fn.
1837 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1838 (reshape_init_array_1): Pass it to build_constructor.
1839 (reshape_init_class): Ditto.
1840 (initialize_artificial_var): Pass the appropriate type.
1841 (build_aggr_init_full_exprs): Split out from...
1842 (check_initializer): ...here. Handle new semantics.
1843 (build_init_list_var_init): New subroutine of check_initializer.
1844 (grokdeclarator): Converting constructors can have more than one parm.
1845 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1846 * init.c (expand_default_init): Only do digest_init for aggregates.
1847 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1848 build_constructor_from_list.
1849 (generic_initializer, ptr_initializer): Ditto.
1850 (ptm_initializer, class_initializer): Ditto.
1851 (get_pseudo_ti_init): Ditto.
1852 * error.c (dump_type): Handle init_list_type_node.
1853 (maybe_warn_cpp0x): New fn.
1854 (maybe_varn_variadic_templates): Call it.
1855 * cvt.c (ocp_convert): Handle conversion from { }.
1856 * tree.c (build_array_of_n_type): New fn.
1857 * typeck2.c (store_init_value): Use init_list_type_node.
1858 (digest_init): Likewise.
1859 (check_narrowing): New fn.
1860 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1861 of vector of constructor elts. Handle non-aggregate types. Make
1862 constant literals static.
1863 * pt.c: (tsubst_copy_and_build): Adjust.
1864 (unify): Handle { }.
1865 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1867 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1869 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1870 (comp_ptr_ttypes_const): Likewise.
1872 2008-07-01 Andrew Haley <aph@redhat.com>
1874 * decl.c (finish_constructor_body): Don't set the return value of
1875 the constructor if the constructor is that of a Java type.
1877 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1880 * decl2.c (is_late_template_attribute): If the first attribute
1881 argument is IDENTIFIER_NODE, don't consider it when checking
1882 if arguments are value or type dependent.
1884 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1887 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1890 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1892 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1894 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1897 * repo.c (repo_emit_p): Put const static data members initialized
1898 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1901 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1904 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1907 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1910 * typeck.c (cp_build_function_call): Show example syntax in
1913 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1915 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1916 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1917 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1918 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1919 pedwarn to permerror.
1920 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1921 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1922 * identify_goto, check_previous_goto_1, check_goto, define_label,
1923 check_tag_decl, start_decl, check_class_member_definition_namespace,
1924 grokfndecl, grokdeclarator): Likewise.
1925 * except.c (check_handlers): Likewise.
1926 * typeck2.c (digest_init): Likewise.
1927 * pt.c (check_specialization_namespace,
1928 check_explicit_instantiation_namespace,
1929 maybe_process_partial_specialization, check_explicit_specialization,
1930 convert_template_argument, do_decl_instantiation,
1931 do_type_instantiation, instantiate_decl): Likewise.
1932 * semantics.c (finish_template_type_parm): Likewise.
1933 * name-lookup.c (pushdecl_maybe_friend,
1934 check_for_out_of_scope_variable): Likewise.
1935 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1936 coerce_new_type): Likewise.
1937 * parser.c (cp_parser_nested_name_specifier_opt,
1938 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1939 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1940 (cp_parser_parameter_declaration): Check flag_permissive instead of
1941 flag_pedantic_errors.
1942 * call.c (joust): Change pedwarn to warning.
1943 * friend.c (make_friend_class): Likewise.
1945 2008-06-16 Jan Hubicka <jh@suse.cz>
1947 * method.c: Include cgraph.h.
1948 (use_thunk): Use cgraph_add_new_function instead of calling backend
1951 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1953 * parser.c: Fix comment typo.
1955 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1958 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1959 grokdeclarator and apply it to the created declaration.
1960 * cp-tree.h (grokbitfield): Update prototype.
1961 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1962 since they are now applied in grokbitfield. Adjusted the call to
1964 (cp_parser_objc_class_ivars): Likewise.
1966 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1969 * class.c (type_requires_array_cookie): Do not consider delete[]
1970 operators with an ellipsis as second argument.
1972 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1975 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1978 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1981 * pt.c (maybe_process_partial_specialization): Check the tree
1982 returned by push_template_decl for error_mark_node.
1983 * parser.c (cp_parser_class_head): Likewise, check the tree
1984 returned by the latter.
1986 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1989 * decl.c (grokdeclarator): In case of wrong return type return
1990 immediately error_mark_node.
1992 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1994 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1995 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1996 finish_omp_taskwait): New prototypes.
1997 (cxx_omp_clause_default_ctor): Add outer argument.
1998 (finish_omp_for): Add new clauses argument.
1999 * cp-gimplify.c (cxx_omp_finish_clause): New function.
2000 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
2001 (cxx_omp_clause_default_ctor): Add outer argument.
2002 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
2003 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
2004 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
2005 Add par_clauses argument. If decl is present in parallel's
2006 lastprivate clause, change that clause to shared and add
2007 a lastprivate clause for decl to OMP_FOR_CLAUSES.
2008 Fix wording of error messages. Adjust finish_omp_for caller.
2009 Add clauses argument. Parse loops with random access iterators.
2010 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
2012 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
2013 cp_parser_omp_for_loop callers.
2014 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
2016 (cp_parser_omp_clause_name): Handle collapse and untied
2018 (cp_parser_omp_clause_schedule): Handle auto schedule.
2019 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
2020 and PRAGMA_OMP_CLAUSE_UNTIED.
2021 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
2022 (OMP_TASK_CLAUSE_MASK): Define.
2023 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
2024 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
2025 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
2026 PRAGMA_OMP_TASKWAIT.
2027 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
2028 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
2029 (tsubst_omp_for_iterator): New function.
2030 (dependent_omp_for_p): New function.
2031 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
2032 loops. Adjust finish_omp_for caller. Handle loops with random
2033 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
2034 (tsubst_expr): Handle OMP_TASK.
2035 * semantics.c (cxx_omp_create_clause_info): New function.
2036 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
2037 OMP_CLAUSE_COLLAPSE.
2038 (cxx_omp_predetermined_sharing): Removed.
2039 * semantics.c (finish_omp_for): Allow pointer iterators. Use
2040 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
2041 collapsed for loops. Adjust c_finish_omp_for caller. Add new
2042 clauses argument. Fix check for type dependent cond or incr.
2043 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
2044 fold_convert to convert incr amount to difference_type. Only
2045 fold if not in template. If decl is mentioned in lastprivate
2046 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
2047 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
2049 (finish_omp_threadprivate): Allow static class members of the
2051 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
2052 finish_omp_taskwait): New functions.
2054 * parser.c (cp_parser_binary_expression): Add prec argument.
2055 (cp_parser_assignment_expression): Adjust caller.
2056 * cp-tree.h (outer_curly_brace_block): New prototype.
2057 * decl.c (outer_curly_brace_block): No longer static.
2059 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2062 * pt.c (push_template_decl_real): Consistently return error_mark_node
2065 2008-06-02 Tomas Bily <tbily@suse.cz>
2067 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
2068 (cp_build_unary_op): Likewise.
2069 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
2070 (maybe_warn_about_returning_address_of_local): Likewise.
2072 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
2075 * pt.c (tsubst_initializer_list): Consistently check the tree
2076 returned by tsubst_pack_expansion for error_mark_node.
2078 2008-05-27 Michael Matz <matz@suse.de>
2081 * call.c (build_new_op): Make warning conditional on
2084 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
2087 * call.c (convert_like_real): Convert bitfield to desired type
2088 before creating temporary.
2090 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2092 * Makefile.in: Adjusted dependencies on c-incpath.o.
2094 2008-05-23 Jakub Jelinek <jakub@redhat.com>
2097 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2098 fold_build_cleanup_point_expr on build_call_a results.
2101 * semantics.c (omp_clause_info_fndecl): New function.
2102 (finish_omp_clauses): Use it.
2104 2008-05-21 Jakub Jelinek <jakub@redhat.com>
2107 * cp-tree.h (check_array_initializer): New prototype.
2108 * decl.c (check_array_initializer): New function.
2109 (check_initializer): Call it.
2110 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2112 2008-05-21 Tom Tromey <tromey@redhat.com>
2114 * mangle.c (save_partially_mangled_name): Remove.
2115 (restore_partially_mangled_name): Likewise.
2116 (write_encoding): Update.
2117 (write_unqualified_name): Likewise.
2118 (start_mangling): Always use name_obstack. Remove 'ident_p'
2120 (get_identifier_nocopy): Remove.
2121 (finish_mangling_internal): Rename from finish_mangling.
2122 (finish_mangling): New function.
2123 (finish_mangling_get_identifier): Likewise.
2124 (partially_mangled_name, partially_mangled_name_len): Remove.
2125 (mangle_decl_string): Change return type. Update.
2126 (mangle_decl, mangle_type_string, mangle_special_for_type,
2127 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2128 mangle_ref_init_variable): Update.
2130 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2133 * semantics.c (begin_class_definition): Extend checks on the first
2136 2008-05-12 Tomas Bily <tbily@suse.cz>
2138 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2139 * call.c (build_over_call): Likewise.
2140 * error.c (dump_expr): Use CASE_CONVERT.
2141 * class.c (fixed_type_or_null): Likewise.
2143 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2145 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2147 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2150 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2152 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2153 DECL_LOOPING_CONST_OR_PURE_P attributes.
2154 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2157 2008-05-02 Simon Baldwin <simonb@google.com>
2160 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2162 2008-05-01 Simon Baldwin <simonb@google.com>
2164 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2166 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2169 * pt.c (more_specialized_fn): Stop the loop even if there are no
2170 arguments before ellipsis.
2172 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2175 * parser.c (cp_parser_lookup_name): Look through single function
2179 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2180 COMPOUND_EXPR if the second argument would be error_mark_node.
2182 2008-04-28 Jason Merrill <jason@redhat.com>
2183 Liu Guanwei <liu_gw@163.com>
2186 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2187 in default arguments.
2189 2008-04-25 Jan Hubicka <jh@suse.cz>
2191 * typeck.c (check_return_expr): Update.
2192 * decl.c (start_preparsed_function): Update.
2193 * method.c (use_thunk): Update.
2195 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2198 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2199 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2200 * decl2.c (is_late_template_attribute): Only make vector_size
2201 late tmpl attribute if argument is type or value dependent.
2202 (cp_reconstruct_complex_type): New function.
2204 2008-04-24 Richard Guenther <rguenther@suse.de>
2206 * typeck.c (cp_build_function_call): Call
2207 check_builtin_function_arguments.
2209 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2211 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2212 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2213 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2214 * class.c (build_base_path): Don't set TREE_INVARIANT.
2215 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2216 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2217 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2218 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2219 (generic_initializer): Don't set TREE_INVARIANT.
2220 (ptr_initializer): Don't set TREE_INVARIANT.
2221 (ptm_initializer): Don't set TREE_INVARIANT.
2222 (class_initializer): Don't set TREE_INVARIANT.
2223 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2224 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2225 (build_template_parm_index): Don't set TREE_INVARIANT.
2226 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2227 (process_template_parm): Don't set TREE_INVARIANT.
2229 2008-04-22 Jason Merrill <jason@redhat.com>
2232 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2233 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2234 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2236 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2239 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2240 expression is errorneous.
2242 2008-04-21 Jason Merrill <jason@redhat.com>
2245 * tree.c (cp_tree_equal): Handle FIXED_CST.
2248 * pt.c (template_template_parm_bindings_ok_p): Set
2249 processing_template_decl while in this function.
2251 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2253 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2254 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2255 char16_t and char32_t.
2256 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2257 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2258 extended builtin type "u8char{16,32}_t".
2259 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2261 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2262 (cp_parser_is_string_literal): Idem.
2263 (cp_parser_string_literal): Idem.
2264 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2266 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2267 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2268 * typeck.c (string_conv_p): Support char16_t and char32_t.
2270 2008-04-17 Jason Merrill <jason@redhat.com>
2273 * call.c (build_user_type_conversion_1): Represent second step of
2274 copy-init with an rvalue conversion.
2275 (convert_like_real) [ck_user]: Don't implicitly add it here.
2277 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2280 * decl.c (layout_var_decl): If extern or static var has variable
2281 size, set TREE_TYPE (decl) to error_mark_node.
2283 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2286 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2289 2008-04-09 Jason Merrill <jason@redhat.com>
2292 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2293 not a pushed variable.
2295 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2297 * call.c (build_op_delete_call): Fix quotation in warning message.
2298 * decl.c (grokdeclarator): Quote keyword in error message.
2299 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2302 * parser.c (cp_parser_check_type_definition): Print error string
2303 directly rather than using "%s".
2304 (cp_parser_postfix_expression): Fix quotation.
2305 (cp_parser_decltype): Likewise.
2306 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2308 * parser.c (cp_parser_non_integral_constant_expression): Build error
2309 message with CONCAT rather than using "%s".
2310 (cp_parser_primary_expression): Fix quotation.
2311 (cp_parser_postfix_expression): Likewise.
2312 (cp_parser_postfix_dot_deref_expression): Likewise.
2313 (cp_parser_unary_expression): Likewise.
2314 (cp_parser_new_expression): Likewise.
2315 (cp_parser_delete_expression): Likewise.
2317 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2318 as `)', not as `('. Fix quotation.
2319 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2320 (cp_parser_primary_expression): Likewise.
2321 (cp_parser_nested_name_specifier_opt): Likewise.
2322 (cp_parser_postfix_expression): Likewise.
2323 (cp_parser_postfix_open_square_expression): Likewise.
2324 (cp_parser_parenthesized_expression_list): Likewise.
2325 (cp_parser_pseudo_destructor_name): Likewise.
2326 (cp_parser_new_expression): Likewise.
2327 (cp_parser_direct_new_declarator): Likewise.
2328 (cp_parser_delete_expression): Likewise.
2329 (cp_parser_cast_expression): Likewise.
2330 (cp_parser_question_colon_clause): Likewise.
2331 (cp_parser_builtin_offsetof): Likewise.
2332 (cp_parser_trait_expr): Likewise.
2333 (cp_parser_label_for_labeled_statement): Likewise.
2334 (cp_parser_compound_statement): Likewise.
2335 (cp_parser_selection_statement): Likewise.
2336 (cp_parser_condition): Likewise.
2337 (cp_parser_iteration_statement): Likewise.
2338 (cp_parser_already_scoped_statement): Likewise.
2339 (cp_parser_simple_declaration): Likewise.
2340 (cp_parser_linkage_specification): Likewise.
2341 (cp_parser_static_assert): Likewise.
2342 (cp_parser_decltype): Likewise.
2343 (cp_parser_conversion_function_id): Likewise.
2344 (cp_parser_operator_function_id): Likewise.
2345 (cp_parser_operator): Likewise.
2346 (cp_parser_type_parameter): Likewise.
2347 (cp_parser_template_id): Likewise.
2348 (cp_parser_explicit_instantiation): Likewise.
2349 (cp_parser_explicit_specialization): Likewise.
2350 (cp_parser_enum_specifier): Likewise.
2351 (cp_parser_namespace_definition): Likewise.
2352 (cp_parser_namespace_alias_definition): Likewise.
2353 (cp_parser_using_declaration): Likewise.
2354 (cp_parser_using_directive): Likewise.
2355 (cp_parser_asm_definition): Likewise.
2356 (cp_parser_direct_declarator): Likewise.
2357 (cp_parser_ptr_operator): Likewise.
2358 (cp_parser_parameter_declaration_clause): Likewise.
2359 (cp_parser_initializer_clause): Likewise.
2360 (cp_parser_class_specifier): Likewise.
2361 (cp_parser_member_specification_opt): Likewise.
2362 (cp_parser_member_declaration): Likewise.
2363 (cp_parser_pure_specifier): Likewise.
2364 (cp_parser_constant_initializer): Likewise.
2365 (cp_parser_base_clause): Likewise.
2366 (cp_parser_exception_specification_opt): Likewise.
2367 (cp_parser_try_block): Likewise.
2368 (cp_parser_function_try_block): Likewise.
2369 (cp_parser_handler): Likewise.
2370 (cp_parser_throw_expression): Likewise.
2371 (cp_parser_asm_operand_list): Likewise.
2372 (cp_parser_attributes_opt): Likewise.
2373 (cp_parser_label_declaration): Likewise.
2374 (cp_parser_constructor_declarator_p): Likewise.
2375 (cp_parser_template_declaration_after_export): Likewise.
2376 (cp_parser_single_declaration): Likewise.
2377 (cp_parser_objc_message_expression): Likewise.
2378 (cp_parser_objc_message_args): Likewise.
2379 (cp_parser_objc_encode_expression): Likewise.
2380 (cp_parser_objc_defs_expression): Likewise.
2381 (cp_parser_objc_protocol_expression): Likewise.
2382 (cp_parser_objc_selector_expression): Likewise.
2383 (cp_parser_objc_protocol_refs_opt): Likewise.
2384 (cp_parser_objc_typename): Likewise.
2385 (cp_parser_objc_method_keyword_params): Likewise.
2386 (cp_parser_objc_superclass_or_category): Likewise.
2387 (cp_parser_objc_try_catch_finally_statement): Likewise.
2388 (cp_parser_objc_synchronized_statement): Likewise.
2389 (cp_parser_objc_throw_statement): Likewise.
2390 (cp_parser_omp_var_list_no_open): Likewise.
2391 (cp_parser_omp_clause_default): Likewise.
2392 (cp_parser_omp_clause_if): Likewise.
2393 (cp_parser_omp_clause_num_threads): Likewise.
2394 (cp_parser_omp_clause_reduction): Likewise.
2395 (cp_parser_omp_clause_schedule): Likewise.
2396 (cp_parser_omp_critical): Likewise.
2397 (cp_parser_omp_for_loop): Likewise.
2398 (cp_parser_omp_sections_scope): Likewise.
2400 * parser.c (cp_parser_template_parameter_list): Simplify.
2402 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2404 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2406 2008-04-07 Jason Merrill <jason@redhat.com>
2409 * class.c (type_has_user_nondefault_constructor): A template
2410 counts as a nondefault constructor.
2412 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2414 * decl.c (cxx_push_function_context): Delete.
2415 (cxx_pop_function_context): Delete.
2416 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2418 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2419 LANG_HOOKS_FUNCTION_FINAL): Delete.
2420 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2421 LANG_HOOKS_MISSING_NORETURN_OK_P.
2422 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2424 * semantics.c (current_stmt_tree): Fix comment.
2426 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2429 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2430 before calling fold_offsetof.
2432 2008-04-03 Tom Tromey <tromey@redhat.com>
2434 * Make-lang.in (c++_OBJS): New variable.
2436 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2438 * optimize.c (clone_body): New, from tree-inline.c.
2440 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2442 * method.c (synthesize_method): Use {push,pop}_function_context.
2443 * name-lookup.c (push_to_top_level): Likewise.
2444 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2446 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2449 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2452 2008-03-27 Tom Tromey <tromey@redhat.com>
2454 * Make-lang.in: Revert automatic dependency patch.
2456 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2459 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2460 (build_compound_expr): New, for compatibility with C
2461 build_compound_expr.
2462 (cp_build_compound_expr): Renamed from build_compound_expr.
2463 (build_c_cast): New, for compatibility with C build_c_cast.
2464 (cp_build_c_cast): Renamed from build_c_cast.
2465 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2466 * decl.c (cxx_maybe_build_cleanup): Ditto.
2467 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2468 (cp_build_compound_expr): Renamed from build_compound_expr.
2469 (build_c_cast): Add C-compatible prototype.
2470 (cp_build_c_cast): Renamed from build_c_cast.
2471 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2472 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2474 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2476 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2477 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2478 ending in a pack expansion, both of which can occur when
2479 substituting into a nested template.
2480 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2481 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2482 * parser.c (cp_parser_template_parameter): Deal with unnamed
2483 non-type template parameter packs identified by pack expansions in
2486 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2489 * pt.c (apply_late_template_attributes): Don't call tsubst on
2490 first attribute argument if it is IDENTIFIER_NODE.
2493 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2494 and LTGT_EXPR to pp_expression.
2496 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2498 * pt.c (coerce_template_template_parm): Moved the body of the loop
2499 of coerce_template_template_parms here, to make iteration over a
2500 template argument pack simpler.
2501 Also, allow matching of a template parameter pack in the template
2502 template parameter to a template parameter in the template
2504 (coerce_template_template_parms): Deal with variadic template
2505 template parameters. Use coerce_template_template_parm.
2506 (unify): Make sure we coerce the template template argument's
2507 template arguments to the template template parameter's template
2508 parameters, not the other way around.
2510 2008-03-25 Tom Tromey <tromey@redhat.com>
2512 * Make-lang.in: Remove .o targets.
2513 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2515 (c++_OBJS): New variable.
2516 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2518 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2520 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2521 (composite_pointer_type): Ditto.
2522 (common_type): Fix call to composite_pointer_type.
2523 (cxx_sizeof_nowarn): New; used to be a macro.
2524 (cxx_sizeof_expr): Add SFINAE support.
2525 (cxx_alignof_expr): Ditto.
2526 (decay_conversion): Fix calls for SFINAE support.
2527 (rationalize_conditional_expr): Add SFINAE support.
2528 (build_class_member_access_expr): Ditto.
2529 (finish_class_member_access_expr): Ditto.
2530 (build_x_indirect_ref): Ditto.
2531 (build_indirect_ref): Original version renamed to
2532 cp_build_indirect_ref; new version provides a bridge from
2534 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2536 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2537 (build_function_call): Original version renamed to
2538 cp_build_function_call; new version provides a bridge from
2540 (cp_build_function_call): Was build_function_call; added SFINAE
2542 (convert_arguments): Add SFINAE support.
2543 (build_x_binary_op): Ditto.
2544 (build_binary_op): Original version renamed to cp_build_binary_op;
2545 new version provides a bridge from c-common.
2546 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2547 (pointer_diff): Fix calls for SFINAE.
2548 (build_x_unary_op): Add SFINAE support.
2549 (condition_conversion): Fix calls for SFINAE.
2550 (build_unary_op): Original version renamed to cp_build_unary_op;
2551 new version provides a bridge from c-common.
2552 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2553 (unary_complex_lvalue): Fix calls for SFINAE.
2554 (build_x_conditional_expr): Add SFINAE support.
2555 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2556 (build_x_compound_expr): Add SFINAE support.
2557 (convert_ptrmem): Fix calls for SFINAE.
2558 (build_static_cast_1): Add SFINAE support.
2559 (build_static_cast): Ditto.
2560 (build_reinterpret_cast_1): Ditto.
2561 (build_reinterpret_cast): Ditto.
2562 (build_const_cast_1): Ditto.
2563 (build_const_cast): Ditto.
2564 (build_c_cast): Ditto.
2565 (build_modify_expr): Original version renamed to
2566 cp_build_modify_expr; new version provides a bridge from c-common.
2567 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2569 (build_x_modify_expr): Add SFINAE support.
2570 (build_ptrmemfunc): Fix calls for SFINAE.
2571 (convert_for_assignment): Add SFINAE support.
2572 (convert_for_initialization): Ditto.
2573 (check_return_expr): Fix calls for SFINAE.
2574 (lvalue_or_else): Add SFINAE support.
2575 * init.c (perform_member_init): Fix calls for SFINAE.
2576 (emit_mem_initializers): Ditto.
2577 (expand_virtual_init): Ditto.
2578 (expand_cleanup_for_base): Ditto.
2579 (build_aggr_init): Add SFINAE support.
2580 (expand_default_init): Ditto.
2581 (expand_aggr_init_1): Fix calls for SFINAE.
2582 (build_offset_ref): Ditto.
2583 (build_new_1): Add SFINAE support.
2585 (build_vec_delete_1): Fix calls for SFINAE.
2586 (get_temp_regvar): Ditto.
2587 (build_vec_init): Add SFINAE support.
2588 (build_dtor_call): Fix calls for SFINAE.
2589 (build_delete): Ditto.
2590 (push_base_cleanups): Ditto.
2591 (build_vec_delete_1): Ditto.
2592 * class.c (build_base_path): Fix calls for SFINAE.
2593 (build_simple_base_path): Ditto.
2594 (convert_to_base_statically): Ditto.
2595 (build_vfn_ref): Ditto.
2596 (resolve_address_of_overloaded_function): Ditto.
2597 * decl.c (check_initializer): Fix calls for SFINAE.
2598 (register_dtor_fn): Ditto.
2599 (compute_array_index_type): Ditto.
2600 (finish_enum): Ditto.
2601 (start_preparsed_function): Ditto.
2602 (cxx_maybe_build_cleanup): Ditto.
2603 * call.c (convert_like): Add COMPLAIN argument.
2604 (convert_like_with_context): Ditto.
2605 (build_this): Fix calls for SFINAE.
2606 (build_user_type_conversion): Ditto.
2607 (resolve_args): Ditto.
2608 (build_new_function_call): Add SFINAE support.
2609 (build_operator_new_call): Fix calls for SFINAE.
2610 (build_object_call): Add SFINAE support.
2611 (build_conditional_expr): Ditto.
2612 (build_new_op): Ditto.
2613 (build_op_delete_call): Fix calls for SFINAE.
2614 (build_temp): Ditto.
2615 (convert_like_real): Add SFINAE support.
2616 (build_x_va_arg): Fix calls for SFINAE.
2617 (convert_default_arg): Ditto.
2618 (build_over_call): Add SFINAE support.
2619 (build_java_interface_fn_ref): Fix calls for SFINAE.
2620 (build_special_member_call): Add SFINAE support.
2621 (build_new_method_call): Ditto.
2622 (perform_implicit_conversion): Ditto.
2623 (perform_direct_initialization_if_possible): Ditto.
2624 (initialize_reference): Fix calls for SFINAE.
2625 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2626 * rtti.c (build_headof): Fix calls for SFINAE.
2627 (get_tinfo_decl_dynamic): Ditto.
2628 (get_typeid): Ditto.
2629 (build_dynamic_cast_1): Add SFINAE support.
2630 (build_dynamic_cast): Ditto.
2631 (tinfo_base_init): Fix calls for SFINAE.
2632 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2633 (do_end_catch): Ditto.
2634 (initialize_handler_parm): Ditto.
2635 (expand_start_catch_block): Ditto.
2636 (do_allocate_exception): Ditto.
2637 (do_free_exception): Ditto.
2638 (build_throw): Ditto.
2639 * cvt.c (build_up_reference): Fix calls for SFINAE.
2640 (convert_to_reference): Ditto.
2641 (ocp_convert): Ditto.
2642 (convert_to_void): Add SFINAE support.
2643 * tree.c (build_dummy_object): Fix calls for SFINAE.
2644 (stabilize_expr): Ditto.
2645 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2647 (build_new_method_call): Ditto.
2648 (build_special_member_call): Ditto.
2649 (build_new_op): Ditto.
2650 (perform_implicit_conversion): Ditto.
2651 (perform_direct_initialization_if_possible): Ditto.
2652 (convert_to_void): Ditto.
2653 (build_aggr_init): Ditto.
2655 (build_vec_init): Ditto.
2656 (build_dynamic_cast): Ditto.
2657 (finish_call_expr): Ditto
2658 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2659 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2660 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2661 (finish_class_member_access_expr): Ditto.
2662 (build_x_indirect_ref): Ditto.
2663 (cp_build_indirect_ref): New.
2664 (cp_build_function_call): Add tsubst_flags_t parameter.
2665 (build_x_unary_op): Ditto.
2666 (cp_build_unary_op): New.
2667 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2668 (build_x_compound_expr): Ditto.
2669 (build_compound_expr): Ditto.
2670 (build_static_cast): Ditto.
2671 (build_reinterpret_cast): Ditto.
2672 (build_const_cast): Ditto.
2673 (build_c_cast): Ditto.
2674 (build_x_modify_expr): Ditto.
2675 (cp_build_modify_expr): New.
2676 (convert_for_initialization): Add tsubst_flags_t parameter.
2677 (cp_build_binary_op): Remove macro; add function declaration.
2678 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2679 (lvalue_or_else): Ditto.
2680 (build_functional_cast): Ditto.
2681 * typeck2.c (digest_init): Fix calls for SFINAE.
2682 (process_init_constructor_array): Ditto.
2683 (process_init_constructor_record): Ditto.
2684 (build_x_arrow): Ditto.
2685 (build_m_component_ref): Ditto.
2686 (build_functional_cast): Add SFINAE support.
2687 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2688 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2689 (finish_expr_stmt): Ditto.
2690 (finish_for_expr): Ditto.
2691 (finish_asm_stmt): Ditto.
2692 (finish_non_static_data_member): Ditto.
2693 (finish_qualified_id_expr): Ditto.
2694 (finish_call_expr): Add SFINAE support.
2695 (finish_increment_expr): Fix calls for SFINAE.
2696 (finish_unary_op_expr): Ditto.
2697 (simplify_aggr_init_expr): Ditto.
2698 (finish_omp_clauses): Ditto.
2699 (finish_omp_for): Ditto.
2700 (finish_omp_barrier): Ditto.
2701 (finish_omo_flush): Ditto.
2702 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2703 (build_anon_union_vars): Ditto.
2704 (get_guard_cond): Ditto.
2706 (one_static_initialization_or_destruction): Ditto.
2707 (do_static_initialization_or_destruction): Ditto.
2708 (generate_ctor_or_dtor_function): Ditto.
2709 (build_offset_ref_call_from_tree): Ditto.
2710 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2711 (cp_parser_postfix_dot_deref_expression): Ditto.
2712 (cp_parser_unary_expression): Ditto.
2713 (cp_parser_new_expression): Ditto.
2714 (cp_parser_cast_expression): Ditto.
2715 (cp_parser_binary_expression): Ditto.
2716 (cp_parser_question_colon_clause): Ditto.
2717 (cp_parser_assignment_expression): Ditto.
2718 (cp_parser_expression): Ditto.
2719 (cp_parser_builtin_offsetof): Ditto.
2720 (cp_parser_template_argument): Ditto.
2721 (cp_parser_functional_cast): Ditto.
2723 2008-03-24 Tom Tromey <tromey@redhat.com>
2725 * lex.c (handle_pragma_interface): Don't copy the filename.
2726 (handle_pragma_implementation): Copy filename using xstrdup.
2728 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2730 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2731 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2732 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2733 (PROMOTES_TO_AGGR_TYPE): Remove.
2734 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2735 * typeck.c (unary_complex_lvalue, build_modify_expr,
2736 convert_for_initialization): Adjust.
2737 * init.c (is_aggr_type): Remove.
2738 (is_class_type): Add.
2739 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2740 build_delete): Adjust.
2741 * lex.c (make_aggr_type): Remove.
2742 (make_class_type): Add.
2743 (cxx_make_type): Adjust.
2744 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2746 * decl.c (build_typename_type, make_typename_type,
2747 make_unbound_class_template, cxx_init_decl_processing,
2748 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2749 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2750 grok_op_properties, xref_tag, check_function_type): Adjust.
2751 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2752 add_builtin_candidate, add_builtin_candidates,
2753 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2754 is_subseq, compare_ics): Adjust.
2755 * method.c (use_thunk): Adjust.
2756 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2757 create_tinfo_types): Adjust.
2758 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2759 build_up_reference, convert_to_reference, convert_from_reference,
2760 ocp_convert, build_expr_type_conversion): Adjust.
2761 * tree.c (bind_template_template_parm, error_type): Adjust.
2762 * dump.c (cp_dump_tree): Adjust.
2763 * search.c (lookup_member): Adjust.
2764 * friend.c (make_friend_class, do_friend): Adjust.
2765 * typeck2.c (store_init_value, process_init_constructor_array,
2766 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2767 build_functional_cast): Adjust.
2768 * pt.c (finish_member_template_decl, process_template_parm,
2769 lookup_template_class, tsubst_function_type, tsubst,
2770 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2772 * semantics.c (begin_class_definition, finish_base_specifier,
2773 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2775 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2776 do_class_using_decl, lookup_qualified_name,
2777 maybe_process_template_type_declaration): Adjust.
2778 * decl2.c (grok_array_decl, check_member_template,
2779 constrain_class_visibility): Adjust.
2780 * parser.c (cp_parser_class_name): Adjust.
2782 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2784 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2786 2008-03-17 Jason Merrill <jason@redhat.com>
2789 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2790 a temp directly to a reference as per DR391.
2792 2008-03-12 Richard Guenther <rguenther@suse.de>
2796 2008-02-04 Richard Guenther <rguenther@suse.de>
2799 * decl.c (record_builtin_java_type): Make jboolean a
2800 integer type again where its mode doesn't match that of bool.
2802 2008-01-25 Richard Guenther <rguenther@suse.de>
2805 * decl.c (record_builtin_java_type): Make __java_boolean
2807 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2808 after TYPE_MAIN_VARIANT check.
2810 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2813 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2817 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2818 DECL_P in not a variable and appears more than once error messages.
2820 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2824 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2828 * typeck.c (structural_comptypes): Call cp_comptypes.
2829 (comptypes): New; called from the C/C++ common bits to perform
2831 (cp_comptypes): Renamed from comptypes, which is already used,
2832 with a different signature, by the C++ front end.
2833 (build_reinterpret_cast_1): Call cp_comptypes.
2834 (ptr_reasonably_similar): Ditto.
2835 * decl.c (decls_match): Ditto.
2836 * cvt.c (convert_to_reference): Ditto.
2837 * cp-tree.h (same_type_p): Ditto.
2838 (same_or_base_type_p): Ditto.
2839 (comptypes): Rename to cp_comptypes.
2840 * pt.c (canonical_type_parameter): Call cp_comptypes.
2842 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2844 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2845 test for equivalence between pointer and references.
2847 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2850 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2851 (check_field_decls): Likewise.
2852 (note_name_declared_in_class): Likewise.
2853 * call.c (build_new_op): Likewise.
2854 (convert_like_real): Likewise.
2855 (build_over_call): Likewise.
2856 * lex.c (unqualified_fn_lookup_error): Likewise.
2857 * parser.c (cp_parser_template_id): Likewise.
2858 * cvt.c (warn_ref_binding): Likewise.
2859 (convert_to_reference): Likewise.
2860 (ocp_convert): Likewise.
2861 (convert_to_void): Use error instead of pedwarn.
2862 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2863 * decl.c (compute_array_index_type): Use constant_expression_error.
2865 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2867 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2868 that auto is either a storage class or a simple type specifier,
2869 depending on the dialect.
2870 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2871 specifier in C++98 mode, error in C++0x mode (since we don't
2872 support auto as a type specifier, yet).
2873 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2874 storage specifier in C++0x mode.
2875 (cp_parser_simple_type_specifier): Parse `auto' as a
2876 simple-type-specifier, but error because we don't support it yet.
2878 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2880 * parser.c (cp_parser_nonclass_name): New.
2881 (cp_parser_pseudo_destructor_name): Use it instead of
2882 cp_parser_type_name.
2883 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2885 2008-02-29 Tom Tromey <tromey@redhat.com>
2887 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2888 (cp_lexer_get_preprocessor_token): Update.
2889 (cp_lexer_set_source_position_from_token): Don't call
2890 restore_input_file_stack.
2891 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2893 2008-02-28 Richard Guenther <rguenther@suse.de>
2896 2008-02-26 Richard Guenther <rguenther@suse.de>
2898 * decl.c (duplicate_decls): Remove decl from global mapping
2899 before ggc_freeing it.
2901 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2904 * rtti.c: Include c-pragma.h.
2905 (push_abi_namespace, pop_abi_namespace): New functions.
2906 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2907 create_tinfo_types, emit_support_tinfos): Use them.
2908 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2910 2008-02-26 Jason Merrill <jason@redhat.com>
2913 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2914 to name the struct for linkage purposes even if it has attributes.
2915 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2917 2008-02-26 Tom Tromey <tromey@redhat.com>
2919 * parser.c (eof_token): Remove old location code.
2920 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2921 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2923 (cp_write_global_declarations): Likewise.
2924 * lex.c (cxx_init): Remove old location code.
2925 (handle_pragma_implementation): Remove test of
2926 USE_MAPPED_LOCATION.
2927 * pt.c (tsubst): Remove old location code.
2928 * error.c (cp_print_error_function): Remove test of
2929 USE_MAPPED_LOCATION.
2930 * decl.c (pop_label): Remove old location code.
2931 (finish_function): Likewise.
2933 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2936 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2938 2008-02-26 Richard Guenther <rguenther@suse.de>
2940 * decl.c (duplicate_decls): Remove decl from global mapping
2941 before ggc_freeing it.
2943 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2946 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2948 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2950 * typeck.c (build_class_member_access_expr): Add appropriate
2951 OPT_W* parameter to warning.
2952 (build_reinterpret_cast_1): Likewise.
2953 * name-lookup.c (push_overloaded_decl): Likewise.
2955 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2958 * error.c (dump_expr): Handle CONJ_EXPR.
2960 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2963 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2964 (dump_expr): Handle FIXED_CST.
2966 2008-02-24 Jason Merrill <jason@redhat.com>
2968 * parser.c (cp_parser_declaration): Handle "inline namespace".
2969 (cp_parser_namespace_definition): Likewise.
2972 * name-lookup.c (arg_assoc_namespace): Look down into inline
2975 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2977 * typeck.c (check_for_casting_away_constness): Use 1 single
2978 argument, the type of cast, to decide what diagnostics generate.
2979 (build_static_cast_1): Remove unused code. Update call to
2980 check_for_casting_away_constness.
2981 (build_reinterpret_cast_1): Update call to
2982 check_for_casting_away_constness.
2983 (build_const_cast_1): Likewise.
2985 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2987 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2988 VEC_NEW_EXPR), forward to pp_expression.
2989 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2991 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2994 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2996 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2999 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
3000 template decls' function decl.
3002 2008-02-22 Paolo Carlini <pcarlini@suse.de>
3006 2008-02-14 Paolo Carlini <pcarlini@suse.de>
3009 * pt.c (determine_specialization): In case of function templates,
3010 when the type of DECL does not match FN there is no match.
3012 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3015 * typeck.c (build_binary_op): Warn about floating point
3016 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
3018 2008-02-19 Jason Merrill <jason@redhat.com>
3021 * pt.c (resolve_overloaded_unification): Set processing_template_decl
3022 while we look for possible bindings.
3024 2008-02-19 Jakub Jelinek <jakub@redhat.com>
3027 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
3031 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
3032 vars. Afterwards ensure v is VAR_DECL.
3035 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
3036 call cp_finish_decl.
3037 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
3040 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
3045 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
3046 is error_mark_node, return an error early.
3047 (find_parameter_packs_r): Pass the pointer set along to recursive
3048 calls of cp_walk_subtrees; don't try to manage the pointer set
3050 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
3051 (make_pack_expansion): Ditto.
3052 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
3053 a second pass through the tree with find_parameter_packs_r; that
3054 second pass no longer does anything.
3055 (push_template_decl_real): If we have an erroneous declaration,
3056 set its type to error_mark_node before returning an error.
3058 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
3061 * pt.c (tsubst_initializer_list): Deal with the use of
3062 VOID_TYPE_NODE to indicate value-initialization of the bases.
3064 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3065 Jason Merrill <jason@redhat.com>
3069 * class.c (type_has_user_nondefault_constructor): New fn.
3070 * cp-tree.h: Declare it.
3071 * init.c (emit_mem_initializers): Use it for -W warning about
3072 missing base initializer.
3074 2008-02-14 Paolo Carlini <pcarlini@suse.de>
3077 * pt.c (determine_specialization): In case of function templates,
3078 when the type of DECL does not match FN there is no match.
3080 2008-02-13 Jakub Jelinek <jakub@redhat.com>
3081 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3084 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
3085 are not identifier :: ~, return before calling cp_parser_type_name.
3087 2008-02-13 Jason Merrill <jason@redhat.com>
3089 PR c++/34962, c++/34937, c++/34939
3090 * decl2.c (is_late_template_attribute): Always defer attributes
3091 vector_size and weak.
3094 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3095 of enumerators, too.
3097 2008-02-12 Jason Merrill <jason@redhat.com>
3100 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3101 if we're doing conversions to call a user-defined conversion function.
3103 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
3106 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3109 2008-02-12 Jakub Jelinek <jakub@redhat.com>
3112 * init.c (build_new_1): Don't create placement_expr before
3113 constructing alloc_call. Verify that the pointer is passed by
3114 value to operator new.
3116 2008-02-11 Jason Merrill <jason@redhat.com>
3119 * pt.c (tsubst): Don't look up a template typedef in an explicit
3122 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3125 * tree.c (cp_build_qualified_type_real): When building a
3126 cv-qualified array type, build it as a unique type with
3127 build_cplus_array_type_1 and then adopt the unqualified type's
3130 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3133 * decl.c (groktypename): Check grokdeclarator return.
3135 2008-02-10 Jason Merrill <jason@redhat.com>
3138 * decl2.c (cp_write_global_declarations): Don't write out static
3139 data members with DECL_IN_AGGR_P set.
3141 2008-02-08 Jason Merrill <jason@redhat.com>
3144 * tree.c (build_target_expr_with_type): Handle void initializer.
3145 (bot_manip): Remap slot before recursing.
3147 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3150 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3152 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3155 * tree.c: Include tree-flow.h.
3156 (build_target_expr): Check type compatibility.
3157 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3158 * call.c (convert_like_real): Convert bitfield to expected type.
3160 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3164 * typeck.c (structural_comptypes): Call cp_comptypes.
3165 (comptypes): New; called from the C/C++ common bits to perform
3167 (cp_comptypes): Renamed from comptypes, which is already used,
3168 with a different signature, by the C++ front end.
3169 (build_reinterpret_cast_1): Call cp_comptypes.
3170 (ptr_reasonably_similar): Ditto.
3171 * decl.c (decls_match): Ditto.
3172 * cvt.c (convert_to_reference): Ditto.
3173 * cp-tree.h (same_type_p): Ditto.
3174 (same_or_base_type_p): Ditto.
3175 (comptypes): Rename to cp_comptypes.
3176 * pt.c (canonical_type_parameter): Call cp_comptypes.
3178 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3181 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3182 value dependent expression.
3184 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3187 * decl2.c (save_template_attributes): When we're modifying the
3188 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3189 all of the other variants to add those same attributes. Otherwise,
3190 the main variant will be inconsistent with those other variants.
3192 2008-02-04 Richard Guenther <rguenther@suse.de>
3195 * decl.c (record_builtin_java_type): Make jboolean a
3196 integer type again where its mode doesn't match that of bool.
3198 2008-02-02 Jason Merrill <jason@redhat.com>
3199 Mark Mitchell <mark@codesourcery.com>
3202 * init.c (build_value_init_1): New function.
3203 (build_value_init): New function.
3204 * typeck2.c (build_functional_cast): Call it.
3205 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3207 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3208 TYPE_HAS_CONSTRUCTOR.
3209 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3210 add_implicitly_declared_members): Adjust.
3211 (check_field_decls): Adjust. Remove warnings about reference/const
3212 in class without constructor.
3213 (check_bases_and_members): Adjust. Give those warnings here instead.
3214 * decl.c (fixup_anonymous_aggr): Adjust.
3215 (check_initializer): Adjust, clarify logic slightly.
3216 (grok_special_member_properties): Adjust, only set if user-provided.
3217 * rtti.c (create_tinfo_types): Don't set.
3218 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3219 Use same_type_ignoring_top_level_qualifiers_p.
3220 * pt.c (check_explicit_specialization): Adjust.
3221 (instantiate_class_template): Adjust.
3223 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3224 Jakub Jelinek <jakub@redhat.com>
3228 * typeck.c (structural_comptypes): Handle comparisons of
3229 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3231 * mangle.c (write_builtin_type): Map down to the canonical type,
3232 which will be one of the predefined type nodes.
3234 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3237 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3238 bits to allow for expansion of the number of middle end tree
3241 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3252 * typeck.c (check_return_expr): Tweak call to
3253 check_for_bare_parameter_packs.
3254 * class.c (add_method): Be careful with error_mark_nodes.
3255 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3257 * pt.c (struct find_parameter_pack_data): Remove
3259 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3260 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3261 (make_pack_expansion): Ditto.
3262 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3264 (process_template_parm): Tweak call to
3265 check_for_bare_parameter_packs.
3266 (push_template_decl_real): Tweak calls to
3267 check_for_bare_parameter_packs. If bare parameter packs are found
3268 in the list of exceptions, clear out that list after giving an
3270 * semantics.c (finish_cond): Tweak call to
3271 check_for_bare_parameter_packs.
3272 (finish_expr_stmt): Ditto.
3273 (finish_for_expr): Ditto.
3274 (finish_switch_cond): Ditto.
3275 (finish_mem_initializers): Ditto.
3276 (finish_member_declaration): Ditto.
3277 (finish_static_assert): Check for bare parameter packs in the
3279 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3280 attributes of a declaration.
3281 * parser.c (cp_parser_using_declaration): Tweak call to
3282 check_for_bare_parameter_packs.
3283 (cp_parser_base_clause): Ditto.
3285 2008-01-28 Jason Merrill <jason@redhat.com>
3288 * class.c (build_base_path): Fix !want_pointer case.
3290 2008-01-27 Jason Merrill <jason@redhat.com>
3293 * class.c (build_base_path): Fix previous change.
3295 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3298 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3301 2008-01-26 Richard Guenther <rguenther@suse.de>
3304 * typeck.c (build_binary_op): Remove code to shorten compares.
3306 2008-01-25 Richard Guenther <rguenther@suse.de>
3309 * decl.c (record_builtin_java_type): Make __java_boolean
3311 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3312 after TYPE_MAIN_VARIANT check.
3314 2008-01-25 Jason Merrill <jason@redhat.com>
3317 * class.c (build_base_path): Don't mess with virtual access if
3319 * call.c (standard_conversion): Don't check whether source type
3322 * decl2.c (is_late_template_attribute): Don't defer attribute
3323 visibility just because the type is dependent.
3325 2008-01-25 Jason Merrill <jason@redhat.com>
3326 Mark Mitchell <mark@codesourcery.com>
3329 * call.c (standard_conversion): Allow conversion from integer/real
3331 (compare_ics): Such a conversion is worse than a normal arithmetic
3334 2008-01-25 Richard Guenther <rguenther@suse.de>
3337 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3340 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3343 * pt.c (push_template_decl_real): Return error_mark_node in case
3344 of template definition of non-template.
3346 2008-01-24 Jason Merrill <jason@redhat.com>
3349 * decl2.c (is_late_template_attribute): Defer any attribute with
3350 dependent args. Also defer type attributes if the type is dependent.
3352 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3353 Alexandre Oliva <aoliva@redhat.com>
3356 * call.c (reference_binding): For bitfields use the declared bitfield
3358 (add_builtin_candidates): Likewise.
3359 * class.c (layout_class_type): For bitfields copy over the
3360 original type quals.
3362 2008-01-22 Jason Merrill <jason@redhat.com>
3365 * decl.c (groktypename): Also ignore attributes on dependent
3366 possibly-class types.
3369 * friend.c (do_friend): Check for prior declaration of a friend
3370 function of a local class.
3371 * name-lookup.c (lookup_name_innermost_nonclass_level):
3373 * name-lookup.h: Declare it.
3375 2008-01-22 Tom Tromey <tromey@redhat.com>
3378 * init.c (build_new_1): Only disallow Java aggregates.
3380 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3383 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3384 if decl or init is error_mark_node.
3387 * error.c (dump_expr): Handle VECTOR_CST.
3389 2008-01-21 Jason Merrill <jason@redhat.com>
3392 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3395 * pt.c (retrieve_local_specialization): Robustify.
3396 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3399 * pt.c (tsubst): Only call retrieve_local_specialization if the
3400 original typedef was in a function template.
3403 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3405 2008-01-21 Richard Guenther <rguenther@suse.de>
3408 * error.c (cp_print_error_function): Deal with recursive
3411 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3414 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3416 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3420 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3421 on non-IS_AGGR_TYPE scope.
3422 (constructor_name_p): Assert IS_AGGR_TYPE.
3424 2008-01-18 Ian Lance Taylor <iant@google.com>
3427 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3428 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3429 DECL_IS_OPERATOR_NEW flag.
3431 2008-01-16 Richard Guenther <rguenther@suse.de>
3434 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3435 for conversions to type variants.
3437 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3439 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3440 declaration and code. Update copyright year.
3442 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3445 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3446 know we have a class type.
3448 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3451 * pt.c (coerce_template_parameter_pack): When substituting into
3452 the type of a non-type template parameter pack. use the
3453 deduced/substituted arguments.
3454 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3455 can be a parameter pack with the ellipsis following it. When we
3456 have an erroneous declaration, allow it to be a parameter pack.
3457 (cp_parser_template_parameter): Complain about default
3458 arguments on non-type template parameter packs, and parse them
3459 using the new cp_parser_default_argument.
3460 (cp_parser_parameter_declaration): Complain about parameter packs
3461 with default arguments. Move parsing of default arguments into a
3462 new function, cp_parser_default_argument.
3463 (cp_parser_default_argument): New; extracted from
3464 cp_parser_parameter_declaration.
3466 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3472 * typeck.c (check_return_expr): If there are bare parameter packs
3473 in the return value, set it to error_mark_node.
3474 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3475 * pt.c (find_parameter_packs_r): Look at the type of
3476 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3477 (check_for_bare_parameter_packs): Flip the result: now returns
3478 TRUE when there were bare parameter packs, FALSE otherwise.
3479 (push_template_decl_real): Deal with flipped result of
3480 check_for_bare_parameter_packs.
3481 * semantics.c (finish_cond): If there are bare parameter packs in
3482 the conditional, set it to error_mark_node.
3483 (finish_expr_stmt): If there are bare parameter packs in the
3484 expression, set it to error_mark_node.
3485 (finish_for_expr): Ditto.
3486 (finish_switch_cond): If there are bare parameter packs in
3487 the conditional, set it to error_mark_node.
3488 (finish_mem_initializers): If there are bare parameter packs in
3489 the member initializer, set it to error_mark_node.
3490 (finish_member_declaration): Check the attributes of the
3491 declaration for bare parameter packs, and remove the attributes if
3492 any have bare parameter packs.
3493 * parser.c (cp_parser_using_declaration): Check the using
3494 declaration for bare parameter packs.
3495 (cp_parser_base_clause): If there are bare parameter packs in a
3496 base specifier, don't add it to the chain.
3498 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3501 * error.c (dump_simple_decl): Display ellipsis for template
3502 non-type parameter packs.
3503 (dump_decl): Display ellipsis for template type parameter packs.
3504 (dump_template_decl): Display ellipsis for template template
3506 * pt.c (redeclare_class_template): When redeclaring a class
3507 template, check for collisions between template parameters and
3508 template parameter packs.
3510 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3513 * pt.c (process_partial_specialization): Don't mark template
3514 parameters that occur in non-deduced contexts.
3515 (struct pair_fn_data): Add include_nondeduced_p.
3516 (for_each_template_parm_r): Only visit non-deduced contexts if
3517 include_nondeduced_p is set.
3518 (for_each_template_parm): Added parameter include_nondeduced_p,
3519 which states whether template parameters found in non-deduced
3520 contexts should be visited.
3521 (uses_template_parms): Visit all template parameters, even those
3522 in non-deduced contexts.
3524 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3527 * pt.c (check_default_tmpl_args): Check for parameter packs that
3528 aren't at the end of a primary template.
3529 (push_template_decl_real): Remove check for parameter packs that
3530 aren't at the end of a primary template; that now happens in
3531 check_default_tmpl_args.
3532 * semantics.c (finish_template_template_parm): Use
3533 check_default_tmpl_args to check for errors in the template
3536 2008-01-12 Doug Kwan <dougkwan@google.com>
3538 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3539 instead of OPT_Wreturn_type in warning due to ignored return type
3541 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3542 instead of OPT_Wreturn_type in warning due to ignored return type
3545 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3548 * semantics.c (finish_omp_for): Don't call
3549 fold_build_cleanup_point_expr if processing_template_decl.
3551 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3552 Jakub Jelinek <jakub@redhat.com>
3555 * error.c (dump_template_argument): Deal with TREE_LIST.
3557 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3559 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3560 long" in C++0x mode; change the warning to note that "long long"
3561 is only unsupported in C++98 mode.
3563 2007-12-20 Jason Merrill <jason@redhat.com>
3566 * call.c (standard_conversion): Derived-to-base is considered a
3567 standard conversion.
3569 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3572 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3573 call cp_parser_statement rather than
3574 cp_parser_already_scoped_statement.
3576 2007-12-18 Jason Merrill <jason@redhat.com>
3579 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3581 (dependent_type_p_r): Handle the domain of an array.
3583 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3584 Jakub Jelinek <jakub@redhat.com>
3589 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3590 bindings of template template parameters after all template
3591 arguments have been deduced.
3592 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3594 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3595 (unify): Deal with variadic, bound template template parameters.
3596 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3598 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3601 * decl.c (grokdeclarator): Reject friend sfk_constructor
3604 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3607 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3610 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3613 * cp-lang.c (cp_classify_record): New.
3614 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3616 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3619 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3622 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3623 dynamic_cast in a template.
3625 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3628 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3629 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3631 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3634 * error.c (dump_type_prefix, dump_type_suffix): Handle
3635 TYPE_PACK_EXPANSION.
3638 * error.c (dump_expr): Handle ABS_EXPR.
3640 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3644 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3645 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3646 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3647 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3648 flag_use_repository and repo_emit_p returned 2.
3650 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3653 * tree.c (stabilize_call, stabilize_init): Do nothing if
3654 processing_template_decl.
3656 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3659 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3660 error instead of assertion failure.
3661 * parser.c (cp_parser_decltype): If closing paren is not found,
3662 return error_mark_node.
3664 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3667 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3669 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3670 since arg_assoc_template_arg will deal with them (better).
3672 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3675 * pt.c (tsubst_exception_specification): Handle substitutions into
3676 member templates, where tsubst_pack_expansion returns a
3677 TYPE_PACK_EXPANSION.
3679 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3682 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3683 bindings for the template parameter pack, don't try to keep the
3684 empty deduced arguments.
3685 (unify): If a parameter is a template-id whose template argument
3686 list contains a pack expansion that is not at the end, then we
3687 cannot unify against that template-id.
3689 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3692 * pt.c (current_template_args): Use error_operand_p.
3694 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3697 * error.c (dump_decl): Handle TREE_BINFO.
3699 2007-12-01 Ollie Wild <aaw@google.com>
3702 * typeck.c (build_binary_op): Add conversion of pointers to function
3703 members appearing as operands to the equality operators.
3705 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3708 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3710 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3713 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3715 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3720 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3722 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3725 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3727 PR tree-optimization/34181
3728 * method.c (use_thunk): Don't inline the call in the thunk.
3731 * tree.c (decl_linkage): Static data members and static member
3732 functions in anonymous ns classes are lk_external.
3734 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3737 * decl.c (start_preparsed_function): Pass
3738 processing_template_decl for the new allocate_struct_function
3741 2007-11-25 Richard Guenther <rguenther@suse.de>
3743 * decl.c (poplevel): Use BLOCK_CHAIN.
3745 2007-11-24 Ollie Wild <aaw@google.com>
3747 * typeck.c (delta_from_ptrmemfunc): New function.
3748 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3749 (build_binary_op): Call delta_from_ptrmemfunc.
3751 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3755 * decl.c (cp_finish_decl): Disallow variable or field
3756 definitions if extern "Java" aggregates.
3757 (grokparms): Disallow parameters with extern "Java"
3759 (check_function_type): Disallow function return values
3760 with extern "Java" aggregates.
3761 * init.c (build_new_1): Disallow placement new with
3762 extern "Java" aggregates.
3764 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3765 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3768 * call.c (convert_like_real): Build a zero constant when __null is
3769 converted to an integer type.
3771 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3774 * decl2.c (cp_write_global_declarations): Issue error about static
3775 data members in anonymous namespace which are declared and used,
3778 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3781 * parser.c (cp_parser_class_head): Reject function template ids.
3784 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3785 when processing_template_decl to build_array_type.
3788 * pt.c (more_specialized_fn): Don't segfault if one or
3789 both argument list end with ellipsis.
3791 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3794 * semantics.c (finish_call_expr): Set
3795 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3796 or OVERLOAD with all noreturn functions.
3798 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3801 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3804 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3811 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3812 set to error_mark_node the outermost POINTER_TYPE to the pack if
3813 it is seen in a POINTER_TYPE.
3814 (push_template_decl_real): If check_for_bare_parameter_packs
3815 fails for function return type, set the return type to
3816 integer_type_node. If check_for_bare_parameter_packs failed
3817 for non-function, return error_mark_node.
3820 * call.c (build_new_op): Call resolve_args before calling
3823 2007-11-11 Tom Tromey <tromey@redhat.com>
3826 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3828 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3831 * pt.c (redeclare_class_template): Update error message. Use a
3832 note to show the previous declaration.
3833 (tsubst_friend_class): Use the location of the friend template as
3834 the input location before calling redeclare_class_template.
3836 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3839 * semantics.c (finish_pseudo_destructor_expr): Handle
3840 object == error_mark_node.
3842 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3845 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3846 is not scalar type, let finish_class_member_access_expr handle
3847 diagnostics. Pass BIT_NOT_EXPR argument to
3848 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3850 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3853 * decl.c (cp_complete_array_type): If any of the initializer
3854 elements are pack expansions, don't compute the array size yet.
3856 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3859 * tree.c (decl_linkage): Fields have no linkage.
3861 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3863 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3865 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3870 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3871 Be careful with ERROR_MARK_NODEs.
3872 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3875 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3878 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3881 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3885 * tree.c (c_build_qualified_type): Define bridge to
3886 cp_build_qualified_type.
3888 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3899 * typeck.c (check_return_expr): Pass address of retval to
3900 check_for_bare_parameter_packs.
3901 * class.c (build_base_field): Tolerate bases that have no layout
3903 (end_of_base): Ditto.
3904 * tree.c (canonical_type_variant): Be careful with
3906 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3908 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3909 which states whether parameter packs should be replaced with
3911 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3912 possible. If set_packs_to_error is set true, replace the parameter
3913 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3914 (uses_parameter_packs): Don't set parameter packs to
3916 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3917 which may be modified (if it is a parameter pack). Instructs
3918 find_parameter_packs_r to replace parameter packs with
3919 ERROR_MARK_NODE (so that they won't cause errors later on).
3920 (process_template_parm): Pass pointer to
3921 check_for_bare_parameter_packs.
3922 (process_partial_specialization): Replace pack expansions before
3923 the end of the template argument list with ERROR_MARK_NODE.
3924 (push_template_decl_real): Pass pointer to
3925 check_for_bare_parameter_packs. Replace parameter packs not at the
3926 end of the template parameter list with ERROR_MARK_NODE.
3927 (convert_template_argument): Be more careful about using DECL_NAME
3928 on only declarations.
3929 (unify): Can't unify against ERROR_MARK_NODE.
3930 * semantics.c (finish_cond): Pass pointer to
3931 check_for_bare_parameter_packs.
3932 (finish_expr_stmt): Ditto.
3933 (finish_for_expr): Ditto.
3934 (finish_switch_cond): Pass pointer to
3935 check_for_bare_parameter_packs, and call it before we put the
3936 condition into the statement.
3937 (finish_mem_initializers): Pass pointer to
3938 check_for_bare_parameter_packs.
3939 (finish_member_declaration): Ditto.
3940 * parser.c (cp_parser_base_clause): Ditto.
3942 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3945 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3946 with the final TREE_READONLY flag in place. processing_template_decl
3947 is known to be 0 in this part of function.
3950 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3951 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3952 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3953 * semantics.c (finish_omp_atomic): Revert most of the
3954 2007-02-05 changes, just keep the new representation of
3955 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3957 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3960 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3963 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3968 * typeck.c (merge_types): Don't lose rvalue references when
3970 * call.c (build_over_call): Don't elide move constructors just
3971 because the copy constructor is trivial (!).
3972 (compare_ics): If comparing cv-qualifiers fails, we can still order
3973 based on binding lvalues vs. rvalues.
3975 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3978 * pt.c (unify_pack_expansion): bring handling of function call
3979 arguments into line with type_unification_real.
3981 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3983 * typeck.c (build_binary_op): Use pedwarn instead of error for
3986 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3989 * parser.c (cp_parser_unary_expression): For &&label call
3990 cp_parser_non_integral_constant_expression and return error_mark_node
3991 if it returned true.
3994 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3995 is neither FUNCTION_TYPE nor METHOD_TYPE.
3997 2007-11-02 Jakub Jelinek <jakub@redhat.com>
4000 * parser.c (cp_parser_nested_name_specifier_opt): Use
4001 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
4002 typedef of currently open class.
4004 2007-11-02 Paolo Carlini <pcarlini@suse.de>
4007 * error.c (dump_expr): Deal specially with statements.
4009 2007-11-01 Jason Merrill <jason@redhat.com>
4012 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
4014 (lookup_template_class): Use it to get the outer template args
4015 for instantiating one.
4018 * pt.c (reduce_template_parm_level): tsubst the parameters
4019 of a template template parm.
4021 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
4024 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
4026 2007-11-01 Jakub Jelinek <jakub@redhat.com>
4029 * parser.c (cp_parser_postfix_dot_deref_expression): If
4030 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
4031 first and if that succeeds and type is SCALAR_TYPE_P, create
4035 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
4036 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
4037 as for std::type_info.
4039 2007-10-31 Paolo Carlini <pcarlini@suse.de>
4042 * cxx-pretty-print.c (pp_cxx_typeid_expression,
4043 pp_cxx_delete_expression): Change to static linkage.
4044 * cxx-pretty-print.h: Adjust declarations.
4045 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
4046 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
4047 MODOP_EXPR): Forward to pp_expression.
4049 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
4052 2007-10-31 Christian Bruel <christian.bruel@st.com>
4053 Mark Mitchell <mark@codesourcery.com>
4056 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
4057 if retval is volatile.
4059 2007-10-30 Jakub Jelinek <jakub@redhat.com>
4062 * decl2.c (build_offset_ref_call_from_tree): Call
4063 build_non_dependent_expr on object prior to building ADDR_EXPR from it
4064 if FN is DOTSTAR_EXPR.
4066 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
4070 * pt.c (find_parameter_packs_r): Fix typo in comment.
4071 (convert_template_argument): Look at the pattern of a pack
4072 expansion to determine what kind of entity we're converting.
4073 (coerce_template_parameter_pack): When we have coerced a non-type
4074 template parameter pack, substitute into the type of that pack.
4075 (tsubst_pack_expansion): When our substitution of a parameter pack
4076 is a "trivial" substitution of itself, just substitute into the
4077 pack expansion rather than actually expanding.
4079 2007-10-29 Jakub Jelinek <jakub@redhat.com>
4082 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
4083 for non-integral type bitfields. Return true if bitfield is correct, false
4084 error has been diagnosed.
4085 (check_field_decls): If check_bitfield_decl returned false, call also
4088 2007-10-28 Paolo Carlini <pcarlini@suse.de>
4089 Mark Mitchell <mark@codesourcery.com>
4092 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4093 class member error out and return.
4095 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4097 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4098 to current_function_decl rather than 0.
4101 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4103 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4105 2007-10-27 Jason Merrill <jason@redhat.com>
4108 * call.c (convert_default_arg): Detect recursion.
4110 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4113 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4114 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4116 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4118 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4120 2007-10-26 Jason Merrill <jason@redhat.com>
4123 * pt.c (get_template_info): New fn.
4124 (template_class_depth): Use it.
4125 (push_template_decl_real): Check that the template args of the
4126 definition match the args of the previous declaration.
4128 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4131 * decl2.c (coerce_new_type): Do not allow a default argument for
4132 the first parameter.
4134 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4137 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4138 don't see the leading '('. Only lookup names if we get an
4141 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4144 * parser.c (cp_parser_parenthesized_expression_list): Set
4145 greater_than_is_operator_p to true in between the parens.
4147 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4150 * decl.c (grokdeclarator): In case of conflicting specifiers
4151 just return error_mark_node.
4153 2007-10-26 Ollie Wild <aaw@google.com>
4155 * expr.c (cxx_expand_expr): Removed.
4156 * cp-tree.h (exx_expand_expr): Removed.
4157 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4160 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4163 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4165 2007-10-23 Jason Merrill <jason@redhat.com>
4167 PR c++/25950 (DR 391)
4168 * call.c (struct conversion): Remove check_copy_constructor_p.
4169 (reference_binding): Always bind a reference directly to a
4170 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4172 (check_constructor_callable): Remove.
4173 (convert_like_real): Don't call it.
4174 (initialize_reference): Don't call check_constructor_callable.
4175 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4176 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4177 conversions if LOOKUP_NO_TEMP_BIND.
4178 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4179 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4181 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4183 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4186 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4187 before checking if its type is integral.
4189 2007-10-22 Jason Merrill <jason@redhat.com>
4192 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4193 * pt.c (apply_late_template_attributes): Splice out dependent
4194 attributes from DECL_ATTRIBUTES.
4196 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4198 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4200 * typeck.c (build_binary_op) : Use appropriate warning option
4201 instead of unnamed warning.
4203 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4206 * pt.c (current_template_args): Do not change TREE_LIST elements
4207 with a TREE_VALUE of error_mark_node.
4209 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4211 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4212 * decl.c (start_decl): Tidy.
4213 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4215 (grokdeclarator): Clarify comment.
4217 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4220 * decl.c (grokfndecl): Return NULL after the "definition of
4221 implicitly-declared" error happened.
4223 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4226 * call.c (build_user_type_conversion_1): Do not consider conversion
4227 functions to convert a (possibly cv-qualified) object to the (possibly
4228 cv-qualified) same object type (or a reference to it), to a (possibly
4229 cv-qualified) base class of that type (or a reference to it).
4231 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4233 * pt.c (tsubst): Use template_parm_level_and_index.
4235 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4238 * parser.c (cp_parser_compound_statement): Handle label-declarations
4239 at the beginning of the compound statement.
4240 (cp_parser_block_declaration): Issue diagnostics about __label__
4241 not at the beginning of a block.
4243 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4246 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4247 to convert_template_argument.
4248 (coerce_template_parms): Return error_mark_node after fixed-length
4250 (tsubst_decl): Check for error_mark_node the return value of the
4251 first tsubst in 'case VAR_DECL'.
4253 2007-10-08 Ollie Wild <aaw@google.com>
4255 * typeck2.c (digest_init): Call cplus_expand_constant after
4256 convert_for_initialization.
4257 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4258 * expr.c (cplus_expand_constant): Updated function description.
4260 2007-10-04 Jason Merrill <jason@redhat.com>
4263 * call.c (initialize_reference): Handle local static reference
4266 2007-10-03 Jason Merrill <jason@redhat.com>
4269 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4270 (push_namespace): Here.
4271 (handle_namespace_attrs): New fn for the attr code.
4272 (leave_scope): Don't pop_visibility.
4273 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4274 * parser.c (cp_parser_namespace_definition): Call
4275 handle_namespace_attrs and pop_visibility as appropriate.
4278 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4280 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4282 * decl.c (duplicate_decls): Preserve linkage flags for mere
4283 redeclarations of gnu_inline definitions.
4285 2007-10-03 Jason Merrill <jason@redhat.com>
4288 * decl.c (wrap_cleanups_r): New fn.
4289 (wrap_temporary_cleanups): New fn.
4290 (initialize_local_var): Call it.
4292 2007-09-29 Jason Merrill <jason@redhat.com>
4295 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4296 constant to not have DECL_EXTERNAL if it's file-local.
4298 2007-09-28 Ollie Wild <aaw@google.com>
4301 2007-09-27 Ollie Wild <aaw@google.com>
4303 * typeck2.c (digest_init): Call cplus_expand_constant after
4304 convert_for_initialization.
4305 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4306 * expr.c (cplus_expand_constant): Updated function description.
4308 2007-09-28 Jason Merrill <jason@redhat.com>
4311 * class.c (layout_empty_base): Take rli parameter, update
4312 rli->record_align if empty base has user-specified alignment.
4313 (build_base_field): Pass rli to it.
4315 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4318 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4320 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4323 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4324 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4325 (dump_parameters): Just call dump_type for argument packs too.
4327 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4330 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4331 qualification by creating qualified PACK_EXPANSION_PATTERN and
4332 then calling make_pack_expansion on it.
4334 2007-09-27 Ollie Wild <aaw@google.com>
4336 * typeck2.c (digest_init): Call cplus_expand_constant after
4337 convert_for_initialization.
4338 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4339 * expr.c (cplus_expand_constant): Updated function description.
4341 2007-09-27 Jason Merrill <jason@redhat.com>
4344 * decl2.c (is_late_template_attribute): Don't crash on unknown
4347 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4350 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4351 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4352 spaces in the formatting.
4353 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4355 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4357 * error.c (cxx_print_error_function): Add third argument, pass
4358 it over to lhd_print_error_function.
4359 (cp_print_error_function): If diagnostic->abstract_origin, print
4361 * cp-tree.h (struct diagnostic_info): New forward decl.
4362 (cxx_print_error_function): Add third argument.
4364 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4367 * name-lookup.c (pushtag): Do not create an implicit typedef before
4368 the associated type declaration is known to be valid.
4370 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4372 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4373 rather than pointers.
4375 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4378 * search.c (check_final_overrider): Fail if
4379 targetm.comp_type_attributes returns 0.
4381 2007-09-24 Jason Merrill <jason@redhat.com>
4384 * pt.c (resolve_typename_type): Don't look things up in the original
4385 template if it would mean losing template arguments.
4387 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4390 * cp-tree.h (cxx_type_hash_eq): New prototype.
4391 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4392 * tree.c (cxx_type_hash_eq): New function.
4394 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4397 * tree.c (cp_build_qualified_type_real): Build a canonical
4398 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4400 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4404 * tree.c (cplus_array_compare): Compare pointers, not types.
4405 (build_cplus_array_type_1): Store new array type into the hash
4406 table before building the canonical type; build the canonical type
4408 (cp_build_qualified_type_real): Put all of the array types with
4409 cv-qualified element types into the C++ array hash table, built as
4410 variants of the unqualified versions.
4412 2007-09-23 Jason Merrill <jason@redhat.com>
4415 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4416 for deprecation warnings.
4418 2007-09-22 Jason Merrill <jason@redhat.com>
4421 * call.c (build_over_call): Warn about deprecated virtuals.
4424 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4425 (MAYBE_TAGGED_TYPE_P): Remove.
4426 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4427 instead of calling is_late_template_attribute again.
4428 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4429 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4430 Don't crash on typedefs from non-template classes.
4431 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4432 (is_late_template_attribute): All attributes applied to template
4433 parms or typename types are dependent. Static.
4434 (splice_template_attributes): Pass decl through.
4435 (save_template_attributes): Likewise.
4437 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4440 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4441 returned from tsubst_pack_expansion.
4442 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4443 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4445 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4448 * semantics.c (finish_id_expression): Use consistently
4449 context_for_name_lookup.
4450 * decl.c (fixup_anonymous_aggr): Fix error message for
4451 anonymous struct (vs union).
4453 2007-09-19 Jason Merrill <jason@redhat.com>
4456 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4457 (retrieve_specialization): Only tagged types use
4458 DECL_TEMPLATE_INSTANTIATIONS.
4459 (instantiate_class_template): Push nested classes too.
4460 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4462 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4463 * init.c (is_aggr_type): Remove redundant tests.
4464 * class.c (push_nested_class): Use CLASS_TYPE_P.
4466 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4469 * init.c (build_zero_init): If, recursively, build_zero_init
4470 returns a NULL_TREE, do not append it to the VEC of constructors.
4472 2007-09-18 Jason Merrill <jason@redhat.com>
4475 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4476 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4477 ATTR_FLAG_TYPE_IN_PLACE.
4478 (tsubst): Do unqualified lookup to find typedefs from current class.
4479 [ARRAY_TYPE]: Propagate alignment info.
4480 * decl2.c (is_late_template_attribute): Only defer handling of
4481 attribute aligned if the expression is dependent.
4482 (save_template_attributes): If we're deferring any attributes,
4483 make this a naming typedef.
4485 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4487 PR c++/33462 (again)
4488 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4489 va_arg instead of __builtin_va_arg.
4491 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4494 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4495 (pp_cxx_primary_expression): Use it.
4496 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4497 * error.c (dump_expr): Use it.
4499 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4502 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4503 out case TYPEID_EXPR to...
4504 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4505 and pp_cxx_right_paren.
4506 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4507 * error.c (dump_expr): Use it.
4509 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4512 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4513 (pp_cxx_primary_expression): Use it.
4514 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4515 * error.c (dump_expr): Use it.
4517 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4520 * init.c (build_new): Remove warning for zero-element
4523 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4526 * call.c (maybe_handle_implicit_object): Set this_p, clear
4527 rvaluedness_matches_p.
4528 (compare_ics): Do not compare rvaluedness matching when one of the
4529 operands is an implicit object.
4531 2007-09-14 Jason Merrill <jason@redhat.com>
4533 PR c++/17743, c++/19163
4534 * decl2.c (is_late_template_attribute): New fn.
4535 (splice_template_attributes, save_template_attributes): New fns.
4536 (cplus_decl_attributes): Call save_template_attributes.
4537 * pt.c (apply_late_template_attributes): New fn.
4538 (instantiate_class_template, tsubst_decl): Use it.
4539 * cp-tree.h: Declare is_late_template_attribute.
4541 2007-09-13 Tom Tromey <tromey@redhat.com>
4543 * parser.c (cp_lexer_new_main): Don't use
4544 c_lex_return_raw_strings.
4545 (cp_lexer_get_preprocessor_token): Update. Add special case when
4548 2007-09-11 Jan Hubicka <jh@suse.cz>
4550 * method.c (use_thunk): Use tree_rest_of_compilation
4551 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4552 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4553 * cp-tree.h (expand_body): Kill.
4554 (emit_associated_thunks): Declare.
4555 * semantics.c (emit_associated_thunks): Export.
4556 (expand_body): Kill.
4558 2007-09-09 David Daney <ddaney@avtrex.com>
4561 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4562 to calculate cookie_ptr.
4564 2007-09-08 Jason Merrill <jason@redhat.com>
4567 * pt.c (most_specialized_class): Set processing_template_decl
4568 while tsubsting partial spec args.
4570 2007-09-06 Jason Merrill <jason@redhat.com>
4572 * decl2.c (get_guard): Copy visibility from the guarded variable.
4574 2007-09-06 Jan Hubicka <jh@suse.cz>
4576 * semantics.c (expand_body): Do not mark arguments of clones used.
4578 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4581 * decl.c (cp_finish_decl): When processing_template_decl,
4582 deal correctly with init as TREE_LIST.
4584 2007-09-06 Tom Tromey <tromey@redhat.com>
4586 * decl.c (finish_function): Put return's location on line zero of
4589 2007-09-05 Jason Merrill <jason@redhat.com>
4592 * except.c (prepare_eh_type): Use type_decays_to.
4595 * init.c (build_delete): Use build_headof to get the address of the
4596 complete object if we aren't using the deleting destructor.
4597 * rtti.c (build_headof): No longer static.
4598 * cp-tree.h: Declare it.
4600 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4602 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4603 decl if a prototype for XX is provided with throw().
4606 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4607 on __*_chk non-__builtin_* decls.
4609 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4612 * semantics.c (finish_id_expression): Use context_for_name_lookup
4613 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4614 * class.c (finish_struct_anon): Deal correctly with anonymous
4615 structs (vs unions, as GNU extension) in error messages.
4617 2007-09-05 Jan Hubicka <jh@suse.cz>
4619 * sematics.c (expand_body): Remove unnecesary import_export_decl
4620 call, DECL_EXTERNAL checks and current_function_decl saving.
4622 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4624 PR c++/29731 (again)
4625 * parser.c (cp_parser_primary_expression): Return error_mark_node
4626 when a statement-expression is found in a template-argument list.
4628 2007-09-04 Jason Merrill <jason@redhat.com>
4630 * except.c (initialize_handler_parm): Use
4631 fold_build_cleanup_point_expr.
4634 * call.c (reference_binding): Don't look for user-defined conversions
4638 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4639 the MUST_NOT_THROW_EXPR.
4641 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4643 * decl.c (cp_finish_decl): Call determine_visibility before
4644 make_rtl_for_nonlocal_decl.
4646 2007-09-04 Jason Merrill <jason@redhat.com>
4649 * pt.c (most_specialized_class): Substitute outer template
4650 arguments into the arguments of a member template partial
4652 (strip_innermost_template_args): New fn.
4654 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4656 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4658 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4660 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4661 * decl.c (cp_make_fname_decl): Likewise,
4662 * parser.c (cp_parser_string_literal): Likewise,
4663 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4664 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4667 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4670 * typeck.c (build_unary_op): Fix error message for
4671 Boolean expression as operand to operator--.
4673 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4675 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4676 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4679 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4682 * init.c (build_default_init): Make extern.
4683 * cp-tree.h (build_default_init): Declare here.
4684 * pt.c (tsubst_expr): When the instantiation of the initializer of
4685 a variable results in an empty list, default-initialize the
4687 (tsubst_copy_and_build): When the instantiation of the initializer
4688 in a new expression results in an empty initializer list,
4689 default-initialize it.
4691 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4693 * mangle.c (write_type): Change mangling of rvalue reference from
4696 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4698 * decl.c (duplicate_decls): Remove duplicated line.
4700 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4703 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4704 BOUND_TEMPLATE_TEMPLATE_PARM.
4706 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4709 * search.c (lookup_member): Check the name argument for
4712 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4715 * parser.c (cp_parser_trait_expr): Check rerurn value of
4718 2007-08-30 Ollie Wild <aaw@google.com>
4720 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4721 convert_ptrmem for pointer to member conversions.
4722 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4723 (ocp_convert): Update cp_convert_to_pointer call.
4724 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4726 (build_static_cast_1): Check can_convert for conversions in either
4728 (get_delta_difference_1): New function.
4729 (get_delta_difference): Refactor to call get_delta_difference_1.
4731 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4733 * decl.c (start_preparsed_function): Set
4734 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4736 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4739 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4740 BOUND_TEMPLATE_TEMPLATE_PARM.
4742 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4746 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4747 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4749 2007-08-27 Jason Merrill <jason@redhat.com>
4752 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4753 Look inside STMT_EXPR.
4754 * semantics.c (stmt_expr_value_expr): New fn.
4755 * cp-tree.h: Declare it.
4758 * decl.c (groktypename): Ignore attributes applied to class type.
4760 2007-08-28 Richard Guenther <rguenther@suse.de>
4762 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4764 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4766 * error.c (dump_expr): Handle COMPLEX_CST.
4767 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4768 (pp_cxx_expression): Likewise.
4770 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4772 * decl.c (GNU_INLINE_P): New.
4773 (duplicate_decls): Handle gnu_inline. Merge attributes and
4774 some flags in overriding definitions.
4775 (redeclaration_error_message): Handle gnu_inline.
4776 (start_preparsed_function): Likewise.
4778 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4780 * call.c (sufficient_parms_p): Constify.
4781 * class.c (same_signature_p): Likewise.
4782 * cp-gimplify.c (is_invisiref_parm,
4783 cxx_omp_privatize_by_reference): Likewise.
4784 * cp-objcp-common.c (has_c_linkage): Likewise.
4785 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4786 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4787 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4788 num_artificial_parms_for, comp_template_parms,
4789 template_parameter_pack_p, any_dependent_template_arguments_p,
4790 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4791 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4792 zero_init_p, member_p, cp_lvalue_kind,
4793 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4794 varargs_function_p, is_dummy_object, special_function_kind,
4795 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4796 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4797 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4798 cp_has_mutable_p, at_least_as_qualified_p,
4799 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4800 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4801 * except.c (nothrow_libfn_p): Likewise.
4802 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4804 * pt.c (comp_template_parms, template_parameter_pack_p,
4805 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4806 any_dependent_template_arguments_p): Likewise.
4807 * repo.c (repo_export_class_p): Likewise.
4808 * semantics.c (anon_aggr_type_p): Likewise.
4809 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4810 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4811 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4812 zero_init_p, special_function_p): Likewise.
4813 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4814 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4815 compparms, invalid_nonstatic_memfn_p,
4816 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4817 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4818 cp_has_mutable_p, lvalue_or_else): Likewise.
4820 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4822 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4823 * cp-objcp-common.c (cp_tree_size): Ditto.
4824 * tree.c (cp_walk_subtrees): Ditto
4825 * cp-tree.def (TINST_LEVEL): Go away.
4826 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4827 move together with other non-tree structs.
4828 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4829 (union lang_tree_node): Eliminate tinst_level field.
4830 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4831 (current_instantiation, outermost_tinst_level): Return
4832 a "struct tinst_level *".
4834 * error.c (print_instantiation_partial_context): Change second
4835 parameter to a "struct tinst_level *". Replace accessor macros
4837 (print_instantiation_full_context): Likewise.
4838 * lex.c (in_main_input_context): Likewise.
4840 * pt.c (struct pending_templates): New.
4841 (pending_templates, last_pending_template): Use it as a type.
4842 (current_tinst_level): Change typo to "struct tinst_level *"
4843 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4844 (add_pending_template): Construct a "struct pending_template".
4845 Replace TINST_LEVEL accessor macros with field access.
4846 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4847 (pop_tinst_level): Likewise.
4848 (instantiate_pending_templates): Likewise. Factor common code used
4849 when an instantiation has been done.
4850 (outermost_tinst_level): Replace tree_last with loop.
4851 (current_instantiation): Return a "struct tinst_level *".
4853 2007-08-24 Ollie Wild <aaw@google.com>
4855 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4856 * name-lookup.h (cp_binding_level): Remove vtables member.
4858 2007-08-24 Richard Guenther <rguenther@suse.de>
4860 * tree.c (cp_cannot_inline_tree_fn): Remove.
4861 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4862 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4865 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4868 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4869 error_mark_node right away if build_expr_type_conversion
4873 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4874 is error_mark_node rather than NULL_TREE.
4875 * pt.c (check_explicit_specialization): Likewise.
4878 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4879 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4881 2007-08-22 Jason Merrill <jason@redhat.com>
4884 * pt.c (outermost_tinst_level): New function.
4885 * lex.c (in_main_input_context): New function.
4886 * cp-tree.h: Declare it.
4887 * decl2.c (constrain_class_visibility): Use it to avoid warning
4888 about uses of the anonymous namespace in the main input file.
4890 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4892 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4894 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4897 * class.c (finish_struct_1): Warn when a class has virtual
4898 functions and accessible non-virtual destructor.
4900 2007-08-20 Richard Guenther <rguenther@suse.de>
4904 * call.c (build_new_method_call): Convert initializer to
4906 * init.c (build_aggr_init): Do not fiddle with types.
4907 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4908 * except.c (build_throw): Do not drop qualifiers for the
4910 * typeck.c (get_member_function_from_ptrfunc): Do not
4911 fiddle with types, instead convert.
4912 (build_ptrmemfunc1): Convert to the target type for
4914 (gfc_trans_allocate): Convert result to target type.
4915 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4916 pointer-to-member structures shall have alias set zero as well.
4918 2007-08-20 Richard Guenther <rguenther@suse.de>
4920 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4922 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4923 (nonstatic_local_decl_p): Likewise.
4924 * tree.c (cp_auto_var_in_fn_p): Remove.
4925 * decl.c (nonstatic_local_decl_p): Remove.
4927 2007-08-20 Richard Guenther <rguenther@suse.de>
4929 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4931 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4932 cp_walk_subtrees lh parameter.
4933 (cp_walk_tree_without_duplicates): New define to
4934 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4935 * tree.c (count_trees): Call
4936 cp_walk_tree_without_duplicates.
4937 (verify_stmt_tree): Call cp_walk_tree.
4938 (break_out_target_exprs): Likewise.
4939 (WALK_SUBTREE): Likewise.
4940 * cp-gimplify.c (cp_genericize): Likewise.
4941 * cp-pt.c (find_parameter_packs_r): Likewise.
4942 (uses_parameter_packs): Likewise.
4943 (make_pack_expansion): Likewise.
4944 (check_for_bare_parameter_packs): Likewise.
4945 (for_each_template_parm): Likewise.
4946 * decl.c (check_default_argument): Call
4947 cp_walk_tree_without_duplicates.
4948 * except.c (build_throw): Likewise.
4949 * decl2.c (type_visibility): Likewise.
4950 * semantics.c (expand_or_defer_fn): Likewise.
4951 (finalize_nrv): Call cp_walk_tree.
4953 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4956 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4957 Initialize it with save_expr rather than get_temp_regvar.
4959 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4962 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4965 2007-08-17 Ollie Wild <aaw@google.com>
4968 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4969 declarations into appropriate slots for comparison. Fix type
4972 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4975 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4976 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4978 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4981 * parser.c (cp_parser_class_head): Improve error message.
4983 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4985 * pt.c (instantiate_decl): Set input_location
4986 for the function end.
4988 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4990 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4992 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4993 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4994 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4995 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4996 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4997 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4998 * typeck.c (cp_type_quals): Likewise.
4999 * typeck2.c (cxx_incomplete_type_diagnostic,
5000 cxx_incomplete_type_error): Likewise.
5002 2007-08-16 Paolo Carlini <pcarlini@suse.de>
5005 * pt.c (tsubst_friend_function): When check_classfn
5006 returns error_mark_node likewise return it.
5008 2007-08-15 Jakub Jelinek <jakub@redhat.com>
5011 * typeck.c (check_return_expr): Don't NRV optimize vars in
5013 * decl.c (finish_function): Comment fix.
5015 2007-08-15 Paolo Carlini <pcarlini@suse.de>
5018 * pt.c (push_template_decl_real): Depending on TYPE_P
5019 use either TYPE_CONTEXT or DECL_CONTEXT.
5021 2007-08-14 Mark Mitchell <mark@codesourcery.com>
5023 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
5024 constructors and destructors return this.
5026 2007-08-14 Paolo Carlini <pcarlini@suse.de>
5029 * decl2.c (check_classfn): Return error_mark_node in case of error;
5030 in that case, do not call add_method.
5031 * decl.c (start_decl): Deal with check_classfn returning
5033 (grokfndecl): Likewise.
5034 * pt.c (tsubst_friend_function): Likewise.
5036 2007-08-14 Andrew Pinski <pinskia@gmail.com>
5039 * typeck.c (build_binary_op): Disallow vector float types with
5040 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
5042 2007-08-11 Ian Lance Taylor <iant@google.com>
5044 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
5046 * cp-tree.h (cxx_get_alias_set): Update declaration.
5048 2007-08-10 Ollie Wild <aaw@google.com>
5050 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
5052 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
5054 (unqualified_namespace_lookup): Fix ambiguous_decl call.
5055 (lookup_using_namespace): Fix ambiguous_decl call.
5056 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
5058 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5060 * call.c (name_as_c_string): Use CONST_CAST.
5061 * decl.c (build_decl): Likewise.
5062 * parser.c (cp_parser_string_literal): Likewise.
5064 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5067 * error.c (dump_expr): Consistently use the *_cxx_*
5068 variants of the pretty-print functions.
5070 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5073 * decl.c (check_special_function_return_type): Just error
5074 on return type specified for conversion operator.
5076 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
5078 * typeck2.c (readonly_error): Handle general expressions.
5079 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
5081 2007-08-06 Dan Hipschman <dsh@google.com>
5083 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
5084 access function name.
5086 2007-08-04 Alfred Minarik <a.minarik@aon.at>
5089 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
5090 * g++spec.c (lang_specific_driver): Check them.
5092 2007-08-06 Paolo Carlini <pcarlini@suse.de>
5095 * pt.c (inline_needs_template_parms): Fix comment; change return type
5098 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
5101 2007-03-26 Dirk Mueller <dmueller@suse.de>
5103 * parser.c (cp_parser_member_declaration): Pedwarn
5104 about stray semicolons after member declarations.
5106 2007-08-02 Lee Millward <lee.millward@gmail.com>
5111 * parser.c (cp_parser_asm_definition): Detect and discard asm
5112 statements with invalid inputs or outputs.
5113 (cp_parser_asm_operand_list): Return error mark node if any
5114 of the operands are invalid. Adjust documentation.
5116 2007-08-02 Nick Clifton <nickc@redhat.com>
5118 * typeck.c: Change copyright header to refer to version 3 of the
5119 GNU General Public License and to point readers at the COPYING3
5120 file and the FSF's license web page.
5121 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5122 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5123 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5124 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5125 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5126 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5127 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5128 name-lookup.h, parser.c: Likewise.
5130 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5133 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5135 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5138 * semantics.c (finish_label_stmt): Reject the __label__
5139 extension outside function scopes.
5141 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5143 * parser.c (eof_token): Un-constify.
5144 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5145 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5148 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5150 * pt.c, tree.c, typeck2.c: Fix comment typos.
5152 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5153 Mark Mitchell <mark@codesourcery.com>
5156 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5157 hidden due to friend declarations in local classes.
5159 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5161 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5162 * cp-tree.def (DECLTYPE_TYPE): New.
5163 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5164 (dump_type_prefix): Ditto.
5165 (dump_type_suffix): Ditto.
5166 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5167 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5168 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5170 (DECLTYPE_TYPE_EXPR): New.
5171 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5172 (finish_declared_type): Declare.
5173 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5174 DECLTYPE_TYPE nodes.
5175 (pp_cxx_type_id): Ditto.
5176 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5177 (tsubst): Substitute into a DECLTYPE_TYPE node.
5178 (tsubst_copy): Ditto.
5179 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5181 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5182 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5183 structural equality (because we can't hash the expressions).
5184 (finish_declared_type): New.
5185 * lex.c (reswords): Add "decltype" keyword.
5186 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5187 (cp_parser_postfix_expression): Add member_access_only_p to
5188 restrict postfix expression to member access expressions.
5189 (cp_parser_unary_expression): Update call to
5190 cp_parser_postfix_expression to reflect new parameter.
5191 (cp_parser_declared_type): New.
5192 (cp_parser_simple_type_specifier): Parse decltype types.
5194 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5197 * call.c (convert_for_arg_passing): Only widen bitfields to their
5198 declared types if necessary.
5200 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5202 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5205 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5207 * decl.c (typename_hash, typename_compare): Constify.
5208 * mangle.c (hash_type, compare_type): Likewise.
5209 * pt.c (eq_local_specializations, hash_local_specialization):
5211 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5212 list_hash): Likewise.
5213 * typeck2.c (pat_compare): Likewise.
5215 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5217 * method.c (implicitly_declare_fn): Increase alignment if member
5218 function pointer format requires it.
5220 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5223 * typeck.c (check_return_expr): Do not pass a null argument
5226 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5229 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5232 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5235 * typeck.c (convert_arguments): Only use default args if we have
5239 * typeck.c (structural_comptypes): No need to check
5240 resolve_typename_type return value here.
5241 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5242 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5243 original type rather than error_mark_node in case of failure.
5244 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5245 resolve_typename_type result check.
5246 (cp_parser_direct_declarator, cp_parser_head,
5247 cp_parser_constructor_declarator_p): Likewise.
5249 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5251 * pt.c (template_parms_variadic_p): Remove.
5252 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5254 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5257 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5258 argument to dump_aggr_init_expr_args instead of false.
5260 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5262 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5263 canonical types; otherwise, fall back to structural type
5264 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5265 internal compiler error if the canonical types are wrong.
5267 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5270 * parser.c (cp_parser_make_indirect_declarator): When the
5271 the code argument is ERROR_MARK return cp_error_declarator.
5273 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5276 * decl.c (cxx_init_decl_processing): Don't set
5277 force_align_functions_log.
5278 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5279 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5280 FUNCTION_DECL, return its alignment.
5282 2007-07-09 Richard Guenther <rguenther@suse.de>
5284 * decl.c (start_preparsed_function): Do not promote return type.
5286 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5289 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5291 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5294 * pt.c (resolve_overloaded_unification): Robustify. Return a
5296 (type_unification_real): Adjust accordingly.
5298 2007-07-06 Richard Guenther <rguenther@suse.de>
5300 * init.c (build_new_1): Use the correct pointer type.
5301 * typeck2.c (build_m_component_ref): Likewise.
5303 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5306 * init.c (build_zero_init): Always build an initializer for
5308 * typeck2.c (build_functional_cast): Use build_zero_init.
5311 * init.c (build_new_1): Always pass the allocation function to
5312 build_op_delete_call.
5313 * call.c (build_op_delete_call): Handle operator delete with a
5314 variable-argument list. Do not issue an error when no matching
5315 deallocation function is available for a new operator.
5318 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5319 * decl.c (value_dependent_init_p): New function.
5320 (cp_finish_decl): Use it.
5321 * pt.c (value_dependent_expression_p): Use
5322 any_value_dependent_elements_p.
5323 * parser.c (cp_parser_primary_expression): Add comment about
5324 treating dependent qualified names as integral
5325 constant-expressions.
5327 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5329 * decl.c (build_ptrmemfunc_type): Always use structural equality
5330 tests when comparing pointer-to-member-function types, because the
5331 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5334 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5336 * init.c (build_new): Tweak comment.
5338 2007-06-29 Dave Brolley <brolley@redhat.com>
5341 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5342 type to its base type and number of elements here.
5343 * init.c (build_new): Call complete_type_or_else to ensure that the
5344 type is complete and to issue a diagnostic if it is not.
5345 (build_new_1): Don't call complete_type_or_else here.
5347 2007-07-03 Richard Guenther <rguenther@suse.de>
5350 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5353 2007-07-02 Simon Baldwin <simonb@google.com>
5355 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5356 for inner-style nested forward declarations that don't declare
5359 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5362 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5363 DECL_P in not a variable and appears more than once error messages.
5365 2007-07-01 Ollie Wild <aaw@google.com>
5367 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5368 (select_decl): Remove function.
5369 (unqualified_namespace_lookup): Populate binding by calling
5370 ambiguous_decl. Remove select_decl call.
5371 (lookup_qualified_name): Remove select_decl call.
5372 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5373 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5374 generation when name lookup is ambiguous.
5376 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5379 * init.c (build_new_1): Use structural equality on the copy of the
5382 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5384 * decl2.c (determine_visibility): Implement
5385 flag_visibility_ms_compat effect on type info.
5386 * decl.c (cxx_init_decl_processing): Implement
5387 global effect of flag_visibility_ms_compat.
5389 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5391 * decl2.c (start_objects): Mark constructor-running function
5394 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5397 * decl.c (grokdeclarator): Reset friendp for member functions declared
5398 friend of their own class.
5400 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5402 * decl2.c (determine_visibility): Don't look for dllexport here.
5403 (determine_visibility_from_class): Tidy.
5405 2007-06-18 Simon Baldwin <simonb@google.com>
5408 * parser.c (cp_parser_single_declaration): Added check for storage
5409 class other than sc_none in parsed declaration, and a flag to indicate
5410 if the call is part of an explicit template specialization parse.
5411 * (cp_parser_explicit_specialization): Specialization check flag added
5412 to call to cp_parser_single_declaration(), set true.
5413 * (cp_parser_template_declaration_after_export): Specialization check
5414 flag added to call to cp_parser_single_declaration(), set false.
5415 * pt.c (check_explicit_specialization): Added code to copy visiblity
5416 and linkage from the templated function to the explicit specialization.
5418 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5420 * typeck.c (build_binary_op): For templates build the
5421 expression in pieces to avoid the assert in build2_stat.
5422 (get_member_function_from_ptrfunc):
5423 Change over to using POINTER_PLUS_EXPR and convert
5424 the second operand to sizetype.
5425 * typeck2.c (build_m_component_ref): Likewise.
5426 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5427 instead of PLUS_EXPR for pointers.
5428 (build_new_1): Likewise.
5429 (build_vec_delete_1): Likewise.
5430 (build_vec_delete): Likewise.
5431 * class.c (build_base_path): Likewise.
5432 (build_base_path): Likewise.
5433 (convert_to_base_statically): Likewise.
5434 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5435 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5436 instead of PLUS_EXPR.
5437 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5438 instead of PLUS_EXPR for pointers.
5439 * call.c (build_special_member_call): Likewise.
5440 * rtti.c (build_headof): Likewise.
5441 Use sizetype instead of ptrdiff_type_node.
5442 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5443 instead of PLUS_EXPR for pointers.
5444 * except.c (expand_start_catch_block): Do a
5445 NEGATIVE and then a POINTER_PLUS_EXPR instead
5447 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5448 PLUS_EXPR on pointer types over to use
5449 POINTER_PLUS_EXPR and remove the conversion
5450 to the pointer types.
5451 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5452 adding to a pointer type. Use size_int instead of
5453 ssize_int. Convert the index to sizetype before
5454 adding it to the pointer.
5456 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5458 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5459 (DECL_ANON_UNION_VAR_P): New macro.
5460 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5461 than DECL_VAR_MARKED_P, to keep track of which variables we have
5463 * decl.c (redeclaration_error_message): Complain about redeclaring
5464 anonymous union members at namespace scope.
5465 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5467 2007-06-14 Geoff Keating <geoffk@apple.com>
5469 * decl2.c (determine_visibility): Ensure that functions with
5470 hidden types as parameters are hidden.
5473 * decl2.c (determine_visibility): Remove duplicate code for
5476 2007-06-12 Ian Lance Taylor <iant@google.com>
5479 * init.c (avoid_placement_new_aliasing): New static function.
5480 (build_new_1): Call it.
5482 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5484 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5485 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5487 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5490 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5491 on init, the non-decl cond operand and increment value.
5493 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5496 * decl.c (check_initializer): Report an error when a brace enclosed
5497 initializer is used for a non-aggregate type in C++98.
5498 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5500 (grokdeclarator): Likewise.
5501 (move_fn_p): Likewise.
5502 * typeck.c (check_return_expr): Likewise.
5503 * call.c (reference_binding): Likewise.
5504 * error.c (cp_cpp_error): Likewise.
5505 * pt.c (check_default_tmpl_args): Likewise.
5507 * lex.c (init_reswords): Likewise.
5508 * parser.c (p_parser_primary_expression): Likewise.
5509 (TOKEN_PRECEDENCE): Likewise.
5510 (cp_parser_init_declarator): Likewise.
5511 (cp_parser_ptr_operator): Likewise.
5512 (cp_parser_parameter_declaration): Likewise.
5513 (cp_parser_enclosed_template_argument_list): Likewise.
5514 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5515 (cp_parser_next_token_ends_template_argument_p): Likewise.
5517 2007-06-04 Simon Baldwin <simonb@google.com>
5519 * decl.c (grokdeclarator): Readability change. Moved case labels
5520 into direct switch statement scope.
5522 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5524 * call.c (convert_like_real): Remove pointless code.
5526 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5528 * decl.c (get_atexit_fn_ptr_type): New function.
5529 (get_atexit_node): Use it.
5530 (start_cleanup_fn): Likewise.
5531 (register_dtor_fn): Use the object's destructor, instead of a
5532 separate cleanup function, where possible.
5533 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5534 (atexit_fn_ptr_type_node): New macro.
5535 * decl2.c (build_cleanup): Use build_address.
5537 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5539 * typeck.c (build_binary_op): Include types in error.
5541 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5544 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5545 needs runtime initialization.
5547 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5550 * semantics.c (finish_trait_expr): Complete the types.
5552 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5553 Douglas Gregor <doug.gregor@gmail.com>
5554 Pedro Lamarao <pedro.lamarao@mndfck.org>
5555 Howard Hinnant <howard.hinnant@gmail.com>
5559 * typeck.c (comptypes): Don't consider rvalue and lvalue
5560 reference types to be equivalent.
5561 (check_return_expr): Move from certain lvalues when returning
5563 * decl.c (grokdeclarator): Implement reference collapsing.
5564 (copy_fn_p): Don't consider constructors taking rvalue references
5565 to be copy constructors.
5567 * call.c (conversion): New "rvaluedness_matches_p" member.
5568 (convert_class_to_reference): Require reference type as first
5569 parameter instead of base type.
5570 (reference_binding): Add logic to handle rvalue references.
5571 (implicit_conversion): Update inaccurate comment.
5572 (convert_like_real): Disable creation of temporaries that are
5573 impossible to initialize for types with move constructors.
5574 (build_over_call): Elide move constructors when possible.
5575 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5576 (maybe_handle_ref_bind): Return conversion instead of type node.
5577 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5578 determine preferred conversion sequences.
5579 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5580 (LOOKUP_PREFER_RVALUE): New.
5581 (DECL_MOVE_CONSTRUCTOR_P): New.
5582 (struct cp_declarator): Add "reference" member for reference
5583 types, with new "rvalue_ref" flag.
5584 (cp_build_reference_type): Declare.
5585 (move_fn_p): Declare.
5586 * error.c (dump_type_prefix): Format rvalue reference types
5587 correctly in error messages.
5588 * except.c (build_throw): Move from certain lvalues when
5590 * mangle.c (write_type): Mangle rvalue references differently
5591 than regular references.
5592 * parser.c (make_reference_declarator): Add boolean parameter for
5594 (cp_parser_make_indirect_declarator): New.
5595 (cp_parser_new_declarator_opt): Call
5596 cp_parser_make_indirect_declarator.
5597 (cp_parser_conversion_declarator_opt): Ditto.
5598 (cp_parser_declarator): Ditto.
5599 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5601 * pt.c (tsubst): Implement reference collapsing.
5602 (maybe_adjust_types_for_deduction): Implement special template
5603 parameter deduction rule for rvalue references.
5604 (type_unification_real): Update calls to
5605 maybe_adjust_types_for_deduction.
5606 (try_one_overload): Ditto.
5607 (unify_pack_expansion): Ditto.
5608 * tree.c (lvalue_p_1): Handle rvalue reference types.
5609 (cp_build_reference_type): New.
5611 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5614 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5615 variables that need runtime initialization.
5617 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5620 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5621 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5622 case POSTDECREMENT_EXPR>): Return the error_mark_node
5623 if either the real or imaginary parts would an
5626 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5627 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5630 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5631 token is a closing brace, false if there are no tokens left.
5632 (cp_parser_namespace_alias_definition): Only consume the next token if
5633 it is a closing brace.
5635 * parser.c (cp_parser_class_specifier): Likewise.
5637 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5639 * semantics.c (finish_member_declaration): Fix a typo in the
5642 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5654 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5655 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5656 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5657 whether everything was okay. Fix indentation.
5658 (push_template_decl_real): Check for bare parameter packs in
5659 function parameters; where errors occur, mark the parameter types
5660 with ERROR_MARK_NODEs to avert ICEs.
5661 (coerce_template_parameter_pack): New.
5662 (coerce_template_parms): Moved parameter pack coercion into
5663 coerce_template_parameter_pack, and permit it anywhere in the
5664 template parameter list (not just at the end). Parameter and
5665 argument indices can vary (somewhat) separately now, so add
5666 PARM_IDX and ARG_IDX.
5667 (fn_type_unification): Don't set an argument pack as incomplete if
5668 no argument pack was deduced.
5669 (type_unification_real): If a type parameter is a parameter pack
5670 and has not otherwise been deduced, it will be deduced to an empty
5672 (more_specialized_fn): Use the actual lengths of the argument
5673 lists when comparing against expansions.
5674 * semantics.c (finish_member_declaration): If a field's type has
5675 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5677 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5680 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5682 2007-05-22 Ollie Wild <aaw@google.com>
5684 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5685 (unqualified_namespace_lookup): Adds check for hidden types.
5687 2007-05-22 Ollie Wild <aaw@google.com>
5689 * decl.c (duplicate_decls): Verify namespace names are unique.
5691 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5693 * decl.c (cxx_maybe_build_cleanup): Handle
5694 __attribute__((cleanup)).
5696 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5698 * cvt.c (cp_convert_and_check): Don't check warnings if the
5701 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5703 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5705 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5708 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5709 type only if is a class type (5.2.8/4).
5711 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5713 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5714 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5715 c_common_unsigned_type.
5717 2007-05-11 Silvius Rus <rus@google.com>
5719 * typeck.c (build_indirect_ref): Add call to
5720 strict_aliasing_warning.
5721 (build_reinterpret_cast_1): Condition call to
5722 strict_aliasing_warning.
5724 2007-05-11 Jan Hubicka <jh@suse.cz>
5726 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5727 * decl2.c (start_objects): ctors and dtors are no longer public.
5728 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5730 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5732 * typeck.c (build_unary_op): Remove code that used to
5733 handle non lvalue increments/decrements.
5735 2007-05-07 Mike Stump <mrs@apple.com>
5737 * parser.c (check_empty_body): Add.
5738 (cp_parser_iteration_statement): Add call to check_empty_body.
5740 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5743 * mangle.c (write_mangled_name): Mangle static variable names.
5744 (write_unqualified_name): Use local-source-name for
5745 namespace-scope static variables.
5747 2007-05-04 Dirk Mueller <dmueller@suse.de>
5749 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5752 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5755 * decl2.c (constrain_class_visibility):
5756 Use strip_pointer_or_array_types instead of strip_array_types.
5758 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5761 * decl.c (reshape_init_r): Don't reshape the first element if it
5762 is a pointer to member function.
5764 2007-04-27 Simon Baldwin <simonb@google.com>
5766 * decl.c (grokparms): Changed message format from %qD to %qE.
5768 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5770 * error.c (maybe_warn_variadic_templates): Variadic templates are
5771 now in C++0x, so only warn about them in C++98 mode.
5773 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5776 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5777 integeral types from vectors types.
5779 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5782 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5783 for type dependent OMP_CLAUSE_DECLs.
5785 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5788 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5789 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5790 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5791 * init.c (build_zero_init): Adjust, as
5792 COMPLEX_TYPE is now a SCALAR_TYPE.
5793 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5794 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5796 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5798 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5799 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5800 (trait_expr_value): Adjust.
5802 2007-04-23 Simon Baldwin <simonb@google.com>
5804 * decl.c (grokparms): Added new error for duplicate function
5805 parameters names in function prototypes, to match gcc behavior.
5807 2007-04-23 Jan Hubicka <jh@suse.cz>
5809 * decl2.c (finish_objects): Do not call target constructor/destructor
5812 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5814 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5815 instead of checking GIMPLE_STMT_P in chain_next.
5817 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5820 * call.c (convert_for_arg_passing): Convert bitfields to their
5823 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5826 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5828 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5831 * decl2.c (constrain_class_visibility):
5832 Do not warn about the use of anonymous namespace in the main input file.
5834 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5836 * cp-tree.h (current_template_parms): Fix typo in comment.
5838 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5840 * cp-tree.h, error.c: Fix comment typos.
5842 2007-04-13 Jason Merrill <jason@redhat.com>
5845 * call.c (reference_binding): Add c_cast_p parm. If true,
5846 add quals to TO as needed to make it reference-compatible.
5848 2007-04-11 Jan Hubicka <jh@suse.cz>
5850 * class.c (convert_to_base_statically): Fold produced tree; verify
5851 that we are not processing template_decl.
5853 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5856 * class.c (build_base_path): Ensure that the converted pointer has
5857 the same cv-qualification as the input.
5859 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5861 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5863 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5865 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5867 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5868 * tree.c (cp_add_pending_fn_decls): Remove.
5869 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5871 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5873 Revert change removing staticp.
5875 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5877 * cp-objcp-common.c (cxx_staticp): Remove.
5878 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5879 * cp-tree.h (cxx_staticp):
5881 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5883 * class.c (check_for_override): Don't remove dllmport attribute
5886 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5889 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5890 type issue error and return early.
5892 2007-03-30 Jason Merrill <jason@redhat.com>
5895 * typeck.c (cp_type_readonly): New fn.
5896 * cp-tree.h: Declare it.
5897 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5898 (cp_finish_decl): Not here.
5900 2007-03-31 Richard Guenther <rguenther@suse.de>
5902 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5905 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5910 * parser.c (declarator_can_be_parameter_pack): New.
5911 (cp_parser_template_parameter): Only parse the `...' if the
5912 declarator can be a parameter pack.
5913 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5915 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5916 types (they could be used as array bounds).
5917 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5918 (tsubst_pack_expansion): Handle failure to expand parameter
5921 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5924 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5925 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5926 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5927 (CLASS_TYPE_NON_UNION_P): Add.
5928 (struct lang_type_class): Add has_complex_dflt.
5929 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5930 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5931 * cp-tree.def: Add TRAIT_EXPR.
5932 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5933 * lex.c (struct resword): Add __has_nothrow_assign,
5934 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5935 __has_trivial_constructor, __has_trivial_copy,
5936 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5937 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5938 __is_pod, __is_polymorphic, __is_union.
5939 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5940 (cp_parser_trait_expr): New.
5941 * semantics.c (finish_trait_expr, trait_expr_value
5942 classtype_has_nothrow_copy_or_assign_p): New.
5943 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5945 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5946 * class.c (check_bases, check_field_decl, check_bases_and_members):
5947 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5948 * pt.c (uses_template_parms, tsubst_copy_and_build,
5949 value_dependent_expression_p, type_dependent_expression_p): Deal with
5951 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5953 2007-03-29 Richard Guenther <rguenther@suse.de>
5955 * tree.c (cp_walk_subtrees): Do not set input_location.
5957 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5960 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5963 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5965 * parser.c (struct cp_parser): Update comment for
5966 greater_than_is_operator_p.
5967 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5968 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5969 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5970 !GREATER_THAN_IS_OPERATOR_P.
5971 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5972 `>>' operators that will become two `>' tokens in C++0x.
5973 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5974 mode, allowing it to terminate default arguments.
5975 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5976 `>>' like two consecutive `>' tokens.
5977 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5978 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5979 ends a template argument.
5981 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5983 * decl.c (redeclaration_error_message): Complain when redeclaring
5984 a friend function with default template arguments (C++0x mode only).
5985 * cp-tree.h (check_default_tmpl_args): Declare.
5986 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5987 template arguments in function templates. Add support for checking
5988 the default template arguments of friend templates.
5989 (push_template_decl_real): Fix call to check_default_tmpl_args.
5990 (type_unification_real): If a template parameter has not been
5991 deduced but provides a default template argument, substitute into
5992 that default template argument.
5993 * parser.c (cp_parser_init_declarator): When declaring (but not
5994 defining!) a function template in C++0x mode, check for default
5997 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
6000 * decl.c (grokdeclarator): Deal with cv-qualified function type
6001 typedefs in the same way for member and non-member functions.
6003 2007-03-26 Dirk Mueller <dmueller@suse.de>
6005 * parser.c (cp_parser_member_declaration): Pedwarn
6006 about stray semicolons after member declarations.
6008 2007-03-26 Paolo Carlini <pcarlini@suse.de>
6011 * pt.c (instantiate_decl): Set in_system_header.
6013 2007-03-22 Mark Mitchell <mark@codesourcery.com>
6015 * cp-tree.h (current_tempalte_parms): Improve documentation.
6016 * pt.c (current_template_args): Likewise.
6019 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
6020 not consume tokens when failing.
6022 2007-03-22 Jim Wilson <wilson@specifix.com>
6023 Mark Mitchell <mark@codesourcery.com>
6026 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
6027 consistent with FROM.
6029 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6031 * error.c (dump_expr): Handle dependent names that designate types.
6032 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
6034 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
6036 * cp-tree.def, parser.c, pt.c: Fix comment typos.
6038 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6040 * cvt.c (cp_convert_and_check) : Define.
6041 * cp-tree.h (cp_convert_and_check): Declare.
6042 * call.c (convert_conversion_warnings): Rename to
6043 conversion_null_warnings. The warning for floating-point to
6044 integer is handled by convert_and_check in convert_like_real.
6045 (convert_like_real): convert_conversion_warnings was renamed as
6046 conversion_null_warnings.
6047 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
6048 overflow and changes of value during conversion.
6050 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6053 * parser.c (cp_parser_statement): If 'namespace' is found, this
6054 only can be a namespace alias definition, so parse it now.
6055 (cp_parser_namespace_alias_definition): if we find an open brace
6056 instead of '=', then this is actually a misplaced namespace
6059 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6062 * decl.c (cxx_init_decl_processing): Move command-line options
6063 processing to c-opts.c.
6065 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
6067 * ptree.c (cxx_print_type): Use formatting markup for integers
6068 when printing template parameter index/level/orig level.
6069 (cxx_print_xnode): Ditto.
6070 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
6071 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
6072 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
6074 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
6075 rather than a HOST_WIDE_INT.
6076 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
6077 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
6079 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
6080 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
6081 IN_BASE_INITIALIZER bool bitfields.
6082 (struct cp_declarator): Make KIND a 4-bit field. Make
6083 PARAMETER_PACK_P a bool bitfield just after KIND.
6084 * pt.c (uses_parameter_packs): Destroy the pointer set.
6085 (make_pack_expansion): Ditto.
6086 (check_for_bare_parameter_packs): Ditto.
6087 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
6089 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
6092 * call.c (convert_default_arg): Instead of copying the node,
6095 2007-03-15 Dirk Mueller <dmueller@suse.de>
6098 * call.c (convert_conversion_warnings): New..
6099 (convert_like_real): .. factored out from here.
6100 (convert_conversion_warnings): Add warning about
6101 false being converted to NULL in argument passing.
6103 2007-03-14 Dirk Mueller <dmueller@suse.de>
6105 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6106 (finish_do_body): Warn about empty body in do/while statement.
6108 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6110 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6112 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6115 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6118 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6120 * repo.c (init_repo): Initialize random_seed saved options.
6121 (finish_repo): Adjust.
6123 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6126 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6129 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6131 * decl.c (compute_array_index_type): New warning flag warn_vla.
6133 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6136 * call.c (convert_default_arg): Copy non-constant arguments.
6138 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6141 * parser.c (cp_parser_postfix_expression): Disallow compound
6142 literals in constant expressions.
6145 * semantics.c (finish_typeof): Use unlowered_expr_type.
6147 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6150 * cp-tree.h (unlowered_expr_type): New function.
6151 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6152 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6153 (unlowered_expr_type): New function.
6154 (build_unary_op): Disallow predecrements of bool bitfields.
6155 * call.c (build_conditional_expr): Use unlowered_expr_type.
6156 * pt.c (type_unification_real): Likewise.
6158 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6161 * typeck.c (check_return_expr): Check for bare parameter packs.
6162 (comptypes): Compare template parameter packs and
6163 type pack expansions.
6164 * decl.c (grokdeclarator): Deal with the declaration of function
6166 (grokparms): Verify that the (optional) function parameter pack is
6167 at the end of the parameter list.
6168 (xref_basetypes): Handle pack expansions in the base class.
6169 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6170 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6171 (NONTYPE_ARGUMENT_PACK): New.
6172 (TYPE_PACK_EXPANSION): New.
6173 (EXPR_PACK_EXPANSION): New.
6174 (ARGUMENT_PACK_SELECT): New.
6175 * cp-objcp-common.c (cp_tree_size): Compute size of
6176 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6177 ARGUMENT_PACK_SELECT.
6178 * error.c (dump_template_argument): Print template argument packs.
6179 (dump_template_argument_list): Ditto.
6180 (dump_template_parameter): Dump `...' for template type parameter
6182 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6183 (dump_parameters): Print function parameter packs.
6184 (dump_template_parms): Print template argument packs.
6185 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6186 (maybe_warn_variadic_templates): New.
6187 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6188 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6189 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6191 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6192 (write_template_arg): Write argument packs as separate arguments.
6193 * cp-tree.h (struct template_parm_index_s): Add flag that
6194 indicates that the template parameter is actually a parameter
6196 (struct tree_argument_pack_select): New.
6197 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6198 (union lang_tree_node): Add argument_pack_select.
6199 (FUNCTION_PARAMETER_PACK_P): New.
6200 (PACK_EXPANSION_P): New.
6201 (PACK_EXPANSION_PATTERN): New.
6202 (SET_PACK_EXPANSION_PATTERN): New.
6203 (PACK_EXPANSION_PARAMETER_PACKS): New.
6204 (ARGUMENT_PACK_P): New.
6205 (ARGUMENT_PACK_ARGS): New.
6206 (SET_ARGUMENT_PACK_ARGS): New.
6207 (ARGUMENT_PACK_INCOMPLETE_P): New.
6208 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6209 (TEMPLATE_PARM_PARAMETER_PACK): New.
6210 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6211 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6212 (ARGUMENT_PACK_SELECT_INDEX): New.
6213 (ARGUMENT_PACK_SELECT_ARG): New.
6214 (struct cp_declarator): Add parameter_pack_p flag.
6215 (maybe_warn_variadic_templates): Declare.
6216 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6217 indicate a template parameter pack.
6218 (uses_parameter_packs): Declare.
6219 (template_parameter_pack_p): Declare.
6220 (template_parms_variadic_p): Declare.
6221 (make_pack_expansion): Declare.
6222 (check_for_bare_parameter_packs): Declare.
6223 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6224 sizeof... expressions.
6225 (pp_cxx_expression): Print pack expansions and non-type argument
6227 (pp_cxx_exception_specification): Print pack expansions.
6228 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6229 (pp_cxx_ctor_initializer): Print pack expansions.
6230 (pp_cxx_type_id): Print pack expansions.
6231 (pp_cxx_template_argument_list): Print argument packs.
6232 (pp_cxx_template_parameter): Print ellipsis for template parameter
6234 * pt.c (comp_template_parms): Compare template parameter packs.
6235 (template_parameter_pack_p): New.
6236 (template_parms_variadic_p): New.
6237 (template_args_variadic_p): New.
6238 (make_ith_pack_parameter_name): New.
6239 (struct find_parameter_pack_data): New.
6240 (find_parameter_packs_r): New.
6241 (uses_parameter_packs): New.
6242 (make_pack_expansion): New.
6243 (check_for_bare_parameter_packs): New.
6244 (expand_template_argument_pack): New.
6245 (reduce_template_parm_level): Propagate parameter pack flag.
6246 (process_template_parm): Add is_parameter_pack parameter to state
6247 when the parameter is actually a parameter pack. Create template
6248 parameter packs when is_parameter_pack is true.
6249 (current_template_args): The argument for a template parameter
6250 pack is an argument pack containing a single pack expansion.
6251 (process_partial_specialization): When checking that non-type
6252 argument expressions do not involve template parameters, loop over
6253 the arguments in argument packs separately.
6254 (push_template_decl_real): Check that the type of the declaration
6255 does not have any bare parameter packs. Check that primary
6256 templates have no more than one parameter pack, and that it comes
6257 at the end of the template parameter list.
6258 (convert_template_argument): Handle coercions for pack expansion
6259 expressions by coercing the pattern then rebuilding the expansion.
6260 (coerce_template_parms): When coercing the arguments for a
6261 variadic template, pack "extra" arguments into an argument pack.
6262 (coerce_template_template_parms): Cannot coerce between parameter
6263 packs and non-pack parameters.
6264 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6265 (comp_template_args): Expand all template arguments packs before
6266 comparing template argument lists.
6267 (mangle_class_name_for_template): Make argument packs as separate
6269 (for_each_template_parm_r): No need to handle BASELINK.
6270 (instantiate_class_template): Handle pack expansions in the base
6272 (tsubst_pack_expansion): New.
6273 (tsubst_template_args): Handle substitutions of argument packs and
6274 pack expansion into template argument lists.
6275 (tsubst_decl): Expand function parameter packs into separate
6276 function parameters.
6277 (tsubst_arg_types): Expand a type pack expansion into separate
6279 (tsubst_exception_specification): Handle pack expansions in
6280 exception specifiers.
6281 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6282 replacing a template parameter with its argument. If we encounter
6283 a substitution for an argument pack, just return the parameter
6285 (tsubst_copy): sizeof(X...) returns the number of elements in
6286 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6287 PARM_DECL is a parameter pack.
6288 (tsubst_expr): Expression pack expansions and argument packs
6289 cannot show up here; they will all be handled through function
6290 calls, sizeof, and template argument lists.
6291 (tsubst_copy_and_build): sizeof(X...) returns the number of
6292 elements in parameter pack X. Handle pack expansions in TREE_LIST
6293 and CONSTRUCTOR nodes.
6294 (fn_type_unification): Handle "incomplete" explicit template
6295 argument lists that specify some of the arguments for a template
6297 (type_unification_real): Unify arguments against pack expansions.
6298 (template_parm_level_and_index): New, helper function.
6299 (unify_pack_expansion): New.
6300 (unify): Unify argument packs on an argument-by-argument basis,
6301 handling variadic argument packs as well.
6302 (more_specialized_fn): Handle unification of function parameter
6303 packs. All things being equal, prefer non-variadic function
6304 templates to variadic function templates.
6305 (more_specialized_class): Prefer the variadic class template
6306 partial specialization that binds fewer arguments to a parameter
6308 (regenerate_decl_from_template): Expand function parameter packs
6309 into separate parameters.
6310 (instantiate_decl): Ditto.
6311 (tsubst_initializer_list): Handle pack expansions for base-class
6313 (dependent_type_p_r): Determine dependent types in argument packs
6314 and pack expansions.
6315 (value_dependent_expression_p): Determine value-dependence of
6316 non-type argument packs.
6317 (dependent_template_arg_p): Handle argument packs.
6318 * semantics.c (finish_cond): Check for bare parameter packs.
6319 (finish_expr_stmt): Ditto.
6320 (finish_for_expr): Ditto.
6321 (finish_switch_cond): Ditto.
6322 (finish_mem_initializers): Ditto.
6323 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6325 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6326 * parser.c (make_declarator): Declarator is not an expansion.
6327 (make_pointer_declarator): Transfer parameter pack flag to outer
6329 (make_reference_declarator): Ditto.
6330 (make_ptrmem_declarator): Ditto.
6331 (make_call_declarator): Ditto.
6332 (make_array_declarator): Ditto.
6333 (cp_parser_postfix_expression): Allow pack expansion expressions
6334 in the argument list for a call expression.
6335 (cp_parser_parenthesized_expression_list): Add new parameter
6336 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6337 into separate arguments."
6338 (cp_parser_new_placement): Allow pack expansion expressions.
6339 (cp_parser_new_initializer): Ditto.
6340 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6341 base-class initializer expansion.
6342 (cp_parser_mem_initializer): Ditto.
6343 (cp_parser_template_parameter_list): Keep track of whether the
6344 template parameter is a template parameter pack.
6345 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6346 template parameter pack.
6347 (cp_parser_type_parameter): Ditto.
6348 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6350 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6351 this declarator is a parameter pack.
6352 (cp_parser_parameter_declaration): The ellipsis does not end the
6353 parameter declaration, because it might be a parameter pack. Parse
6354 the ellipsis to indicate a parameter pack.
6355 (cp_parser_initializer): Allow pack expansions.
6356 (cp_parser_initializer_list): Allow ellipsis to create an
6357 initializer expansion.
6358 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6360 (cp_parser_type_id_list): Allow ellipsis to create an exception
6361 specifier expansion.
6362 (cp_parser_attribute_list): Don't allow pack expansions.
6363 (cp_parser_functional_cast): Allow pack expansions.
6364 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6365 compute the length of a parameter pack.
6366 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6367 end a template argument.
6368 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6369 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6372 2007-03-09 Dirk Mueller <dmueller@suse.de>
6374 * call.c (build_new_op): Call warn_logical_operator.
6376 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6379 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6382 * pt.c (any_template_arguments_need_structural_equality_p):
6385 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6387 * decl.c (grokdeclarator): Disable warnings for anonymous
6390 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6392 * typeck2.c (readonly_error): Always emit a hard error.
6393 Remove last argument.
6394 * cp-tree.h (readonly_error): Adjust prototype.
6395 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6396 * typeck.c (build_unary_op): Likewise.
6397 (build_modify_expr): Likewise.
6399 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6402 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6404 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6407 * parser.c (struct cp_parser): New IN_IF_STMT.
6408 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6409 returning if parsing the body of an 'if' statement or issuing an
6410 error and continuing.
6411 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6413 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6415 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6418 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6421 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6423 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6424 Objective-C++. Don't exit early if -shared-libgcc needs to be
6427 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6429 * typeck.c (common_base_type): Delete unused function.
6431 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6433 * Make-lang.in: Add dummy lang.install-pdf target.
6435 2007-03-01 Simon Baldwin <simonb@google.com>
6438 * decl.c (check_tag_decl): Added new warning for typedef ignored
6439 when it precedes an otherwise valid non-typedef declaration.
6441 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6443 * typeck.c (build_function_call): Store converted arguments
6444 in a stack-allocated array instead of building a list.
6445 (convert_arguments): Store arguments in the array passed in as an
6446 argument, and return the actual number of arguments.
6447 * call.c (build_call): Delete, and replace with...
6448 (build_call_n, build_call_a): New.
6449 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6450 (build_over_call): Store converted arguments in a stack-allocated
6451 array instead of building a list.
6452 (build_cxx_call): Pass arguments in an array instead of as a list.
6453 (build_java_interface_fn_ref): Rewrite to avoid constructing
6455 * tree.h: Update declarations to reflect above changes.
6456 * method.c (use_thunk): Use a stack-allocated array to hold
6457 the arguments instead of a list.
6458 * rtti.c (throw_bad_cast): Update call to cxx_call.
6459 (throw_bad_typeid): Likewise.
6460 (build_dynamic_cast_1): Likewise.
6461 * init.c (build_builtin_delete_call): Use build_call_n.
6462 * decl.c (expand_static_init): Likewise.
6463 * except.c (cp_protect_cleanup_actions): Likewise.
6464 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6465 (gimplify_must_not_throw_expr): Likewise.
6466 (cxx_omp_apply_fn): Use build_call_a.
6468 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6470 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6471 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6473 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6475 * cp-tree.h (static_ctors): Remove.
6476 * cp-tree.h (static_dtors): Likewise.
6477 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6478 refactoring of tree_map hierarchy.
6479 (decl_shadowed_for_var_insert): Likewise.
6480 * semantics.c (expand_body): Use c_expand_body.
6481 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6482 * decl2.c (static_ctors): Remove.
6483 (static_dtors): Likewise.
6484 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6485 objc_generate_static_init_call. Do not call static_[cd]tors.
6486 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6488 (cp_write_global_declarations): Likewise.
6490 2007-02-23 Richard Guenther <rguenther@suse.de>
6492 * class.c (note_name_declared_in_class): Make declaration
6493 changes meaning a pedwarn.
6495 2007-02-22 Michael Matz <matz@suse.de>
6498 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6499 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6500 dump_function_decl): Guard emitting outer scopes by new flag.
6501 * cp-lang.c (cxx_dwarf_name): New function.
6502 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6503 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6505 (push_template_decl_real, lookup_template_class): Remove calls
6508 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6510 * call.c (build_new_method_call): Ensure that explicit calls of
6511 destructors have type "void".
6513 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6515 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6516 and -Walways-true with -Waddress.
6517 * cvt.c (convert_to_void): Replace unconditional warning with
6520 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6522 * decl.c, tree.c: Fix comment typos.
6524 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6527 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6528 statement expression if we had an error mark node.
6530 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6531 Brooks Moses <brooks.moses@codesourcery.com>
6532 Lee Millward <lee.millward@codesourcery.com>
6534 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6535 Change class to tcc_vl_exp.
6537 * call.c (build_call): Use build_call_list instead
6539 (build_over_call): Likewise.
6540 (build_new_method_call): Use build_min_non_dep_call_list
6541 instead of build_min_non_dep.
6543 * error.c (dump_call_expr_args): New function.
6544 (dump_aggr_init_expr_args): New function.
6545 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6546 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6548 * cvt.c (convert_to_void): Use build_call_array instead
6549 of build3; use new AGGR_INIT_EXPR accessor macros.
6551 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6552 instead of TREE_CODE_LENGTH.
6554 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6555 AGGR_INIT_EXPR accessor macros.
6557 * cp-gimplify.c (cp_gimplify_init_expr): Use
6558 AGGR_INIT_EXPR_SLOT to set the slot operand.
6560 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6561 (AGGR_INIT_EXPR_SLOT): New macro.
6562 (AGGR_INIT_EXPR_ARG): New macro.
6563 (aggr_init_expr_nargs): New macro.
6564 (AGGR_INIT_EXPR_ARGP): New macro.
6565 (aggr_init_expr_arg_iterator): New.
6566 (init_aggr_init_expr_arg_iterator): New.
6567 (next_aggr_init_expr_arg): New.
6568 (first_aggr_init_expr_arg): New.
6569 (more_aggr_init_expr_args_p): New.
6570 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6571 (stabilize_aggr_init): New declaration.
6572 (build_min_non_dep_call_list): Likewise.
6574 * tree.c (process_aggr_init_operands): New function.
6575 (build_aggr_init_array) New function.
6576 (build_cplus_new): Update to use new CALL_EXPR and
6577 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6578 build_aggr_init_array.
6579 (build_min_non_dep_call_list) New function.
6580 (build_min_nt): Assert input code parameter is not a variable
6581 length expression class.
6582 (build_min, build_min_non_dep): Likewise.
6583 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6584 to check for equality instead of recursing. Handle tcc_vl_exp
6586 (stabilize_call): Update to only handle CALL_EXPRs, not
6587 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6588 (stabilize_aggr_init): New function.
6589 (stabilize_init): Use it.
6591 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6592 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6593 AGGR_INIT_EXPR accessor macros and argument iterators.
6595 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6596 build_vl_exp. Iterate through the operands, recursively
6597 processing each one.
6598 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6599 CALL_EXPR accessor macros.
6600 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6601 tree code classes. Use TREE_OPERAND_LENGTH instead of
6604 * semantics.c (finish_call_expr): Use build_nt_call_list
6605 instead of build_nt.
6606 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6607 accessor macros. Use build_call_array to construct the
6608 CALL_EXPR node instead of build3
6610 * decl2.c (build_offset_ref_call_from_tree): Use
6611 build_nt_call_list and build_min_non_dep_call_list instead
6612 of build_min_nt and build_min_non_dep.
6614 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6615 Use build_nt_call_list instead of build_min_nt.
6617 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6620 * call.c (build_conditional_expr): Improve error message.
6622 2007-02-13 Dirk Mueller <dmueller@suse.de>
6624 * friend.c (do_friend): Annotate warning about friend
6625 declarations in templates with OPT_Wnon_template_friend.
6626 Convert informal message from warning() to inform().
6628 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6629 Mark Mitchell <mark@codesourcery.com>
6632 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6633 instantiations for variables.
6635 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6638 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6639 Check warn_unused_value just once.
6641 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6644 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6645 (fn_type_unificiation): Likewise.
6646 (get_bindings): Likewise.
6648 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6651 * decl.c (finish_function): Use DECL_REPLACEABLE.
6652 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6654 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6656 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6658 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6660 * decl.c (grokvardecl): Don't error if !have_tls.
6661 (grokdeclarator): Likewise.
6662 * parser.c (cp_parser_omp_threadprivate): Likewise.
6664 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6667 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6668 parameters and result decls in omp clauses.
6669 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6672 2007-02-05 Dirk Mueller <dmueller@suse.de>
6675 * parser.c (cp_parser_class_specifier): Always initialize bases.
6677 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6679 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6680 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6681 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6683 * semantics.c (finish_omp_atomic): Store a whole expression node
6684 in operand 1, and integer_zero_node in operand 0, for dependent
6685 OMP_ATOMIC. Rewrite to make flow easier to understand.
6687 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6689 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6691 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6693 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6694 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6696 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6698 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6699 keyword warning to -Wc++0x-compat.
6701 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6703 * decl.c (grokdeclarator): Update documentation.
6705 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6708 * decl.c (grokdeclarator): If __thread is used together with
6709 a storage class other than extern and static, clear thread_p
6710 after issuing diagnostics and fall through to checking the
6713 2007-01-30 Roger Sayle <roger@eyesopen.com>
6715 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6716 calculating the size of an array (to avoid recursive errors).
6718 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6721 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6723 * call.c (convert_like_real): Don't warn when converting to
6726 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6728 * decl.c (pop_label): Replace warning with call to
6729 warn_for_unused_label.
6731 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6734 * semantics.c (finish_pseudo_destructor_expr): Check the
6735 destrutor name by calling check_dtor_name.
6737 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6739 * lex.c (D_CPP0X): Rename.
6741 (reswords): D_CPP0X -> D_CXX0X.
6742 (init_reswords): Ditto.
6743 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6744 of C++0x keywords as identifiers.
6746 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6749 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6752 2007-01-23 Ian Lance Taylor <iant@google.com>
6754 * typeck.c (convert_for_assignment): Only warn about a = b = c
6755 when converting to bool.
6757 2007-01-23 Roger Sayle <roger@eyesopen.com>
6759 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6761 * typeck.c (ignore_overflows): Remove the remaining uses of
6762 TREE_CONSTANT_OVERFLOW.
6764 2007-01-20 Jan Hubicka <jh@suse.cz>
6766 * decl2.c (start_objects, start_static_storage_duration_function):
6767 Do not make the functions uninlinable.
6769 2007-01-17 Ian Lance Taylor <iant@google.com>
6771 * class.c (add_method): Call VEC_reserve_exact rather than passing
6772 a negative size to VEC_reserve.
6774 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6777 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6779 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6782 * decl.c (make_typename_type): If the qualified name is not a
6783 type, issue an error.
6784 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6787 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6789 * rtti.c: Include target.h.
6790 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6791 don't emit typeinfo for fundamental types as weak.
6792 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6794 2007-01-08 Richard Guenther <rguenther@suse.de>
6796 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6798 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6800 * call.c (standard_conversion): Pass flag to
6801 vector_types_convertible_p to disallow emission of note.
6802 * typeck.c (convert_for_assignment): Pass flag to
6803 vector_types_convertible_p to allow emission of note.
6804 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6805 to disallow emission of note.
6807 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6810 * typeck.c (build_binary_op): Call overflow_warning if
6811 TREE_OVERFLOW_P is true for the result and not for any of the
6814 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6817 * class.c (add_method): Don't wait until template
6818 instantiation time to complain about duplicate methods.
6820 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6823 * semantics.c (finish_unary_op_expr): Warn only if result
6824 overflowed and operands did not.
6826 2007-01-05 Ian Lance Taylor <iant@google.com>
6828 * typeck.c (build_binary_op): Warn about comparing a non-weak
6831 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6833 * pt.c (tsubst): Propagate the need for structural equality checks
6834 when reducing the level of template parameters.
6836 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6838 * pt.c: Fix a comment typo.
6840 2007-01-02 Ian Lance Taylor <iant@google.com>
6842 * semantics.c (maybe_convert_cond): Optionally warn when using an
6843 assignment as a condition.
6844 * typeck.c (convert_for_assignment): Optionally warn about
6845 assigning the result of an assignment to a bool.
6847 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6849 * pt.c (canonical_template_parms): Correct typo in comment.
6851 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6853 * typeck.c (structural_comptypes): Renamed from "comptypes".
6854 (comptypes): Use canonical type information to perform fast type
6855 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6856 canonical type comparison returns the same results as we would see
6857 from the current, structural check. Support COMPARE_STRUCTURAL
6858 when we need structural checks.
6859 * decl.c (typename_compare): Fix comment.
6860 (build_typename_type): TYPENAME_TYPE nodes require structural
6861 equality checks, because they resolve different based on the
6863 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6864 require structural equality checks (for now).
6865 (build_ptrmemfunc_type): Build the canonical pointer to member
6867 (compute_array_index_type): Whenever we build a new index type
6868 to represent the size of an array in a template, we need to mark
6869 this index type as requiring structural equality. This goes for
6870 arrays with value-dependent sizes with the current ABI, or all
6872 * tree.c (cplus_array_hash): New.
6873 (struct cplus_array_info): New.
6874 (cplus_array_compare): New.
6875 (cplus_array_htab): New.
6876 (build_cplus_array_type_1): Use a hash table to cache the array
6877 types we build. Build the canonical array type for each array
6879 (cp_build_qualified_type_real): When building a cv-qualified array
6880 type, use the hash table of array types and build canonical array
6882 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6883 use structural equality (for now).
6884 * cp-tree.h (COMPARE_STRUCTURAL): New.
6885 * pt.c (canonical_template_parms): New.
6886 (canonical_type_parameter): New.
6887 (process_template_parm): Find the canonical type parameter.
6888 (lookup_template_class): When we have named the primary template
6889 type, set the canonical type for our template class to the primary
6890 template type. If any of the template arguments need structural
6891 equality checks, the template class needs structural equality
6893 (tsubst): When reducing the level of a template template
6894 parameter, we require structural equality tests for the resulting
6895 parameter because its template parameters have not had their types
6896 canonicalized. When reducing a template type parameter, find the
6897 canonical reduced type parameter.
6898 (any_template_arguments_need_structural_equality_p): New.