1 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
3 * class.c (check_field_decls): Also inherit packed for bitfields
4 regardless of their type.
6 2009-01-22 Dodji Seketeli <dodji@redhat.com>
9 * decl2.c (grokfield): Reverting changes of PR c++/26693
10 (save_template_attributes): Likewise.
11 * decl.c (grokdeclarator): Likewise.
12 * name-lookup.c (pushdecl_maybe_friend): Likewise.
13 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
14 (append_type_to_template_for_access_check): Likewise.
15 * semantics.c (check_accessibility_of_qualified_id): Likewise.
16 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
18 (resolve_type_name_type): Likewise.
19 (append_type_to_template_for_access_check): Likewise.
21 2009-01-21 Dodji Seketeli <dodji@redhat.com>
24 * decl2.c (grokfield): when a typedef appears in a
25 class, create the typedef variant type node for it.
26 (save_template_attributes): Creating typedef variant type node
28 * decl.c (grokdeclarator): If the typedef'ed struct/class was
29 anonymous, set the proper type name to all its type variants.
30 * name-lookup.c (pushdecl_maybe_friend): Reuse the
31 set_underlying_type function to install typedef variant types.
32 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
34 (append_type_to_template_for_access_check): New entry points.
35 * semantics.c (check_accessibility_of_qualified_id):
36 When a typedef that is a member of a class appears in a template,
37 add it to the template. It will be ...
38 * pt.c (instantiate_class_template, instantiate_template ): ... access
39 checked at template instantiation time.
40 (tsubst): Handle the case of being called with NULL args.
41 (resolve_type_name_type): The type name should be the name of the
43 (append_type_to_template_for_access_check): New entry point.
45 2009-01-19 Jason Merrill <jason@redhat.com>
48 * parser.c (cp_parser_unqualified_id): In a template,
50 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
52 2009-01-16 Jason Merrill <jason@redhat.com>
55 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
56 * init.c (build_new): Don't call describable_type unless we
60 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
63 * search.c (protected_accessible_p): N doesn't vary.
65 2009-01-15 Jason Merrill <jason@redhat.com>
68 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
69 accept hidden friends.
71 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
74 * decl.c (grokdeclarator): Check for a non namespace/class context.
76 2009-01-15 Jason Merrill <jason@redhat.com>
80 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
81 a function isn't necessarily an lvalue. Take tree, not const_tree.
82 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
83 * typeck.c (lvalue_or_else): Likewise.
84 * cp-tree.h: Adjust prototypes.
86 2009-01-15 Steve Ellcey <sje@cup.hp.com>
89 * pt.c (tsubst): Check for NULL args.
91 2009-01-15 Dodji Seketeli <dodji@redhat.com>
94 * name-lookup.c (pushtag): Don't create members to types that are not
97 2009-01-14 Nick Clifton <nickc@redhat.com>
100 * parser.c: Pass cp_id_kind computed in
101 cp_parser_postfix_dot_deref_expression to
102 cp_parser_primary_expression.
104 2009-01-13 Jakub Jelinek <jakub@redhat.com>
107 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
108 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
111 2009-01-12 Jason Merrill <jason@redhat.com>
112 Steve Ellcey <sje@cup.hp.com>
115 * name-lookup.c (lookup_name_real): Keep looking past a hidden
118 2009-01-12 Dodji Seketeli <dodji@redhat.com>
121 * pt.c (parameter_of_template_p): New function.
122 * cp-tree.h: Declare it.
123 * name-lookup.c (binding_to_template_parms_of_scope_p): New
125 (outer_binding): Take template parameters in account when looking for
128 2009-01-12 Jason Merrill <jason@redhat.com>
131 * tree.c (pod_type_p): Return 1 for structs created by the back end.
133 2009-01-12 Jakub Jelinek <jakub@redhat.com>
136 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
137 offsetof member-designator, handle it as `[0].'.
140 * decl.c (start_function): If grokdeclarator hasn't returned
141 FUNCTION_DECL nor error_mark_node, issue diagnostics.
143 2009-01-11 Jakub Jelinek <jakub@redhat.com>
146 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
147 (gimplify_if_stmt): ... this.
148 (cp_gimplify_expr): Don't handle IF_STMT here.
149 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
151 2009-01-10 Andrew Pinski <pinskia@gmail.com>
154 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
157 * typeck2.c (build_functional_cast): Check for reference type and NULL
160 2009-01-09 Steve Ellcey <sje@cup.hp.com>
162 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
164 2009-01-09 Jakub Jelinek <jakub@redhat.com>
167 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
169 2009-01-09 John F. Carr <jfc@mit.edu>
172 * parser.c (cp_parser_class_specifier): Clear
173 parser->in_unbraced_linkage_specification_p while parsing class
176 2009-01-07 Jakub Jelinek <jakub@redhat.com>
179 * semantics.c (finish_goto_stmt): Convert destination to
182 2009-01-06 Jason Merrill <jason@redhat.com>
189 * pt.c (check_default_tmpl_args): Don't complain about
190 out-of-order parameter packs in the enclosing class
191 or parameter packs after default args.
192 (coerce_template_parms): If we have more than one
193 parameter pack, don't flatten argument packs.
194 (template_args_equal): Handle argument packs.
195 (comp_template_args): Don't flatten argument packs.
196 (check_instantiated_arg): Split out from...
197 (check_instantiated_args): Here. Handle arg packs.
198 (convert_template_argument): Just check that nontype argument
199 packs have the right type.
201 2009-01-05 Dodji Seketeli <dodji@redhat.com>
204 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
206 2009-01-05 Jason Merrill <jason@redhat.com>
209 * typeck2.c (process_init_constructor_union): Handle union with
212 * mangle.c (write_expression): Remove mangling for zero-operand
216 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
220 * class.c (defaultable_fn_p): Only operator== can be a copy
223 2009-01-02 Jason Merrill <jason@redhat.com>
226 * typeck2.c (process_init_constructor_union): Handle excess
228 (process_init_constructor_record): Likewise.
231 * typeck2.c (digest_init_r): Don't use process_init_constructor
232 for non-aggregate classes.
234 2008-12-31 Jakub Jelinek <jakub@redhat.com>
237 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
238 Return error_mark_node if cp_parser_non_integral_constant_expression
242 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
244 2008-12-29 Jakub Jelinek <jakub@redhat.com>
247 * parser.c (cp_parser_condition): Use cp_parser_require
248 instead of cp_lexer_consume_token to consume =.
251 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
253 2008-12-28 Jakub Jelinek <jakub@redhat.com>
256 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
257 around volatile iteration var in condition and/or increment
260 2008-12-27 Jakub Jelinek <jakub@redhat.com>
263 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
266 2008-12-21 Jason Merrill <jason@redhat.com>
269 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
271 2008-12-20 Jakub Jelinek <jakub@redhat.com>
272 Manuel López-Ibáñez <manu@gcc.gnu.org>
275 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
276 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
279 2008-12-19 Jakub Jelinek <jakub@redhat.com>
282 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
285 2008-12-18 Jakub Jelinek <jakub@redhat.com>
288 * init.c (perform_member_init): For value-initialized
289 references call permerror instead of warning and don't emit any
292 2008-12-18 Jason Merrill <jason@redhat.com>
295 * parser.c (cp_parser_token_starts_cast_expression): An EOF
296 can't start a cast-expression.
298 2008-12-17 Jason Merrill <jason@redhat.com>
300 * semantics.c (describable_type): New function.
301 (finish_decltype_type): Use it for dependent exprs.
302 * cp-tree.h: Declare it.
303 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
304 (write_expression): If skip_evaluation, use type stubs.
305 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
306 declarations of a function.
307 * init.c (build_new): Do auto deduction if type is describable.
308 * decl.c (cp_finish_decl): Likewise.
309 * parser.c (cp_parser_omp_for_loop): Likewise.
311 2008-12-10 Jason Merrill <jason@redhat.com>
314 * mangle.c (write_builtin_type): Add mangling for decimal floating
315 point and fixed point types.
316 (write_type): Pass FIXED_POINT_TYPE along.
318 2008-12-09 Mark Mitchell <mark@codesourcery.com>
321 * class.c (resolve_address_of_overloaded_function): Check
322 accessibility of member functions unless FLAGS indicates
324 * call.c (standard_conversion): Adjust flags passed to
326 (convert_default_arg): Do not perform access checks.
327 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
329 2008-12-08 Steve Ellcey <sje@cup.hp.com>
331 * decl2.c (mark_used): Remove assemble_external call.
333 2008-12-08 Dodji Seketeli <dodji@redhat.com>
336 * name-lookup.c (kept_level_p): Don't forget the case of levels
337 having using directives.
339 2008-12-08 Richard Henderson <rth@redhat.com>
342 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
343 * decl.c (record_unknown_type): Likewise.
344 (start_enum, finish_enum): Likewise.
346 2008-12-05 Jakub Jelinek <jakub@redhat.com>
349 * error.c (dump_expr): Handle BIT_FIELD_REF.
351 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
354 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
357 2008-12-04 Jason Merrill <jason@redhat.com>
360 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
362 * class.c (check_bases_and_members): Rather than assuming any
363 user-declared default constructor is complex here.
365 2008-12-04 Richard Guenther <rguenther@suse.de>
368 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
369 pointer access with TREE_NO_WARNING.
371 2008-12-03 Jason Merrill <jason@redhat.com>
374 * init.c (build_value_init): Do initial zero-initialization
375 of a class with an implicitly-defined constructor using
376 build_zero_init rather than in build_value_init.
377 (build_value_init_1): Fold into build_value_init.
380 * parser.c (cp_parser_conversion_type_id): Diagnose
381 'operator auto' here.
382 * decl.c (grokdeclarator): Not here.
385 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
386 on explicit constructors.
387 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
388 CONSTRUCTOR_IS_DIRECT_INIT.
390 2008-12-02 Jason Merrill <jason@redhat.com>
392 PR c++/35782, c++/37860
393 * call.c (build_user_type_conversion_1): Remember
395 (convert_like_real): Likewise.
396 (build_over_call): Don't require the copy constructor
397 for copy-list-initialization.
398 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
401 * decl.c (cp_finish_decl): Handle =default and =delete for
404 2008-12-01 Jakub Jelinek <jakub@redhat.com>
407 * parser.c (cp_parser_omp_for_loop): Handle auto.
408 * pt.c (tsubst_omp_for_iterator): Likewise.
410 2008-11-28 Jason Merrill <jason@redhat.com>
413 * init.c (perform_member_init): Fix value-initialization.
414 (build_value_init_1): Add assert to catch cases that will break
416 (build_default_init): Remove.
417 * cp-tree.h: Remove its prototype.
418 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
419 value-initialization.
422 * parser.c (cp_parser_class_name): Only call
423 maybe_note_name_used_in_class if we actually found a class name.
425 2008-11-25 Jason Merrill <jason@redhat.com>
428 * decl2.c (check_classfn): Error rather than abort on parameter
431 2008-11-20 Jason Merrill <jason@redhat.com>
434 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
437 * call.c (build_over_call): Take the address of the function even
439 (build_new_method_call): Remember the type of the called function
442 2008-11-19 Dodji Seketeli <dodji@redhat.com>
445 * pt.c (coerce_template_template_parm): Use the more robust
446 uses_template_parms instead of dependent_type_p.
448 2008-11-19 Dodji Seketeli <dodji@redhat.com>
451 * pt.c (lookup_template_class): Check pointers before dereferencing
453 * error.c (dump_template_decl): Likewise.
455 2008-11-19 Jason Merrill <jason@redhat.com>
458 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
459 that names a class for linkage purposes.
462 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
463 name is not a declaration.
466 * pt.c (instantiate_decl): Don't require a definition of
467 a template that is explicitly instantiated 'extern'.
469 2008-11-18 Jason Merrill <jason@redhat.com>
470 Jakub Jelinek <jakub@redhat.com>
473 * parser.c (cp_parser_type_id): Complain about auto.
474 * decl.c (grokdeclarator): Complain about parameters and
475 conversion functions declared with auto.
477 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
479 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
481 2008-11-17 Jakub Jelinek <jakub@redhat.com>
484 * init.c (constant_value_1): Handle TREE_LIST init.
486 2008-11-15 Jakub Jelinek <jakub@redhat.com>
489 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
490 argtype instead of result_type.
492 2008-11-14 Jason Merrill <jason@redhat.com>
495 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
496 for a non-dependent call.
499 * call.c (build_aggr_conv): Increment i.
501 2008-11-13 Jason Merrill <jason@redhat.com>
504 * typeck2.c (process_init_constructor_record): Update bitfield
506 (check_narrowing): Update bitfield handling, print source type.
508 2008-11-12 Jakub Jelinek <jakub@redhat.com>
512 2007-05-07 Mike Stump <mrs@apple.com>
513 * parser.c (check_empty_body): Add.
514 (cp_parser_iteration_statement): Add call to check_empty_body.
516 2008-11-12 Jason Merrill <jason@redhat.com>
519 * typeck.c (cp_build_modify_expr): Update bitfield handling.
521 2008-11-12 Jakub Jelinek <jakub@redhat.com>
524 * parser.c (cp_parser_simple_declaration): Don't commit
525 to tentative parse if parse errors were seen.
528 * error.c (dump_expr): Handle COMPLEX_EXPR.
530 2008-11-10 Jakub Jelinek <jakub@redhat.com>
533 * parser.c (cp_parser_enum_specifier): After parsing :,
534 parse definitely. Don't return early if type specifier
537 2008-11-06 David Edelsohn <edelsohn@gnu.org>
540 * g++spec.c (LIBSTDCXX_STATIC): New.
541 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
544 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
547 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
550 2008-11-05 Richard Guenther <rguenther@suse.de>
553 * decl.c (start_preparsed_function): Use the correct type for
554 building the RESULT_DECL.
556 2008-10-31 Jakub Jelinek <jakub@redhat.com>
559 * decl.c (grokdeclarator): Diagnose auto function decl without
560 late return type and late return type function decl where type
564 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
567 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
570 * class.c (check_bitfield_decl): Rename min_precision to
571 tree_int_cst_min_precision.
572 * decl.c (finish_enum): Likewise.
574 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
577 * parser.c (cp_parser_token_starts_cast_expression): New.
578 (cp_parser_cast_expression): Peek the next token to decide whether
579 this could be a parenthesized constructor or is definitely an
582 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
585 * typeck.c (build_x_binary_op): Update call to
586 warn_about_parentheses.
587 * parser.c (cp_parser_binary_expression): Add note about passing
588 the correct code for unary expressions.
590 2008-10-24 Jakub Jelinek <jakub@redhat.com>
592 * Make-lang.in (check-c++-subtargets): New alias for
593 check-g++-subtargets.
594 (lang_checks_parallelized): Add check-g++.
595 (check_g++_parallelize): New variable.
597 2008-10-21 Richard Guenther <rguenther@suse.de>
599 * semantics.c (simplify_aggr_init_exprs_r): Remove.
600 (expand_or_defer_fn): Do not walk the function body to
601 simplify aggr_init_exprs.
603 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
606 * typeck.c (cp_common_type): New. The same as
607 type_after_usual_arithmetic_conversions but without promotions.
608 (type_after_usual_arithmetic_conversions): Do the promotions and
610 (common_type): Make it behave like the C version of this
611 function. Do not handle pointer types.
612 (common_pointer_type): Move handling of pointer types from
614 (cp_build_binary_op): Use common_pointer_type instead of
615 common_type in call to pointer_diff.
616 Use cp_common_type instead of common_type.
617 * cp-tree.h (common_pointer_type): Declare.
619 2008-10-14 Jakub Jelinek <jakub@redhat.com>
622 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
623 arguments if they don't already have COND_EXPR's type.
625 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
628 * pt.c (push_template_decl_real): Check that current_template_parms
630 (process_partial_specialization): Assert current_template_parms not
633 2008-10-13 Doug Evans <dje@google.com>
635 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
637 2008-10-10 Jakub Jelinek <jakub@redhat.com>
640 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
643 2008-10-09 Jakub Jelinek <jakub@redhat.com>
646 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
647 setting it to error_mark_node.
649 2008-10-07 Steve Ellcey <sje@cup.hp.com>
651 * decl.c (start_cleanup_fn): Declare as inline.
653 2008-10-06 Jason Merrill <jason@redhat.com>
655 PR c++/37376, other mangling issues
656 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
657 (write_member_name): Break out from...
658 (write_expression): ...here. Handle dependent COMPONENT_REF.
659 (write_template_arg): Wrap an argument pack in 'I'/'E'.
660 (write_builtin_type): Update char16/32_t mangling.
661 (write_nested_name, write_prefix): Don't forget template args
663 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
666 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
668 * typeck.c (build_x_indirect_ref): Add location argument.
669 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
670 (cp_build_unary_op): Add location argument.
671 (cp_build_modify_expr): Same.
672 * class.c (build_base_path): Pass location to build_indirect_ref.
673 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
676 2008-10-05 Dodji Seketeli <dodji@redhat.com>
679 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
680 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
681 of the innermost containing BLOCK.
683 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
686 * error.c (dump_function_decl): Save the exceptions in case of
687 error about incompatible specifications in a specialization.
689 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
691 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
693 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
696 * parser.c (cp_parser_selection_statement): Fix uninitialized
699 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
703 * decl.c (grokdeclarator): Set the type for typedefs to a
704 nested-name-specifier to error_mark_node.
706 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
708 * parser.c (cp_parser_selection_statement): Implement here the
709 -Wempty-body warning for `if' and `else' statements.
710 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
712 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
715 * name-lookup.c (maybe_process_template_type_declaration): Check
716 return value of push_template_decl_real for error_mark_node.
718 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
720 * semantics.c (finish_fname): Pass location to fname_decl.
722 2008-09-23 Jakub Jelinek <jakub@redhat.com>
725 * semantics.c (finish_omp_for): If processing_template_decl, just build
726 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
728 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
730 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
731 (get_member_function_from_ptrfunc): Same.
732 (build_x_binary_op): Same.
733 (build_binary_op): Same.
734 (cp_build_binary_op): New location argument.
735 (pointer_diff): Pass location to cp_build_binary_op.
736 (cp_truthvalue_conversion): Pass location to build_binary_op.
737 (convert_ptrmem): Pass location to cp_build_binary_op.
738 (cp_build_modify_expr): Same.
739 (build_ptrmemfunc): Same.
740 * init.c (expand_cleanup_for_base): Pass location to
741 c_common_truthvalue_conversion.
742 (build_new_1): Pass location to cp_build_binary_op.
743 (build_vec_delete_1): Pass location to *build_binary_op,
744 c_common_truthvalue_conversion.
745 (build_vec_init): Same.
746 (build_delete): Same.
747 * decl.c (compute_array_index_type): Same.
748 * call.c (build_new_op): Same.
749 * rtti.c (build_dynamic_cast_1): Same.
750 * cp-tree.h: Add argument to cp_build_binary_op.
751 * semantics.c (handle_omp_for_class_iterator): Pass location to
752 *build_binary_op, c_common_truthvalue_conversion.
753 * decl2.c (get_guard_cond): Same.
755 2008-09-17 Richard Guenther <rguenther@suse.de>
758 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
759 result to the correct type.
761 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
764 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
765 parameter for duplicate.
767 2008-09-17 Jason Merrill <jason@redhat.com>
770 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
772 2008-09-17 Jakub Jelinek <jakub@redhat.com>
775 * typeck.c (build_array_ref): Use protected_set_expr_location instead
776 of SET_EXPR_LOCATION when ret might not be an expression.
778 2008-09-17 Jan Hubicka <jh@suse.cz>
781 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
783 2008-09-16 Jakub Jelinek <jakub@redhat.com>
786 * semantics.c (finish_compound_literal): Return error_mark_node if
790 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
793 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
795 * decl.c (duplicate_decls): Call error_at.
796 (grokfndecl): New location argument. Use location if available.
797 (grokdeclarator): Pass declarator location to grokfndecl.
798 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
799 * decl2.c (check_classfn): Use error_at.
800 * parser.c (cp_parser_init_declarator): Set function_start_locus
802 (cp_parser_member_declaration): Set id_loc for function declarators.
804 2008-09-09 Jan Hubicka <jh@suse.cz>
807 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
809 2008-09-09 Jakub Jelinek <jakub@redhat.com>
812 * tree.c (array_type_nelts_top): Add size_one_node instead of
815 2008-09-09 Jason Merrill <jason@redhat.com>
818 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
821 2008-09-09 Jakub Jelinek <jakub@redhat.com>
824 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
825 being error_operand_p. Don't clear value if it was error_mark_node.
827 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
829 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
830 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
831 * semantics.c (anon_aggr_type_p): Remove.
833 2008-09-06 Jason Merrill <jason@redhat.com>
836 * parser.c (cp_parser_parameter_declaration_list): Process the
837 PARM_DECLs as we go and push them. Return a TREE_LIST.
838 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
839 (cp_parser_direct_declarator): Create a binding level and
840 suppress deprecated warnings in the parameter list.
841 (make_call_declarator): PARMS is now a tree.
842 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
843 * decl.h (enum deprecated_states, deprecated_state): Move here.
845 (type_is_deprecated): New fn.
846 (grokparms): PARMLIST is a tree now. Warn about parms that
847 use deprecated types.
848 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
850 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
851 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
853 * name-lookup.c (pushtag): Look through function parameter scopes.
854 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
855 when we're parsing a function declarator.
857 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
860 * tree.c (cp_build_qualified_type_real): Deal with sharing of
861 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
864 2008-09-04 Ian Lance Taylor <iant@google.com>
866 * parser.c (check_no_duplicate_clause): Change code parameter to
867 enum omp_clause_code.
869 2008-09-03 Jakub Jelinek <jakub@redhat.com>
872 * decl.c (cp_finish_decl): Only set
873 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
876 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
878 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
879 deferred_mark_used_calls vector and exit early.
880 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
882 (finish_function): Set defer_mark_used_calls for the duration of the
883 function. Call mark_used on any queued decls.
885 2008-09-02 Jason Merrill <jason@redhat.com>
888 * call.c (build_over_call): Make =delete work with SFINAE.
889 * class.c (resolve_address_of_overloaded_function): Likewise.
891 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
892 threadprivate_or_deleted_p.
893 (CP_DECL_THREADPRIVATE_P): Adjust.
894 (DECL_DELETED_FN): Likewise.
895 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
896 (SD_DELETED): New macro.
897 * parser.c (cp_parser_init_declarator): Use them.
898 * decl.c (start_decl): Use them.
900 * decl2.c (mark_used): Give =deleted error even in sizeof.
902 * typeck2.c (check_narrowing): Downgrade narrowing error to
905 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
907 * typeck.c (build_array_ref): Use new location argument.
908 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
909 * call.c (build_new_op): Same.
910 * decl2.c (grok_array_decl): Same.
911 * cp-tree.h (build_array_ref): Add location argument to prototype.
913 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
915 * typeck.c (build_x_indirect_ref): Add location argument.
916 * class.c (build_base_path): Pass location to build_indirect_ref.
917 * pt.c (tsubst_copy_and_build): Pass location to
918 finish_label_address_expr.
919 * parser.c (cp_parser_unary_expression): Same.
921 2008-08-31 Jason Merrill <jason@redhat.com>
923 Implement late-specified return type using 'auto'.
924 * cp-tree.h (struct cp_declarator): Add late_return_type field to
926 * parser.c (cp_parser_late_return_type_opt): New fn.
927 (cp_parser_direct_declarator): Use it.
928 (make_call_declarator): Put it in the declarator.
929 * decl.c (grokdeclarator): Splice in late-specified return type.
930 * pt.c (splice_late_return_type): New fn.
932 2008-08-29 Michael Meissner <gnu@the-meissners.org>
934 * decl.c (builtin_function_1): Take a bool argument to decide
935 whether to use pushdecl or pushdecl_top_level.
936 (duplicate_decls): Copy function specific target and optimization
937 options on duplicate declarations.
938 (cxx_builtin_function): Update builtin_function_1 call.
939 (cxx_builtin_function_ext_scope): New function, guarantee that the
940 declaration is done at global scope.
942 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
943 macro, define builtin function hook for delayed machine specific
946 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
948 2008-08-30 Jason Merrill <jason@redhat.com>
951 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
953 2008-08-29 Jason Merrill <jason@redhat.com>
955 Implement C++0x 'auto' semantics.
956 * decl.c (start_decl_1): Don't complain about auto being incomplete.
957 (cp_finish_decl): Deduce auto.
958 * init.c (build_new): Handle 'new auto'.
959 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
960 message for auto than for normal template type parms.
961 * pt.c (type_dependent_expression_p): Handle { }.
962 (make_auto): New function.
963 (listify_autos): New function.
964 (do_auto_deduction): New function.
965 (is_auto): New function.
966 (type_uses_auto): New function.
967 * cp-tree.h: Declare them.
968 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
969 treat auto as a declspec.
970 (cp_parser_simple_type_specifier): It's a type-specifier.
972 2008-08-29 Mark Mitchell <mark@codesourcery.com>
974 * mangle.c (write_type): Add target-specific manglings for
975 non-fundamental types to the substitution table.
978 2008-08-29 Jakub Jelinek <jakub@redhat.com>
982 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
983 Adjust debug_hooks->imported_module_or_decl callers.
985 2008-08-29 Jan Hubicka <jh@suse.cz>
987 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
989 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
992 * decl.c (reshape_init_r): Check init for error_mark_node.
994 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
997 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
998 (finish_return_stmt): Likewise.
999 (finish_switch_condition): Likewise.
1001 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1003 * cp-tree.h: Fix #error directive.
1005 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
1007 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
1008 usual arithmetic conversions on scoped enumeration types.
1009 (common_type): Ditto.
1010 (default_conversion): Don't perform integral promotions on scoped
1012 (build_array_ref): Scoped enumeration types can't be used as
1014 * decl.c (start_enum): If building a C++0x scoped enumeration,
1015 enter its scope. If provided with an underlying type, check that
1016 underlying type and set up the enumeration type accordingly.
1017 (finish_enum): Only compute an underlying type if the underlying
1018 type isn't already fixed, and only convert the enumerator values
1019 now if we've just computed the underlying type. Finish the scope
1020 of C++0x scoped enumerations.
1021 (build_enumerator): For enumerations with a fixed underlying type,
1022 check the enumerator values when the enumerator is defined.
1023 (lookup_enumerator): New.
1024 * call.c (standard_conversion): Don't allow assignment from
1025 integers to scoped enumeration types, even with -fpermissive.
1026 Don't convert from scoped enumerations to bool or any arithmetic
1028 (build_conditional_expr): Don't per the usual arithmetic
1029 conversions for scoped enumeration types.
1030 (convert_like_real): Check complain to see if we should
1032 * error.c (class_key_or_enum_as_string): Print scoped enums.
1033 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1035 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1036 (SCOPED_ENUM_P): New.
1037 (UNSCOPED_ENUM_P): New.
1038 (SET_SCOPED_ENUM_P): New.
1039 (ENUM_UNDERLYING_TYPE): New.
1040 * pt.c (lookup_template_class): Update the instantiation of enum
1041 types to deal with C++0x scoped enumerations and underlying
1043 * name-lookup.c (begin_scope): Deal with scoped enumeration
1045 (lookup_qualified_name): Deal with lookup into enumeration types.
1046 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1047 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1048 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1049 parse a type-name that can be an enumeration type.
1050 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1051 (cp_parser_elaborated_type_specifier): Parse the
1052 optional `struct' or `class' following enum (in C++0x).
1053 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1056 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1058 * typeck.c: Update all calls to pedwarn.
1061 * error.c: Likewise.
1063 * name-lookup.c: Likewise.
1064 * parser.c: Likewise.
1066 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1069 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1072 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1074 * parser.c: Update all calls to inform.
1075 * typeck.c: Likewise.
1077 * class.c: Likewise.
1079 * method.c: Likewise.
1080 * friend.c: Likewise.
1081 * typeck2.c: Likewise.
1083 * name-lookup.c: Likewise.
1086 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1089 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1091 2008-08-18 Tomas Bily <tbily@suse.cz>
1093 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1095 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1097 * typeck.c: Update all callers of permerror.
1099 * class.c: Likewise.
1102 * except.c: Likewise.
1104 * typeck2.c: Likewise.
1106 * semantics.c: Likewise.
1107 * name-lookup.c: Likewise.
1109 * decl2.c: Likewise.
1110 * parser.c: Likewise.
1112 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1115 * pt.c (check_template_shadow): Change to return a bool.
1116 * name-lookup.c (push_class_level_binding): Early return if
1117 check_template_shadow returns false.
1118 * cp-tree.h (check_template_shadow): Adjust declaration.
1120 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1123 * decl.c (grokdeclarator): In case of extern and initializer, return
1124 error_mark_node after the error.
1126 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1129 * decl.c (grokfndecl): Call check_main_parameters_type only if
1132 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1135 * parser.c (cp_parser_class_head): Early return error_mark_node in
1136 case of global qualification of class name or qualified name that
1137 does not name a class.
1139 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1142 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1144 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1147 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1148 Delete forward declarations. Check that toplev.h has not been
1149 included before this file. Include toplev.h and diagnostic.h.
1150 * error.c (cp_cpp_error): Use DK_PEDWARN.
1151 (cxx_incomplete_type_diagnostic): Update declaration.
1152 (cxx_incomplete_type_error): Use DK_ERROR.
1153 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1154 as argument. Use emit_diagnostic.
1155 (cxx_incomplete_type_error): Use DK_ERROR.
1156 (add_exception_specifier): Use diagnostic_t instead of custom
1158 * typeck.c (complete_type_or_else): Update call to
1159 cxx_incomplete_type_diagnostic.
1160 * init.c (build_delete): Likewise.
1161 * call.c (diagnostic_fn_t): Remove unused typedef.
1162 (build_temp): Pass a pointer to diagnostic_t.
1163 (convert_like_real): Use emit_diagnostic.
1164 (joust): Check return value of warning before giving informative
1166 * friend.c (do_friend): Check return value of warning
1167 before giving informative note.
1168 * parser.c (cp_parser_template_id): Likewise.
1170 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1173 * class.c (check_bases_and_members): Warn with -Wuninitialized
1176 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1179 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1180 and make sure it is not a union.
1182 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1184 * semantics.c (finish_decltype_type): Initialize type.
1186 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1188 * semantics.c (finish_decltype_type): Handle calls to function
1189 pointers and references to functions properly.
1191 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1194 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1195 following a type-id is an error when in C++0x mode.
1197 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1200 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1202 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1205 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1207 2008-08-05 Jason Merrill <jason@redhat.com>
1210 * decl.c (build_ptrmemfunc_type): Don't require structural
1211 comparison of PMF types.
1212 * tree.c (cp_build_qualified_type_real): Don't clear
1213 a valid TYPE_PTRMEMFUNC_TYPE.
1214 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1217 2008-08-04 Jason Merrill <jason@redhat.com>
1220 * typeck2.c (check_narrowing): Allow narrowing conversion
1221 from an explicit floating-point constant.
1224 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1227 2008-08-04 Simon Baldwin <simonb@google.com>
1230 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1231 the declaration's id is followed by a semicolon.
1233 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1236 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1237 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1239 2008-07-31 Jason Merrill <jason@redhat.com>
1242 * init.c (build_new_1): Don't convert pointer to the data type
1243 until we're actually going to treat it as that type.
1246 * tree.c (build_aggr_init_expr): Split out...
1247 (build_cplus_new): ...from here.
1248 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1249 * init.c (build_new_1): new T() means value-initialization,
1250 not default-initialization.
1251 (build_vec_init): Likewise.
1252 (build_value_init_1): Use build_aggr_init_expr.
1254 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1257 * decl2.c (fix_temporary_vars_context_r): New function.
1258 (one_static_initialization_or_destruction): Make sure temporary
1259 variables part of the initialiser have their DECL_CONTEXT()
1262 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1265 * typeck.c (build_binary_op): Encapsulate code into
1268 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1271 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1272 TYPE_UID instead of pointers.
1274 2008-07-29 Jan Hubicka <jh@suse.cz>
1276 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1277 * decl.c (duplicate_decls): Likewise.
1278 (grokfndecl): Likewise.
1279 (start_method): Likewise.
1280 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1282 * pt.c (register_specialization, regenerate_decl_from_template):
1284 * decl2.c (grokfield): Likewise.
1286 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1289 * decl.c (duplicate_decls): Merge USED flags.
1291 2008-07-27 Jason Merrill <jason@redhat.com>
1294 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1296 2008-07-28 Richard Guenther <rguenther@suse.de>
1298 Merge from gimple-tuples-branch.
1300 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1302 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1305 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1307 * decl.c (finish_function): Call gimple_body after cp_genericize.
1309 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1311 * optimize.c: Include gimple.h instead of tree-gimple.h.
1312 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1313 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1316 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1318 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1320 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1322 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1324 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1326 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1328 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1329 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1330 (cxx_omp_clause_copy_ctor): Same.
1331 (cxx_omp_clause_assign_op): Same.
1333 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1335 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1336 (cp_gimplify_expr): Adjust caller.
1338 2008-05-11 Doug Kwan <dougkwan@google.com>
1340 * init.c (build_vec_delete): Add type conversion for argument
1341 0 of POINTER_PLUS_EXPR.
1343 2008-04-29 Doug Kwan <dougkwan@google.com>
1345 * decl2 (File): Include "gimple.h"
1346 (cp_write_global_declarations): Use gimple_body instead of
1348 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1350 2008-04-10 Diego Novillo <dnovillo@google.com>
1352 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1354 * optimize.c (maybe_clone_body): Re-enable call to
1356 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1357 code with call to gimple_unreachable.
1358 (cp_genericize): Fix handling of clone bodies.
1360 2008-04-04 Diego Novillo <dnovillo@google.com>
1362 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1364 * optimize.c (maybe_clone_body): Re-enable.
1366 2008-02-19 Diego Novillo <dnovillo@google.com>
1367 Oleg Ryjkov <olegr@google.com>
1369 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1371 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1372 argument to gimple_seq *. Update all users.
1373 (gimplify_must_not_throw_expr): Likewise.
1375 2008-02-04 Oleg Ryjkov <olegr@google.com>
1377 * except.c: Include gimple.h
1378 (cp_protect_cleanup_actions): Convert to tuples.
1379 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1381 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1383 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1384 instead of annotating each block manually.
1386 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1388 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1389 (gimplify_for_stmt): Same.
1390 (gimplify_switch_stmt): Same.
1391 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1393 [WHILE_STMT]: Return GS_OK.
1394 [SWITCH_STMT]: Same.
1395 [CONTINUE_STMT]: Same.
1397 (cp_genericize): Set gimple_body() of cloned functions when needed.
1399 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1401 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1402 (cp_gimplify_init_expr): Convert to tuples.
1403 (gimplify_must_not_throw_expr): Make function return a
1404 gimplify_status and convert to tuples.
1406 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1408 * cp-gimplify.c (genericize_try_block): Enable and do not call
1410 (genericize_catch_block): Same.
1411 (genericize_eh_spec_block): Same.
1412 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1413 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1415 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1417 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1418 * decl.c (finish_function): Use gimple_body instead of
1420 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1421 * cp-gimplify.c (genericize_try_block): Comment out.
1422 (genericize_catch_block): Same.
1423 (genericize_eh_spec_block): Same.
1424 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1425 (gimplify_for_stmt): Comment out.
1426 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1427 (cp_gimplify_omp_for): Same.
1428 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1429 Comment out call to gimplify_stmt and append_to_statement_list.
1430 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1431 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1432 (cp_gimplify_expr): Same.
1433 Comment out calls to genericize_*_block. Comment out call to
1436 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1439 * class.c (type_has_user_provided_default_constructor): Handle
1442 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1444 * decl.c (push_library_fn): Add a parameter for the exceptions that
1445 the function may throw.
1446 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1448 (build_library_fn): Change to static.
1449 * cp-tree.h: Adjust declarations.
1450 * except.c (declare_nothrow_library_fn): New.
1451 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1452 do_allocate_exception): Use the latter, adjust the declarations
1453 (ie, add empty exception-specification), consistently with the
1454 actual implementation in libsupc++.
1456 2008-07-25 Jan Hubicka <jh@suse.cz>
1458 * typeck.c (inline_conversion): Remove.
1459 (cp_build_function_call): Do not use inline_conversion.
1460 * decl.c (duplicate_decls): Do not insist on inline being declared
1462 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1463 from being output. We now remove static functions always.
1464 (finish_function): Do return warning on all static functions.
1465 * call.c (build_over_call): Do not use inline_conversion.
1466 * cp-tree.h (possibly_inlined_p): Declare.
1467 (inline_conversion): Remove.
1468 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1469 * decl2.c (cp_write_global_declarations): Likewise.
1470 (mark_used): Likewise.
1471 (possibly_inlined_p): New functions.
1473 2008-07-25 Jason Merrill <jason@redhat.com>
1475 * class.c (type_has_user_provided_default_constructor): Handle
1478 2008-07-23 Jan Hubicka <jh@suse.cz>
1480 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1481 (grogfndecl): Drop flag_inline_trees code.
1482 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1483 * lex.c (cxx_init): Do not set unit-at-a-time.
1485 2008-07-23 Jason Merrill <jason@redhat.com>
1487 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1488 trying to mangle a decl with no name.
1490 Implement defaulted/deleted functions as per N2346
1491 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1492 (DECL_DELETED_FN): New macro.
1493 (DECL_DEFAULTED_FN): New macro.
1494 * class.c (user_provided_p): New fn.
1495 (defaultable_fn_p): New fn.
1496 (type_has_user_provided_constructor): New fn.
1497 (type_has_user_provided_default_constructor): New fn.
1498 (check_methods): A defaulted fn is still trivial.
1499 (check_bases_and_members): Likewise.
1500 * decl.c (grok_special_member_properties): Likewise.
1501 (duplicate_decls): Complain about redeclaring a function as deleted.
1502 (start_decl): initialized==2 means deleted.
1503 (cp_finish_decl): Handle deleted/defaulted semantics.
1504 * decl2.c (grokfield): Likewise.
1505 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1506 Complain about using a deleted fn.
1507 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1508 (perform_member_init): Check for a user-provided default constructor
1509 even if TYPE_NEEDS_CONSTRUCTING.
1510 (build_new_1): Likewise.
1511 * call.c (build_over_call): Don't call mark_used twice.
1512 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1513 * search.c (check_final_overrider): Check for deleted mismatch.
1514 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1515 (cp_parser_pure_specifier): Handle =default and =delete.
1517 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1519 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1522 * typeck.c: All calls to pedwarn changed.
1523 * decl.c: All calls to pedwarn changed.
1524 * call.c: All calls to pedwarn changed.
1525 * error.c: All calls to pedwarn changed.
1526 * typeck2.c: All calls to pedwarn changed.
1527 * pt.c: All calls to pedwarn changed.
1528 * name-lookup.c: All calls to pedwarn changed.
1529 * parser.c: All calls to pedwarn changed.
1531 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1533 * call.c: Fix comment typos.
1534 * class.c: Likewise.
1535 * cp-tree.h: Likewise.
1536 * cxx-pretty-print.c: Likewise.
1539 * name-lookup.c: Likewise.
1540 * operators.def: Likewise.
1541 * parser.c: Likewise.
1544 * typeck.c: Likewise.
1546 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1550 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1551 copy constructors and copy assignment operators proper.
1553 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1555 * parser.c (cp_token): Remove in_system_header.
1556 (eof_token): Remove in_system_header.
1557 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1558 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1559 (cp_parser_member_declaration): Use in_system_header_at.
1560 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1561 (pop_tinst_level): Don't set in_system_header.
1562 (instantiate_class_template): Don't set in_system_header.
1563 (instantiate_decl): Don't set in_system_header.
1564 (instantiate_pending_templates): Don't set in_system_header.
1566 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1569 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1570 TYPE_NOTHROW_P, not TREE_NOTHROW.
1571 (trait_expr_value): Likewise.
1573 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1576 * call.c (convert_like_real): Don't take the error code path
1577 when a rvalue or base conversion has the bad_p field set.
1579 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1581 * rtti.c (emit_support_tinfos): Add char16_type_node and
1583 * typeck2.c (digest_init): Support char16_t and char32_t.
1585 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1587 * cvt.c (convert_to_void): Avoid C++ keywords.
1588 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1590 * friend.c (is_friend): Likewise.
1591 * init.c (perform_member_init): Likewise.
1592 * mangle.c (write_template_prefix, write_template_template_param):
1594 * name-lookup.c (do_namespace_alias, do_using_directive,
1595 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1596 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1597 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1599 * pt.c (is_specialization_of_friend, lookup_template_class,
1600 push_tinst_level, instantiate_class_template,
1601 tsubst_copy_and_build): Likewise.
1602 * tree.c (add_stmt_to_compound): Likewise.
1603 * typeck.c (finish_class_member_access_expr): Likewise.
1605 2008-07-17 Julian Brown <julian@codesourcery.com>
1606 Mark Mitchell <mark@codesourcery.com>
1608 * decl2.c (determine_visibility): Allow target to override
1609 visibility of class data.
1611 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1614 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1615 semantics to the current WP (N2691).
1617 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1620 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1621 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1622 complies with exception specification constraints.
1624 2008-07-14 Jason Merrill <jason@redhat.com>
1626 * lex.c (init_reswords): Always set D_OBJC.
1628 2008-07-11 Tom Tromey <tromey@redhat.com>
1629 Ian Lance Taylor <iant@google.com>
1631 * lex.c (struct resword, reswords): Don't define.
1632 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1633 (init_reswords): Clarify mask code. Use c_common_reswords rather
1636 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1639 * decl.c (grokdeclarator): Warn about initializing variables
1640 of storage class 'extern' only after the type of the declarator
1641 has been properly computed.
1643 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1646 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1647 carries the location of the primary type.
1648 * parser.c (cp_parser_check_type_definition): Update documentation.
1649 (cp_parser_check_for_definition_in_return_type,
1650 cp_parser_check_for_invalid_template_id,
1651 cp_parser_set_decl_spec_type,
1652 cp_parser_check_for_definition_in_return_type,
1653 cp_parser_diagnose_invalid_type_name,
1654 cp_parser_new_expression, cp_parser_explicit_instantiation,
1655 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1656 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1659 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1663 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1664 Add a location_t parameter so that
1665 error message can have a more accurate location.
1666 * cp-tree.h: Updated prototype
1667 * pt.c (tsubst_qualified_id): Use location in error messages.
1668 * parser.c (cp_parser_postfix_expression,
1669 cp_parser_objc_statement, cp_parser_trait_expr,
1670 cp_parser_token_is_class_key,
1671 cp_parser_uncommitted_to_tentative_parse_p,
1672 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1673 cp_parser_error, cp_parser_name_lookup_error,
1674 cp_parser_simulate_error, cp_parser_check_decl_spec,
1675 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1676 cp_parser_diagnose_invalid_type_name,
1677 cp_parser_parse_and_diagnose_invalid_type_name,
1678 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1679 cp_parser_string_literal, cp_parser_primary_expression,
1680 cp_parser_primary_expression, cp_parser_unqualified_id,
1681 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1682 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1683 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1684 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1685 cp_parser_jump_statement, cp_parser_block_declaration,
1686 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1687 cp_parser_function_specifier_opt, cp_parser_decltype,
1688 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1689 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1690 cp_parser_type_parameter, cp_parser_template_id,
1691 cp_parser_template_name, cp_parser_template_argument): Likewise.
1693 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1696 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1697 on function return type.
1699 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1702 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1703 on function return type in case of system header.
1705 2008-07-09 Raksit Ashok <raksit@google.com>
1707 * parser.c (cp_parser_postfix_expression): New warning based on flag
1708 warn_disallowed_functions.
1710 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1713 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1714 functions declared with a storage class qualifier.
1716 2008-07-03 Richard Guenther <rguenther@suse.de>
1719 * typeck.c (cp_build_function_call): Move code to verify
1720 builtin function arguments ...
1721 * call.c (build_cxx_call): ... here.
1723 2008-07-02 Jason Merrill <jason@redhat.com>
1725 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1727 Implement WG21 N2672, Initializer List proposed wording
1728 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1729 (struct lang_type_class): Add has_list_ctor bitfield.
1730 (TYPE_HAS_LIST_CTOR): New macro.
1731 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1732 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1733 (LOOKUP_NO_NARROWING): New macro.
1734 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1735 * parser.c (cp_parse_braced_list): Split out from...
1736 (cp_parser_initializer_clause): ...here.
1737 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1739 (cp_lexer_next_token_is_not_keyword): New fn.
1740 (cp_parser_parenthesized_expression_list): Handle { }.
1741 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1742 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1743 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1744 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1745 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1746 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1747 (cp_parser_save_member_function_body): Likewise.
1748 * call.c (conversion_kind): Add ck_list, ck_aggr.
1749 (struct conversion): Add check_narrowing bitfield, conversion list.
1750 (build_list_conv): New fn.
1751 (build_aggr_conv): New fn.
1752 (implicit_conversion): Call them.
1753 (standard_conversion): Set check_narrowing if appropriate.
1754 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1755 (build_user_type_conversion_1): When converting from an init list,
1756 we allow additional conversions except when calling a copy ctor.
1757 (convert_like_real): Calling an explicit ctor for an init list is
1758 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1759 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1760 class doesn't have a list ctor, break the {} into a TREE_LIST.
1761 (compare_ics): ck_list is better than other UDCs.
1762 (set_up_extended_ref_temp): Split out from initialize_reference.
1763 (is_std_init_list): New fn.
1764 (is_list_ctor): New fn.
1765 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1766 (reshape_init_array_1): Pass it to build_constructor.
1767 (reshape_init_class): Ditto.
1768 (initialize_artificial_var): Pass the appropriate type.
1769 (build_aggr_init_full_exprs): Split out from...
1770 (check_initializer): ...here. Handle new semantics.
1771 (build_init_list_var_init): New subroutine of check_initializer.
1772 (grokdeclarator): Converting constructors can have more than one parm.
1773 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1774 * init.c (expand_default_init): Only do digest_init for aggregates.
1775 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1776 build_constructor_from_list.
1777 (generic_initializer, ptr_initializer): Ditto.
1778 (ptm_initializer, class_initializer): Ditto.
1779 (get_pseudo_ti_init): Ditto.
1780 * error.c (dump_type): Handle init_list_type_node.
1781 (maybe_warn_cpp0x): New fn.
1782 (maybe_varn_variadic_templates): Call it.
1783 * cvt.c (ocp_convert): Handle conversion from { }.
1784 * tree.c (build_array_of_n_type): New fn.
1785 * typeck2.c (store_init_value): Use init_list_type_node.
1786 (digest_init): Likewise.
1787 (check_narrowing): New fn.
1788 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1789 of vector of constructor elts. Handle non-aggregate types. Make
1790 constant literals static.
1791 * pt.c: (tsubst_copy_and_build): Adjust.
1792 (unify): Handle { }.
1793 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1795 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1797 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1798 (comp_ptr_ttypes_const): Likewise.
1800 2008-07-01 Andrew Haley <aph@redhat.com>
1802 * decl.c (finish_constructor_body): Don't set the return value of
1803 the constructor if the constructor is that of a Java type.
1805 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1808 * decl2.c (is_late_template_attribute): If the first attribute
1809 argument is IDENTIFIER_NODE, don't consider it when checking
1810 if arguments are value or type dependent.
1812 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1815 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1818 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1820 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1822 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1825 * repo.c (repo_emit_p): Put const static data members initialized
1826 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1829 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1832 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1835 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1838 * typeck.c (cp_build_function_call): Show example syntax in
1841 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1843 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1844 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1845 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1846 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1847 pedwarn to permerror.
1848 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1849 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1850 * identify_goto, check_previous_goto_1, check_goto, define_label,
1851 check_tag_decl, start_decl, check_class_member_definition_namespace,
1852 grokfndecl, grokdeclarator): Likewise.
1853 * except.c (check_handlers): Likewise.
1854 * typeck2.c (digest_init): Likewise.
1855 * pt.c (check_specialization_namespace,
1856 check_explicit_instantiation_namespace,
1857 maybe_process_partial_specialization, check_explicit_specialization,
1858 convert_template_argument, do_decl_instantiation,
1859 do_type_instantiation, instantiate_decl): Likewise.
1860 * semantics.c (finish_template_type_parm): Likewise.
1861 * name-lookup.c (pushdecl_maybe_friend,
1862 check_for_out_of_scope_variable): Likewise.
1863 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1864 coerce_new_type): Likewise.
1865 * parser.c (cp_parser_nested_name_specifier_opt,
1866 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1867 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1868 (cp_parser_parameter_declaration): Check flag_permissive instead of
1869 flag_pedantic_errors.
1870 * call.c (joust): Change pedwarn to warning.
1871 * friend.c (make_friend_class): Likewise.
1873 2008-06-16 Jan Hubicka <jh@suse.cz>
1875 * method.c: Include cgraph.h.
1876 (use_thunk): Use cgraph_add_new_function instead of calling backend
1879 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1881 * parser.c: Fix comment typo.
1883 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1886 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1887 grokdeclarator and apply it to the created declaration.
1888 * cp-tree.h (grokbitfield): Update prototype.
1889 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1890 since they are now applied in grokbitfield. Adjusted the call to
1892 (cp_parser_objc_class_ivars): Likewise.
1894 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1897 * class.c (type_requires_array_cookie): Do not consider delete[]
1898 operators with an ellipsis as second argument.
1900 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1903 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1906 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1909 * pt.c (maybe_process_partial_specialization): Check the tree
1910 returned by push_template_decl for error_mark_node.
1911 * parser.c (cp_parser_class_head): Likewise, check the tree
1912 returned by the latter.
1914 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1917 * decl.c (grokdeclarator): In case of wrong return type return
1918 immediately error_mark_node.
1920 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1922 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1923 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1924 finish_omp_taskwait): New prototypes.
1925 (cxx_omp_clause_default_ctor): Add outer argument.
1926 (finish_omp_for): Add new clauses argument.
1927 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1928 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1929 (cxx_omp_clause_default_ctor): Add outer argument.
1930 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1931 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1932 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1933 Add par_clauses argument. If decl is present in parallel's
1934 lastprivate clause, change that clause to shared and add
1935 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1936 Fix wording of error messages. Adjust finish_omp_for caller.
1937 Add clauses argument. Parse loops with random access iterators.
1938 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1940 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1941 cp_parser_omp_for_loop callers.
1942 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1944 (cp_parser_omp_clause_name): Handle collapse and untied
1946 (cp_parser_omp_clause_schedule): Handle auto schedule.
1947 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1948 and PRAGMA_OMP_CLAUSE_UNTIED.
1949 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1950 (OMP_TASK_CLAUSE_MASK): Define.
1951 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1952 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1953 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1954 PRAGMA_OMP_TASKWAIT.
1955 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1956 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1957 (tsubst_omp_for_iterator): New function.
1958 (dependent_omp_for_p): New function.
1959 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1960 loops. Adjust finish_omp_for caller. Handle loops with random
1961 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1962 (tsubst_expr): Handle OMP_TASK.
1963 * semantics.c (cxx_omp_create_clause_info): New function.
1964 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1965 OMP_CLAUSE_COLLAPSE.
1966 (cxx_omp_predetermined_sharing): Removed.
1967 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1968 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1969 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1970 clauses argument. Fix check for type dependent cond or incr.
1971 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1972 fold_convert to convert incr amount to difference_type. Only
1973 fold if not in template. If decl is mentioned in lastprivate
1974 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1975 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1977 (finish_omp_threadprivate): Allow static class members of the
1979 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1980 finish_omp_taskwait): New functions.
1982 * parser.c (cp_parser_binary_expression): Add prec argument.
1983 (cp_parser_assignment_expression): Adjust caller.
1984 * cp-tree.h (outer_curly_brace_block): New prototype.
1985 * decl.c (outer_curly_brace_block): No longer static.
1987 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1990 * pt.c (push_template_decl_real): Consistently return error_mark_node
1993 2008-06-02 Tomas Bily <tbily@suse.cz>
1995 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1996 (cp_build_unary_op): Likewise.
1997 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1998 (maybe_warn_about_returning_address_of_local): Likewise.
2000 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
2003 * pt.c (tsubst_initializer_list): Consistently check the tree
2004 returned by tsubst_pack_expansion for error_mark_node.
2006 2008-05-27 Michael Matz <matz@suse.de>
2009 * call.c (build_new_op): Make warning conditional on
2012 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
2015 * call.c (convert_like_real): Convert bitfield to desired type
2016 before creating temporary.
2018 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2020 * Makefile.in: Adjusted dependencies on c-incpath.o.
2022 2008-05-23 Jakub Jelinek <jakub@redhat.com>
2025 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2026 fold_build_cleanup_point_expr on build_call_a results.
2029 * semantics.c (omp_clause_info_fndecl): New function.
2030 (finish_omp_clauses): Use it.
2032 2008-05-21 Jakub Jelinek <jakub@redhat.com>
2035 * cp-tree.h (check_array_initializer): New prototype.
2036 * decl.c (check_array_initializer): New function.
2037 (check_initializer): Call it.
2038 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2040 2008-05-21 Tom Tromey <tromey@redhat.com>
2042 * mangle.c (save_partially_mangled_name): Remove.
2043 (restore_partially_mangled_name): Likewise.
2044 (write_encoding): Update.
2045 (write_unqualified_name): Likewise.
2046 (start_mangling): Always use name_obstack. Remove 'ident_p'
2048 (get_identifier_nocopy): Remove.
2049 (finish_mangling_internal): Rename from finish_mangling.
2050 (finish_mangling): New function.
2051 (finish_mangling_get_identifier): Likewise.
2052 (partially_mangled_name, partially_mangled_name_len): Remove.
2053 (mangle_decl_string): Change return type. Update.
2054 (mangle_decl, mangle_type_string, mangle_special_for_type,
2055 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2056 mangle_ref_init_variable): Update.
2058 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2061 * semantics.c (begin_class_definition): Extend checks on the first
2064 2008-05-12 Tomas Bily <tbily@suse.cz>
2066 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2067 * call.c (build_over_call): Likewise.
2068 * error.c (dump_expr): Use CASE_CONVERT.
2069 * class.c (fixed_type_or_null): Likewise.
2071 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2073 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2075 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2078 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2080 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2081 DECL_LOOPING_CONST_OR_PURE_P attributes.
2082 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2085 2008-05-02 Simon Baldwin <simonb@google.com>
2088 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2090 2008-05-01 Simon Baldwin <simonb@google.com>
2092 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2094 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2097 * pt.c (more_specialized_fn): Stop the loop even if there are no
2098 arguments before ellipsis.
2100 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2103 * parser.c (cp_parser_lookup_name): Look through single function
2107 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2108 COMPOUND_EXPR if the second argument would be error_mark_node.
2110 2008-04-28 Jason Merrill <jason@redhat.com>
2111 Liu Guanwei <liu_gw@163.com>
2114 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2115 in default arguments.
2117 2008-04-25 Jan Hubicka <jh@suse.cz>
2119 * typeck.c (check_return_expr): Update.
2120 * decl.c (start_preparsed_function): Update.
2121 * method.c (use_thunk): Update.
2123 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2126 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2127 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2128 * decl2.c (is_late_template_attribute): Only make vector_size
2129 late tmpl attribute if argument is type or value dependent.
2130 (cp_reconstruct_complex_type): New function.
2132 2008-04-24 Richard Guenther <rguenther@suse.de>
2134 * typeck.c (cp_build_function_call): Call
2135 check_builtin_function_arguments.
2137 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2139 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2140 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2141 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2142 * class.c (build_base_path): Don't set TREE_INVARIANT.
2143 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2144 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2145 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2146 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2147 (generic_initializer): Don't set TREE_INVARIANT.
2148 (ptr_initializer): Don't set TREE_INVARIANT.
2149 (ptm_initializer): Don't set TREE_INVARIANT.
2150 (class_initializer): Don't set TREE_INVARIANT.
2151 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2152 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2153 (build_template_parm_index): Don't set TREE_INVARIANT.
2154 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2155 (process_template_parm): Don't set TREE_INVARIANT.
2157 2008-04-22 Jason Merrill <jason@redhat.com>
2160 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2161 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2162 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2164 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2167 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2168 expression is errorneous.
2170 2008-04-21 Jason Merrill <jason@redhat.com>
2173 * tree.c (cp_tree_equal): Handle FIXED_CST.
2176 * pt.c (template_template_parm_bindings_ok_p): Set
2177 processing_template_decl while in this function.
2179 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2181 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2182 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2183 char16_t and char32_t.
2184 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2185 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2186 extended builtin type "u8char{16,32}_t".
2187 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2189 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2190 (cp_parser_is_string_literal): Idem.
2191 (cp_parser_string_literal): Idem.
2192 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2194 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2195 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2196 * typeck.c (string_conv_p): Support char16_t and char32_t.
2198 2008-04-17 Jason Merrill <jason@redhat.com>
2201 * call.c (build_user_type_conversion_1): Represent second step of
2202 copy-init with an rvalue conversion.
2203 (convert_like_real) [ck_user]: Don't implicitly add it here.
2205 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2208 * decl.c (layout_var_decl): If extern or static var has variable
2209 size, set TREE_TYPE (decl) to error_mark_node.
2211 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2214 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2217 2008-04-09 Jason Merrill <jason@redhat.com>
2220 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2221 not a pushed variable.
2223 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2225 * call.c (build_op_delete_call): Fix quotation in warning message.
2226 * decl.c (grokdeclarator): Quote keyword in error message.
2227 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2230 * parser.c (cp_parser_check_type_definition): Print error string
2231 directly rather than using "%s".
2232 (cp_parser_postfix_expression): Fix quotation.
2233 (cp_parser_decltype): Likewise.
2234 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2236 * parser.c (cp_parser_non_integral_constant_expression): Build error
2237 message with CONCAT rather than using "%s".
2238 (cp_parser_primary_expression): Fix quotation.
2239 (cp_parser_postfix_expression): Likewise.
2240 (cp_parser_postfix_dot_deref_expression): Likewise.
2241 (cp_parser_unary_expression): Likewise.
2242 (cp_parser_new_expression): Likewise.
2243 (cp_parser_delete_expression): Likewise.
2245 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2246 as `)', not as `('. Fix quotation.
2247 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2248 (cp_parser_primary_expression): Likewise.
2249 (cp_parser_nested_name_specifier_opt): Likewise.
2250 (cp_parser_postfix_expression): Likewise.
2251 (cp_parser_postfix_open_square_expression): Likewise.
2252 (cp_parser_parenthesized_expression_list): Likewise.
2253 (cp_parser_pseudo_destructor_name): Likewise.
2254 (cp_parser_new_expression): Likewise.
2255 (cp_parser_direct_new_declarator): Likewise.
2256 (cp_parser_delete_expression): Likewise.
2257 (cp_parser_cast_expression): Likewise.
2258 (cp_parser_question_colon_clause): Likewise.
2259 (cp_parser_builtin_offsetof): Likewise.
2260 (cp_parser_trait_expr): Likewise.
2261 (cp_parser_label_for_labeled_statement): Likewise.
2262 (cp_parser_compound_statement): Likewise.
2263 (cp_parser_selection_statement): Likewise.
2264 (cp_parser_condition): Likewise.
2265 (cp_parser_iteration_statement): Likewise.
2266 (cp_parser_already_scoped_statement): Likewise.
2267 (cp_parser_simple_declaration): Likewise.
2268 (cp_parser_linkage_specification): Likewise.
2269 (cp_parser_static_assert): Likewise.
2270 (cp_parser_decltype): Likewise.
2271 (cp_parser_conversion_function_id): Likewise.
2272 (cp_parser_operator_function_id): Likewise.
2273 (cp_parser_operator): Likewise.
2274 (cp_parser_type_parameter): Likewise.
2275 (cp_parser_template_id): Likewise.
2276 (cp_parser_explicit_instantiation): Likewise.
2277 (cp_parser_explicit_specialization): Likewise.
2278 (cp_parser_enum_specifier): Likewise.
2279 (cp_parser_namespace_definition): Likewise.
2280 (cp_parser_namespace_alias_definition): Likewise.
2281 (cp_parser_using_declaration): Likewise.
2282 (cp_parser_using_directive): Likewise.
2283 (cp_parser_asm_definition): Likewise.
2284 (cp_parser_direct_declarator): Likewise.
2285 (cp_parser_ptr_operator): Likewise.
2286 (cp_parser_parameter_declaration_clause): Likewise.
2287 (cp_parser_initializer_clause): Likewise.
2288 (cp_parser_class_specifier): Likewise.
2289 (cp_parser_member_specification_opt): Likewise.
2290 (cp_parser_member_declaration): Likewise.
2291 (cp_parser_pure_specifier): Likewise.
2292 (cp_parser_constant_initializer): Likewise.
2293 (cp_parser_base_clause): Likewise.
2294 (cp_parser_exception_specification_opt): Likewise.
2295 (cp_parser_try_block): Likewise.
2296 (cp_parser_function_try_block): Likewise.
2297 (cp_parser_handler): Likewise.
2298 (cp_parser_throw_expression): Likewise.
2299 (cp_parser_asm_operand_list): Likewise.
2300 (cp_parser_attributes_opt): Likewise.
2301 (cp_parser_label_declaration): Likewise.
2302 (cp_parser_constructor_declarator_p): Likewise.
2303 (cp_parser_template_declaration_after_export): Likewise.
2304 (cp_parser_single_declaration): Likewise.
2305 (cp_parser_objc_message_expression): Likewise.
2306 (cp_parser_objc_message_args): Likewise.
2307 (cp_parser_objc_encode_expression): Likewise.
2308 (cp_parser_objc_defs_expression): Likewise.
2309 (cp_parser_objc_protocol_expression): Likewise.
2310 (cp_parser_objc_selector_expression): Likewise.
2311 (cp_parser_objc_protocol_refs_opt): Likewise.
2312 (cp_parser_objc_typename): Likewise.
2313 (cp_parser_objc_method_keyword_params): Likewise.
2314 (cp_parser_objc_superclass_or_category): Likewise.
2315 (cp_parser_objc_try_catch_finally_statement): Likewise.
2316 (cp_parser_objc_synchronized_statement): Likewise.
2317 (cp_parser_objc_throw_statement): Likewise.
2318 (cp_parser_omp_var_list_no_open): Likewise.
2319 (cp_parser_omp_clause_default): Likewise.
2320 (cp_parser_omp_clause_if): Likewise.
2321 (cp_parser_omp_clause_num_threads): Likewise.
2322 (cp_parser_omp_clause_reduction): Likewise.
2323 (cp_parser_omp_clause_schedule): Likewise.
2324 (cp_parser_omp_critical): Likewise.
2325 (cp_parser_omp_for_loop): Likewise.
2326 (cp_parser_omp_sections_scope): Likewise.
2328 * parser.c (cp_parser_template_parameter_list): Simplify.
2330 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2332 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2334 2008-04-07 Jason Merrill <jason@redhat.com>
2337 * class.c (type_has_user_nondefault_constructor): A template
2338 counts as a nondefault constructor.
2340 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2342 * decl.c (cxx_push_function_context): Delete.
2343 (cxx_pop_function_context): Delete.
2344 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2346 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2347 LANG_HOOKS_FUNCTION_FINAL): Delete.
2348 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2349 LANG_HOOKS_MISSING_NORETURN_OK_P.
2350 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2352 * semantics.c (current_stmt_tree): Fix comment.
2354 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2357 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2358 before calling fold_offsetof.
2360 2008-04-03 Tom Tromey <tromey@redhat.com>
2362 * Make-lang.in (c++_OBJS): New variable.
2364 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2366 * optimize.c (clone_body): New, from tree-inline.c.
2368 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2370 * method.c (synthesize_method): Use {push,pop}_function_context.
2371 * name-lookup.c (push_to_top_level): Likewise.
2372 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2374 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2377 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2380 2008-03-27 Tom Tromey <tromey@redhat.com>
2382 * Make-lang.in: Revert automatic dependency patch.
2384 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2387 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2388 (build_compound_expr): New, for compatibility with C
2389 build_compound_expr.
2390 (cp_build_compound_expr): Renamed from build_compound_expr.
2391 (build_c_cast): New, for compatibility with C build_c_cast.
2392 (cp_build_c_cast): Renamed from build_c_cast.
2393 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2394 * decl.c (cxx_maybe_build_cleanup): Ditto.
2395 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2396 (cp_build_compound_expr): Renamed from build_compound_expr.
2397 (build_c_cast): Add C-compatible prototype.
2398 (cp_build_c_cast): Renamed from build_c_cast.
2399 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2400 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2402 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2404 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2405 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2406 ending in a pack expansion, both of which can occur when
2407 substituting into a nested template.
2408 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2409 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2410 * parser.c (cp_parser_template_parameter): Deal with unnamed
2411 non-type template parameter packs identified by pack expansions in
2414 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2417 * pt.c (apply_late_template_attributes): Don't call tsubst on
2418 first attribute argument if it is IDENTIFIER_NODE.
2421 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2422 and LTGT_EXPR to pp_expression.
2424 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2426 * pt.c (coerce_template_template_parm): Moved the body of the loop
2427 of coerce_template_template_parms here, to make iteration over a
2428 template argument pack simpler.
2429 Also, allow matching of a template parameter pack in the template
2430 template parameter to a template parameter in the template
2432 (coerce_template_template_parms): Deal with variadic template
2433 template parameters. Use coerce_template_template_parm.
2434 (unify): Make sure we coerce the template template argument's
2435 template arguments to the template template parameter's template
2436 parameters, not the other way around.
2438 2008-03-25 Tom Tromey <tromey@redhat.com>
2440 * Make-lang.in: Remove .o targets.
2441 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2443 (c++_OBJS): New variable.
2444 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2446 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2448 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2449 (composite_pointer_type): Ditto.
2450 (common_type): Fix call to composite_pointer_type.
2451 (cxx_sizeof_nowarn): New; used to be a macro.
2452 (cxx_sizeof_expr): Add SFINAE support.
2453 (cxx_alignof_expr): Ditto.
2454 (decay_conversion): Fix calls for SFINAE support.
2455 (rationalize_conditional_expr): Add SFINAE support.
2456 (build_class_member_access_expr): Ditto.
2457 (finish_class_member_access_expr): Ditto.
2458 (build_x_indirect_ref): Ditto.
2459 (build_indirect_ref): Original version renamed to
2460 cp_build_indirect_ref; new version provides a bridge from
2462 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2464 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2465 (build_function_call): Original version renamed to
2466 cp_build_function_call; new version provides a bridge from
2468 (cp_build_function_call): Was build_function_call; added SFINAE
2470 (convert_arguments): Add SFINAE support.
2471 (build_x_binary_op): Ditto.
2472 (build_binary_op): Original version renamed to cp_build_binary_op;
2473 new version provides a bridge from c-common.
2474 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2475 (pointer_diff): Fix calls for SFINAE.
2476 (build_x_unary_op): Add SFINAE support.
2477 (condition_conversion): Fix calls for SFINAE.
2478 (build_unary_op): Original version renamed to cp_build_unary_op;
2479 new version provides a bridge from c-common.
2480 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2481 (unary_complex_lvalue): Fix calls for SFINAE.
2482 (build_x_conditional_expr): Add SFINAE support.
2483 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2484 (build_x_compound_expr): Add SFINAE support.
2485 (convert_ptrmem): Fix calls for SFINAE.
2486 (build_static_cast_1): Add SFINAE support.
2487 (build_static_cast): Ditto.
2488 (build_reinterpret_cast_1): Ditto.
2489 (build_reinterpret_cast): Ditto.
2490 (build_const_cast_1): Ditto.
2491 (build_const_cast): Ditto.
2492 (build_c_cast): Ditto.
2493 (build_modify_expr): Original version renamed to
2494 cp_build_modify_expr; new version provides a bridge from c-common.
2495 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2497 (build_x_modify_expr): Add SFINAE support.
2498 (build_ptrmemfunc): Fix calls for SFINAE.
2499 (convert_for_assignment): Add SFINAE support.
2500 (convert_for_initialization): Ditto.
2501 (check_return_expr): Fix calls for SFINAE.
2502 (lvalue_or_else): Add SFINAE support.
2503 * init.c (perform_member_init): Fix calls for SFINAE.
2504 (emit_mem_initializers): Ditto.
2505 (expand_virtual_init): Ditto.
2506 (expand_cleanup_for_base): Ditto.
2507 (build_aggr_init): Add SFINAE support.
2508 (expand_default_init): Ditto.
2509 (expand_aggr_init_1): Fix calls for SFINAE.
2510 (build_offset_ref): Ditto.
2511 (build_new_1): Add SFINAE support.
2513 (build_vec_delete_1): Fix calls for SFINAE.
2514 (get_temp_regvar): Ditto.
2515 (build_vec_init): Add SFINAE support.
2516 (build_dtor_call): Fix calls for SFINAE.
2517 (build_delete): Ditto.
2518 (push_base_cleanups): Ditto.
2519 (build_vec_delete_1): Ditto.
2520 * class.c (build_base_path): Fix calls for SFINAE.
2521 (build_simple_base_path): Ditto.
2522 (convert_to_base_statically): Ditto.
2523 (build_vfn_ref): Ditto.
2524 (resolve_address_of_overloaded_function): Ditto.
2525 * decl.c (check_initializer): Fix calls for SFINAE.
2526 (register_dtor_fn): Ditto.
2527 (compute_array_index_type): Ditto.
2528 (finish_enum): Ditto.
2529 (start_preparsed_function): Ditto.
2530 (cxx_maybe_build_cleanup): Ditto.
2531 * call.c (convert_like): Add COMPLAIN argument.
2532 (convert_like_with_context): Ditto.
2533 (build_this): Fix calls for SFINAE.
2534 (build_user_type_conversion): Ditto.
2535 (resolve_args): Ditto.
2536 (build_new_function_call): Add SFINAE support.
2537 (build_operator_new_call): Fix calls for SFINAE.
2538 (build_object_call): Add SFINAE support.
2539 (build_conditional_expr): Ditto.
2540 (build_new_op): Ditto.
2541 (build_op_delete_call): Fix calls for SFINAE.
2542 (build_temp): Ditto.
2543 (convert_like_real): Add SFINAE support.
2544 (build_x_va_arg): Fix calls for SFINAE.
2545 (convert_default_arg): Ditto.
2546 (build_over_call): Add SFINAE support.
2547 (build_java_interface_fn_ref): Fix calls for SFINAE.
2548 (build_special_member_call): Add SFINAE support.
2549 (build_new_method_call): Ditto.
2550 (perform_implicit_conversion): Ditto.
2551 (perform_direct_initialization_if_possible): Ditto.
2552 (initialize_reference): Fix calls for SFINAE.
2553 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2554 * rtti.c (build_headof): Fix calls for SFINAE.
2555 (get_tinfo_decl_dynamic): Ditto.
2556 (get_typeid): Ditto.
2557 (build_dynamic_cast_1): Add SFINAE support.
2558 (build_dynamic_cast): Ditto.
2559 (tinfo_base_init): Fix calls for SFINAE.
2560 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2561 (do_end_catch): Ditto.
2562 (initialize_handler_parm): Ditto.
2563 (expand_start_catch_block): Ditto.
2564 (do_allocate_exception): Ditto.
2565 (do_free_exception): Ditto.
2566 (build_throw): Ditto.
2567 * cvt.c (build_up_reference): Fix calls for SFINAE.
2568 (convert_to_reference): Ditto.
2569 (ocp_convert): Ditto.
2570 (convert_to_void): Add SFINAE support.
2571 * tree.c (build_dummy_object): Fix calls for SFINAE.
2572 (stabilize_expr): Ditto.
2573 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2575 (build_new_method_call): Ditto.
2576 (build_special_member_call): Ditto.
2577 (build_new_op): Ditto.
2578 (perform_implicit_conversion): Ditto.
2579 (perform_direct_initialization_if_possible): Ditto.
2580 (convert_to_void): Ditto.
2581 (build_aggr_init): Ditto.
2583 (build_vec_init): Ditto.
2584 (build_dynamic_cast): Ditto.
2585 (finish_call_expr): Ditto
2586 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2587 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2588 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2589 (finish_class_member_access_expr): Ditto.
2590 (build_x_indirect_ref): Ditto.
2591 (cp_build_indirect_ref): New.
2592 (cp_build_function_call): Add tsubst_flags_t parameter.
2593 (build_x_unary_op): Ditto.
2594 (cp_build_unary_op): New.
2595 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2596 (build_x_compound_expr): Ditto.
2597 (build_compound_expr): Ditto.
2598 (build_static_cast): Ditto.
2599 (build_reinterpret_cast): Ditto.
2600 (build_const_cast): Ditto.
2601 (build_c_cast): Ditto.
2602 (build_x_modify_expr): Ditto.
2603 (cp_build_modify_expr): New.
2604 (convert_for_initialization): Add tsubst_flags_t parameter.
2605 (cp_build_binary_op): Remove macro; add function declaration.
2606 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2607 (lvalue_or_else): Ditto.
2608 (build_functional_cast): Ditto.
2609 * typeck2.c (digest_init): Fix calls for SFINAE.
2610 (process_init_constructor_array): Ditto.
2611 (process_init_constructor_record): Ditto.
2612 (build_x_arrow): Ditto.
2613 (build_m_component_ref): Ditto.
2614 (build_functional_cast): Add SFINAE support.
2615 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2616 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2617 (finish_expr_stmt): Ditto.
2618 (finish_for_expr): Ditto.
2619 (finish_asm_stmt): Ditto.
2620 (finish_non_static_data_member): Ditto.
2621 (finish_qualified_id_expr): Ditto.
2622 (finish_call_expr): Add SFINAE support.
2623 (finish_increment_expr): Fix calls for SFINAE.
2624 (finish_unary_op_expr): Ditto.
2625 (simplify_aggr_init_expr): Ditto.
2626 (finish_omp_clauses): Ditto.
2627 (finish_omp_for): Ditto.
2628 (finish_omp_barrier): Ditto.
2629 (finish_omo_flush): Ditto.
2630 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2631 (build_anon_union_vars): Ditto.
2632 (get_guard_cond): Ditto.
2634 (one_static_initialization_or_destruction): Ditto.
2635 (do_static_initialization_or_destruction): Ditto.
2636 (generate_ctor_or_dtor_function): Ditto.
2637 (build_offset_ref_call_from_tree): Ditto.
2638 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2639 (cp_parser_postfix_dot_deref_expression): Ditto.
2640 (cp_parser_unary_expression): Ditto.
2641 (cp_parser_new_expression): Ditto.
2642 (cp_parser_cast_expression): Ditto.
2643 (cp_parser_binary_expression): Ditto.
2644 (cp_parser_question_colon_clause): Ditto.
2645 (cp_parser_assignment_expression): Ditto.
2646 (cp_parser_expression): Ditto.
2647 (cp_parser_builtin_offsetof): Ditto.
2648 (cp_parser_template_argument): Ditto.
2649 (cp_parser_functional_cast): Ditto.
2651 2008-03-24 Tom Tromey <tromey@redhat.com>
2653 * lex.c (handle_pragma_interface): Don't copy the filename.
2654 (handle_pragma_implementation): Copy filename using xstrdup.
2656 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2658 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2659 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2660 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2661 (PROMOTES_TO_AGGR_TYPE): Remove.
2662 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2663 * typeck.c (unary_complex_lvalue, build_modify_expr,
2664 convert_for_initialization): Adjust.
2665 * init.c (is_aggr_type): Remove.
2666 (is_class_type): Add.
2667 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2668 build_delete): Adjust.
2669 * lex.c (make_aggr_type): Remove.
2670 (make_class_type): Add.
2671 (cxx_make_type): Adjust.
2672 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2674 * decl.c (build_typename_type, make_typename_type,
2675 make_unbound_class_template, cxx_init_decl_processing,
2676 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2677 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2678 grok_op_properties, xref_tag, check_function_type): Adjust.
2679 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2680 add_builtin_candidate, add_builtin_candidates,
2681 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2682 is_subseq, compare_ics): Adjust.
2683 * method.c (use_thunk): Adjust.
2684 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2685 create_tinfo_types): Adjust.
2686 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2687 build_up_reference, convert_to_reference, convert_from_reference,
2688 ocp_convert, build_expr_type_conversion): Adjust.
2689 * tree.c (bind_template_template_parm, error_type): Adjust.
2690 * dump.c (cp_dump_tree): Adjust.
2691 * search.c (lookup_member): Adjust.
2692 * friend.c (make_friend_class, do_friend): Adjust.
2693 * typeck2.c (store_init_value, process_init_constructor_array,
2694 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2695 build_functional_cast): Adjust.
2696 * pt.c (finish_member_template_decl, process_template_parm,
2697 lookup_template_class, tsubst_function_type, tsubst,
2698 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2700 * semantics.c (begin_class_definition, finish_base_specifier,
2701 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2703 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2704 do_class_using_decl, lookup_qualified_name,
2705 maybe_process_template_type_declaration): Adjust.
2706 * decl2.c (grok_array_decl, check_member_template,
2707 constrain_class_visibility): Adjust.
2708 * parser.c (cp_parser_class_name): Adjust.
2710 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2712 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2714 2008-03-17 Jason Merrill <jason@redhat.com>
2717 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2718 a temp directly to a reference as per DR391.
2720 2008-03-12 Richard Guenther <rguenther@suse.de>
2724 2008-02-04 Richard Guenther <rguenther@suse.de>
2727 * decl.c (record_builtin_java_type): Make jboolean a
2728 integer type again where its mode doesn't match that of bool.
2730 2008-01-25 Richard Guenther <rguenther@suse.de>
2733 * decl.c (record_builtin_java_type): Make __java_boolean
2735 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2736 after TYPE_MAIN_VARIANT check.
2738 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2741 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2745 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2746 DECL_P in not a variable and appears more than once error messages.
2748 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2752 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2756 * typeck.c (structural_comptypes): Call cp_comptypes.
2757 (comptypes): New; called from the C/C++ common bits to perform
2759 (cp_comptypes): Renamed from comptypes, which is already used,
2760 with a different signature, by the C++ front end.
2761 (build_reinterpret_cast_1): Call cp_comptypes.
2762 (ptr_reasonably_similar): Ditto.
2763 * decl.c (decls_match): Ditto.
2764 * cvt.c (convert_to_reference): Ditto.
2765 * cp-tree.h (same_type_p): Ditto.
2766 (same_or_base_type_p): Ditto.
2767 (comptypes): Rename to cp_comptypes.
2768 * pt.c (canonical_type_parameter): Call cp_comptypes.
2770 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2772 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2773 test for equivalence between pointer and references.
2775 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2778 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2779 (check_field_decls): Likewise.
2780 (note_name_declared_in_class): Likewise.
2781 * call.c (build_new_op): Likewise.
2782 (convert_like_real): Likewise.
2783 (build_over_call): Likewise.
2784 * lex.c (unqualified_fn_lookup_error): Likewise.
2785 * parser.c (cp_parser_template_id): Likewise.
2786 * cvt.c (warn_ref_binding): Likewise.
2787 (convert_to_reference): Likewise.
2788 (ocp_convert): Likewise.
2789 (convert_to_void): Use error instead of pedwarn.
2790 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2791 * decl.c (compute_array_index_type): Use constant_expression_error.
2793 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2795 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2796 that auto is either a storage class or a simple type specifier,
2797 depending on the dialect.
2798 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2799 specifier in C++98 mode, error in C++0x mode (since we don't
2800 support auto as a type specifier, yet).
2801 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2802 storage specifier in C++0x mode.
2803 (cp_parser_simple_type_specifier): Parse `auto' as a
2804 simple-type-specifier, but error because we don't support it yet.
2806 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2808 * parser.c (cp_parser_nonclass_name): New.
2809 (cp_parser_pseudo_destructor_name): Use it instead of
2810 cp_parser_type_name.
2811 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2813 2008-02-29 Tom Tromey <tromey@redhat.com>
2815 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2816 (cp_lexer_get_preprocessor_token): Update.
2817 (cp_lexer_set_source_position_from_token): Don't call
2818 restore_input_file_stack.
2819 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2821 2008-02-28 Richard Guenther <rguenther@suse.de>
2824 2008-02-26 Richard Guenther <rguenther@suse.de>
2826 * decl.c (duplicate_decls): Remove decl from global mapping
2827 before ggc_freeing it.
2829 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2832 * rtti.c: Include c-pragma.h.
2833 (push_abi_namespace, pop_abi_namespace): New functions.
2834 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2835 create_tinfo_types, emit_support_tinfos): Use them.
2836 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2838 2008-02-26 Jason Merrill <jason@redhat.com>
2841 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2842 to name the struct for linkage purposes even if it has attributes.
2843 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2845 2008-02-26 Tom Tromey <tromey@redhat.com>
2847 * parser.c (eof_token): Remove old location code.
2848 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2849 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2851 (cp_write_global_declarations): Likewise.
2852 * lex.c (cxx_init): Remove old location code.
2853 (handle_pragma_implementation): Remove test of
2854 USE_MAPPED_LOCATION.
2855 * pt.c (tsubst): Remove old location code.
2856 * error.c (cp_print_error_function): Remove test of
2857 USE_MAPPED_LOCATION.
2858 * decl.c (pop_label): Remove old location code.
2859 (finish_function): Likewise.
2861 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2864 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2866 2008-02-26 Richard Guenther <rguenther@suse.de>
2868 * decl.c (duplicate_decls): Remove decl from global mapping
2869 before ggc_freeing it.
2871 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2874 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2876 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2878 * typeck.c (build_class_member_access_expr): Add appropriate
2879 OPT_W* parameter to warning.
2880 (build_reinterpret_cast_1): Likewise.
2881 * name-lookup.c (push_overloaded_decl): Likewise.
2883 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2886 * error.c (dump_expr): Handle CONJ_EXPR.
2888 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2891 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2892 (dump_expr): Handle FIXED_CST.
2894 2008-02-24 Jason Merrill <jason@redhat.com>
2896 * parser.c (cp_parser_declaration): Handle "inline namespace".
2897 (cp_parser_namespace_definition): Likewise.
2900 * name-lookup.c (arg_assoc_namespace): Look down into inline
2903 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2905 * typeck.c (check_for_casting_away_constness): Use 1 single
2906 argument, the type of cast, to decide what diagnostics generate.
2907 (build_static_cast_1): Remove unused code. Update call to
2908 check_for_casting_away_constness.
2909 (build_reinterpret_cast_1): Update call to
2910 check_for_casting_away_constness.
2911 (build_const_cast_1): Likewise.
2913 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2915 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2916 VEC_NEW_EXPR), forward to pp_expression.
2917 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2919 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2922 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2924 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2927 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2928 template decls' function decl.
2930 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2934 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2937 * pt.c (determine_specialization): In case of function templates,
2938 when the type of DECL does not match FN there is no match.
2940 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2943 * typeck.c (build_binary_op): Warn about floating point
2944 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2946 2008-02-19 Jason Merrill <jason@redhat.com>
2949 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2950 while we look for possible bindings.
2952 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2955 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2959 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2960 vars. Afterwards ensure v is VAR_DECL.
2963 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2964 call cp_finish_decl.
2965 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2968 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2973 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2974 is error_mark_node, return an error early.
2975 (find_parameter_packs_r): Pass the pointer set along to recursive
2976 calls of cp_walk_subtrees; don't try to manage the pointer set
2978 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2979 (make_pack_expansion): Ditto.
2980 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2981 a second pass through the tree with find_parameter_packs_r; that
2982 second pass no longer does anything.
2983 (push_template_decl_real): If we have an erroneous declaration,
2984 set its type to error_mark_node before returning an error.
2986 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2989 * pt.c (tsubst_initializer_list): Deal with the use of
2990 VOID_TYPE_NODE to indicate value-initialization of the bases.
2992 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2993 Jason Merrill <jason@redhat.com>
2997 * class.c (type_has_user_nondefault_constructor): New fn.
2998 * cp-tree.h: Declare it.
2999 * init.c (emit_mem_initializers): Use it for -W warning about
3000 missing base initializer.
3002 2008-02-14 Paolo Carlini <pcarlini@suse.de>
3005 * pt.c (determine_specialization): In case of function templates,
3006 when the type of DECL does not match FN there is no match.
3008 2008-02-13 Jakub Jelinek <jakub@redhat.com>
3009 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3012 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
3013 are not identifier :: ~, return before calling cp_parser_type_name.
3015 2008-02-13 Jason Merrill <jason@redhat.com>
3017 PR c++/34962, c++/34937, c++/34939
3018 * decl2.c (is_late_template_attribute): Always defer attributes
3019 vector_size and weak.
3022 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3023 of enumerators, too.
3025 2008-02-12 Jason Merrill <jason@redhat.com>
3028 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3029 if we're doing conversions to call a user-defined conversion function.
3031 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
3034 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3037 2008-02-12 Jakub Jelinek <jakub@redhat.com>
3040 * init.c (build_new_1): Don't create placement_expr before
3041 constructing alloc_call. Verify that the pointer is passed by
3042 value to operator new.
3044 2008-02-11 Jason Merrill <jason@redhat.com>
3047 * pt.c (tsubst): Don't look up a template typedef in an explicit
3050 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3053 * tree.c (cp_build_qualified_type_real): When building a
3054 cv-qualified array type, build it as a unique type with
3055 build_cplus_array_type_1 and then adopt the unqualified type's
3058 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3061 * decl.c (groktypename): Check grokdeclarator return.
3063 2008-02-10 Jason Merrill <jason@redhat.com>
3066 * decl2.c (cp_write_global_declarations): Don't write out static
3067 data members with DECL_IN_AGGR_P set.
3069 2008-02-08 Jason Merrill <jason@redhat.com>
3072 * tree.c (build_target_expr_with_type): Handle void initializer.
3073 (bot_manip): Remap slot before recursing.
3075 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3078 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3080 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3083 * tree.c: Include tree-flow.h.
3084 (build_target_expr): Check type compatibility.
3085 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3086 * call.c (convert_like_real): Convert bitfield to expected type.
3088 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3092 * typeck.c (structural_comptypes): Call cp_comptypes.
3093 (comptypes): New; called from the C/C++ common bits to perform
3095 (cp_comptypes): Renamed from comptypes, which is already used,
3096 with a different signature, by the C++ front end.
3097 (build_reinterpret_cast_1): Call cp_comptypes.
3098 (ptr_reasonably_similar): Ditto.
3099 * decl.c (decls_match): Ditto.
3100 * cvt.c (convert_to_reference): Ditto.
3101 * cp-tree.h (same_type_p): Ditto.
3102 (same_or_base_type_p): Ditto.
3103 (comptypes): Rename to cp_comptypes.
3104 * pt.c (canonical_type_parameter): Call cp_comptypes.
3106 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3109 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3110 value dependent expression.
3112 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3115 * decl2.c (save_template_attributes): When we're modifying the
3116 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3117 all of the other variants to add those same attributes. Otherwise,
3118 the main variant will be inconsistent with those other variants.
3120 2008-02-04 Richard Guenther <rguenther@suse.de>
3123 * decl.c (record_builtin_java_type): Make jboolean a
3124 integer type again where its mode doesn't match that of bool.
3126 2008-02-02 Jason Merrill <jason@redhat.com>
3127 Mark Mitchell <mark@codesourcery.com>
3130 * init.c (build_value_init_1): New function.
3131 (build_value_init): New function.
3132 * typeck2.c (build_functional_cast): Call it.
3133 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3135 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3136 TYPE_HAS_CONSTRUCTOR.
3137 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3138 add_implicitly_declared_members): Adjust.
3139 (check_field_decls): Adjust. Remove warnings about reference/const
3140 in class without constructor.
3141 (check_bases_and_members): Adjust. Give those warnings here instead.
3142 * decl.c (fixup_anonymous_aggr): Adjust.
3143 (check_initializer): Adjust, clarify logic slightly.
3144 (grok_special_member_properties): Adjust, only set if user-provided.
3145 * rtti.c (create_tinfo_types): Don't set.
3146 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3147 Use same_type_ignoring_top_level_qualifiers_p.
3148 * pt.c (check_explicit_specialization): Adjust.
3149 (instantiate_class_template): Adjust.
3151 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3152 Jakub Jelinek <jakub@redhat.com>
3156 * typeck.c (structural_comptypes): Handle comparisons of
3157 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3159 * mangle.c (write_builtin_type): Map down to the canonical type,
3160 which will be one of the predefined type nodes.
3162 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3165 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3166 bits to allow for expansion of the number of middle end tree
3169 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3180 * typeck.c (check_return_expr): Tweak call to
3181 check_for_bare_parameter_packs.
3182 * class.c (add_method): Be careful with error_mark_nodes.
3183 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3185 * pt.c (struct find_parameter_pack_data): Remove
3187 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3188 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3189 (make_pack_expansion): Ditto.
3190 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3192 (process_template_parm): Tweak call to
3193 check_for_bare_parameter_packs.
3194 (push_template_decl_real): Tweak calls to
3195 check_for_bare_parameter_packs. If bare parameter packs are found
3196 in the list of exceptions, clear out that list after giving an
3198 * semantics.c (finish_cond): Tweak call to
3199 check_for_bare_parameter_packs.
3200 (finish_expr_stmt): Ditto.
3201 (finish_for_expr): Ditto.
3202 (finish_switch_cond): Ditto.
3203 (finish_mem_initializers): Ditto.
3204 (finish_member_declaration): Ditto.
3205 (finish_static_assert): Check for bare parameter packs in the
3207 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3208 attributes of a declaration.
3209 * parser.c (cp_parser_using_declaration): Tweak call to
3210 check_for_bare_parameter_packs.
3211 (cp_parser_base_clause): Ditto.
3213 2008-01-28 Jason Merrill <jason@redhat.com>
3216 * class.c (build_base_path): Fix !want_pointer case.
3218 2008-01-27 Jason Merrill <jason@redhat.com>
3221 * class.c (build_base_path): Fix previous change.
3223 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3226 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3229 2008-01-26 Richard Guenther <rguenther@suse.de>
3232 * typeck.c (build_binary_op): Remove code to shorten compares.
3234 2008-01-25 Richard Guenther <rguenther@suse.de>
3237 * decl.c (record_builtin_java_type): Make __java_boolean
3239 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3240 after TYPE_MAIN_VARIANT check.
3242 2008-01-25 Jason Merrill <jason@redhat.com>
3245 * class.c (build_base_path): Don't mess with virtual access if
3247 * call.c (standard_conversion): Don't check whether source type
3250 * decl2.c (is_late_template_attribute): Don't defer attribute
3251 visibility just because the type is dependent.
3253 2008-01-25 Jason Merrill <jason@redhat.com>
3254 Mark Mitchell <mark@codesourcery.com>
3257 * call.c (standard_conversion): Allow conversion from integer/real
3259 (compare_ics): Such a conversion is worse than a normal arithmetic
3262 2008-01-25 Richard Guenther <rguenther@suse.de>
3265 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3268 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3271 * pt.c (push_template_decl_real): Return error_mark_node in case
3272 of template definition of non-template.
3274 2008-01-24 Jason Merrill <jason@redhat.com>
3277 * decl2.c (is_late_template_attribute): Defer any attribute with
3278 dependent args. Also defer type attributes if the type is dependent.
3280 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3281 Alexandre Oliva <aoliva@redhat.com>
3284 * call.c (reference_binding): For bitfields use the declared bitfield
3286 (add_builtin_candidates): Likewise.
3287 * class.c (layout_class_type): For bitfields copy over the
3288 original type quals.
3290 2008-01-22 Jason Merrill <jason@redhat.com>
3293 * decl.c (groktypename): Also ignore attributes on dependent
3294 possibly-class types.
3297 * friend.c (do_friend): Check for prior declaration of a friend
3298 function of a local class.
3299 * name-lookup.c (lookup_name_innermost_nonclass_level):
3301 * name-lookup.h: Declare it.
3303 2008-01-22 Tom Tromey <tromey@redhat.com>
3306 * init.c (build_new_1): Only disallow Java aggregates.
3308 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3311 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3312 if decl or init is error_mark_node.
3315 * error.c (dump_expr): Handle VECTOR_CST.
3317 2008-01-21 Jason Merrill <jason@redhat.com>
3320 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3323 * pt.c (retrieve_local_specialization): Robustify.
3324 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3327 * pt.c (tsubst): Only call retrieve_local_specialization if the
3328 original typedef was in a function template.
3331 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3333 2008-01-21 Richard Guenther <rguenther@suse.de>
3336 * error.c (cp_print_error_function): Deal with recursive
3339 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3342 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3344 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3348 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3349 on non-IS_AGGR_TYPE scope.
3350 (constructor_name_p): Assert IS_AGGR_TYPE.
3352 2008-01-18 Ian Lance Taylor <iant@google.com>
3355 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3356 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3357 DECL_IS_OPERATOR_NEW flag.
3359 2008-01-16 Richard Guenther <rguenther@suse.de>
3362 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3363 for conversions to type variants.
3365 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3367 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3368 declaration and code. Update copyright year.
3370 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3373 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3374 know we have a class type.
3376 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3379 * pt.c (coerce_template_parameter_pack): When substituting into
3380 the type of a non-type template parameter pack. use the
3381 deduced/substituted arguments.
3382 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3383 can be a parameter pack with the ellipsis following it. When we
3384 have an erroneous declaration, allow it to be a parameter pack.
3385 (cp_parser_template_parameter): Complain about default
3386 arguments on non-type template parameter packs, and parse them
3387 using the new cp_parser_default_argument.
3388 (cp_parser_parameter_declaration): Complain about parameter packs
3389 with default arguments. Move parsing of default arguments into a
3390 new function, cp_parser_default_argument.
3391 (cp_parser_default_argument): New; extracted from
3392 cp_parser_parameter_declaration.
3394 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3400 * typeck.c (check_return_expr): If there are bare parameter packs
3401 in the return value, set it to error_mark_node.
3402 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3403 * pt.c (find_parameter_packs_r): Look at the type of
3404 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3405 (check_for_bare_parameter_packs): Flip the result: now returns
3406 TRUE when there were bare parameter packs, FALSE otherwise.
3407 (push_template_decl_real): Deal with flipped result of
3408 check_for_bare_parameter_packs.
3409 * semantics.c (finish_cond): If there are bare parameter packs in
3410 the conditional, set it to error_mark_node.
3411 (finish_expr_stmt): If there are bare parameter packs in the
3412 expression, set it to error_mark_node.
3413 (finish_for_expr): Ditto.
3414 (finish_switch_cond): If there are bare parameter packs in
3415 the conditional, set it to error_mark_node.
3416 (finish_mem_initializers): If there are bare parameter packs in
3417 the member initializer, set it to error_mark_node.
3418 (finish_member_declaration): Check the attributes of the
3419 declaration for bare parameter packs, and remove the attributes if
3420 any have bare parameter packs.
3421 * parser.c (cp_parser_using_declaration): Check the using
3422 declaration for bare parameter packs.
3423 (cp_parser_base_clause): If there are bare parameter packs in a
3424 base specifier, don't add it to the chain.
3426 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3429 * error.c (dump_simple_decl): Display ellipsis for template
3430 non-type parameter packs.
3431 (dump_decl): Display ellipsis for template type parameter packs.
3432 (dump_template_decl): Display ellipsis for template template
3434 * pt.c (redeclare_class_template): When redeclaring a class
3435 template, check for collisions between template parameters and
3436 template parameter packs.
3438 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3441 * pt.c (process_partial_specialization): Don't mark template
3442 parameters that occur in non-deduced contexts.
3443 (struct pair_fn_data): Add include_nondeduced_p.
3444 (for_each_template_parm_r): Only visit non-deduced contexts if
3445 include_nondeduced_p is set.
3446 (for_each_template_parm): Added parameter include_nondeduced_p,
3447 which states whether template parameters found in non-deduced
3448 contexts should be visited.
3449 (uses_template_parms): Visit all template parameters, even those
3450 in non-deduced contexts.
3452 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3455 * pt.c (check_default_tmpl_args): Check for parameter packs that
3456 aren't at the end of a primary template.
3457 (push_template_decl_real): Remove check for parameter packs that
3458 aren't at the end of a primary template; that now happens in
3459 check_default_tmpl_args.
3460 * semantics.c (finish_template_template_parm): Use
3461 check_default_tmpl_args to check for errors in the template
3464 2008-01-12 Doug Kwan <dougkwan@google.com>
3466 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3467 instead of OPT_Wreturn_type in warning due to ignored return type
3469 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3470 instead of OPT_Wreturn_type in warning due to ignored return type
3473 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3476 * semantics.c (finish_omp_for): Don't call
3477 fold_build_cleanup_point_expr if processing_template_decl.
3479 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3480 Jakub Jelinek <jakub@redhat.com>
3483 * error.c (dump_template_argument): Deal with TREE_LIST.
3485 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3487 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3488 long" in C++0x mode; change the warning to note that "long long"
3489 is only unsupported in C++98 mode.
3491 2007-12-20 Jason Merrill <jason@redhat.com>
3494 * call.c (standard_conversion): Derived-to-base is considered a
3495 standard conversion.
3497 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3500 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3501 call cp_parser_statement rather than
3502 cp_parser_already_scoped_statement.
3504 2007-12-18 Jason Merrill <jason@redhat.com>
3507 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3509 (dependent_type_p_r): Handle the domain of an array.
3511 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3512 Jakub Jelinek <jakub@redhat.com>
3517 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3518 bindings of template template parameters after all template
3519 arguments have been deduced.
3520 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3522 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3523 (unify): Deal with variadic, bound template template parameters.
3524 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3526 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3529 * decl.c (grokdeclarator): Reject friend sfk_constructor
3532 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3535 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3538 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3541 * cp-lang.c (cp_classify_record): New.
3542 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3544 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3547 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3550 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3551 dynamic_cast in a template.
3553 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3556 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3557 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3559 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3562 * error.c (dump_type_prefix, dump_type_suffix): Handle
3563 TYPE_PACK_EXPANSION.
3566 * error.c (dump_expr): Handle ABS_EXPR.
3568 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3572 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3573 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3574 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3575 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3576 flag_use_repository and repo_emit_p returned 2.
3578 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3581 * tree.c (stabilize_call, stabilize_init): Do nothing if
3582 processing_template_decl.
3584 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3587 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3588 error instead of assertion failure.
3589 * parser.c (cp_parser_decltype): If closing paren is not found,
3590 return error_mark_node.
3592 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3595 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3597 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3598 since arg_assoc_template_arg will deal with them (better).
3600 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3603 * pt.c (tsubst_exception_specification): Handle substitutions into
3604 member templates, where tsubst_pack_expansion returns a
3605 TYPE_PACK_EXPANSION.
3607 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3610 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3611 bindings for the template parameter pack, don't try to keep the
3612 empty deduced arguments.
3613 (unify): If a parameter is a template-id whose template argument
3614 list contains a pack expansion that is not at the end, then we
3615 cannot unify against that template-id.
3617 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3620 * pt.c (current_template_args): Use error_operand_p.
3622 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3625 * error.c (dump_decl): Handle TREE_BINFO.
3627 2007-12-01 Ollie Wild <aaw@google.com>
3630 * typeck.c (build_binary_op): Add conversion of pointers to function
3631 members appearing as operands to the equality operators.
3633 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3636 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3638 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3641 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3643 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3648 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3650 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3653 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3655 PR tree-optimization/34181
3656 * method.c (use_thunk): Don't inline the call in the thunk.
3659 * tree.c (decl_linkage): Static data members and static member
3660 functions in anonymous ns classes are lk_external.
3662 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3665 * decl.c (start_preparsed_function): Pass
3666 processing_template_decl for the new allocate_struct_function
3669 2007-11-25 Richard Guenther <rguenther@suse.de>
3671 * decl.c (poplevel): Use BLOCK_CHAIN.
3673 2007-11-24 Ollie Wild <aaw@google.com>
3675 * typeck.c (delta_from_ptrmemfunc): New function.
3676 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3677 (build_binary_op): Call delta_from_ptrmemfunc.
3679 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3683 * decl.c (cp_finish_decl): Disallow variable or field
3684 definitions if extern "Java" aggregates.
3685 (grokparms): Disallow parameters with extern "Java"
3687 (check_function_type): Disallow function return values
3688 with extern "Java" aggregates.
3689 * init.c (build_new_1): Disallow placement new with
3690 extern "Java" aggregates.
3692 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3693 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3696 * call.c (convert_like_real): Build a zero constant when __null is
3697 converted to an integer type.
3699 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3702 * decl2.c (cp_write_global_declarations): Issue error about static
3703 data members in anonymous namespace which are declared and used,
3706 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3709 * parser.c (cp_parser_class_head): Reject function template ids.
3712 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3713 when processing_template_decl to build_array_type.
3716 * pt.c (more_specialized_fn): Don't segfault if one or
3717 both argument list end with ellipsis.
3719 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3722 * semantics.c (finish_call_expr): Set
3723 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3724 or OVERLOAD with all noreturn functions.
3726 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3729 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3732 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3739 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3740 set to error_mark_node the outermost POINTER_TYPE to the pack if
3741 it is seen in a POINTER_TYPE.
3742 (push_template_decl_real): If check_for_bare_parameter_packs
3743 fails for function return type, set the return type to
3744 integer_type_node. If check_for_bare_parameter_packs failed
3745 for non-function, return error_mark_node.
3748 * call.c (build_new_op): Call resolve_args before calling
3751 2007-11-11 Tom Tromey <tromey@redhat.com>
3754 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3756 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3759 * pt.c (redeclare_class_template): Update error message. Use a
3760 note to show the previous declaration.
3761 (tsubst_friend_class): Use the location of the friend template as
3762 the input location before calling redeclare_class_template.
3764 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3767 * semantics.c (finish_pseudo_destructor_expr): Handle
3768 object == error_mark_node.
3770 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3773 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3774 is not scalar type, let finish_class_member_access_expr handle
3775 diagnostics. Pass BIT_NOT_EXPR argument to
3776 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3778 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3781 * decl.c (cp_complete_array_type): If any of the initializer
3782 elements are pack expansions, don't compute the array size yet.
3784 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3787 * tree.c (decl_linkage): Fields have no linkage.
3789 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3791 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3793 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3798 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3799 Be careful with ERROR_MARK_NODEs.
3800 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3803 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3806 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3809 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3813 * tree.c (c_build_qualified_type): Define bridge to
3814 cp_build_qualified_type.
3816 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3827 * typeck.c (check_return_expr): Pass address of retval to
3828 check_for_bare_parameter_packs.
3829 * class.c (build_base_field): Tolerate bases that have no layout
3831 (end_of_base): Ditto.
3832 * tree.c (canonical_type_variant): Be careful with
3834 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3836 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3837 which states whether parameter packs should be replaced with
3839 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3840 possible. If set_packs_to_error is set true, replace the parameter
3841 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3842 (uses_parameter_packs): Don't set parameter packs to
3844 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3845 which may be modified (if it is a parameter pack). Instructs
3846 find_parameter_packs_r to replace parameter packs with
3847 ERROR_MARK_NODE (so that they won't cause errors later on).
3848 (process_template_parm): Pass pointer to
3849 check_for_bare_parameter_packs.
3850 (process_partial_specialization): Replace pack expansions before
3851 the end of the template argument list with ERROR_MARK_NODE.
3852 (push_template_decl_real): Pass pointer to
3853 check_for_bare_parameter_packs. Replace parameter packs not at the
3854 end of the template parameter list with ERROR_MARK_NODE.
3855 (convert_template_argument): Be more careful about using DECL_NAME
3856 on only declarations.
3857 (unify): Can't unify against ERROR_MARK_NODE.
3858 * semantics.c (finish_cond): Pass pointer to
3859 check_for_bare_parameter_packs.
3860 (finish_expr_stmt): Ditto.
3861 (finish_for_expr): Ditto.
3862 (finish_switch_cond): Pass pointer to
3863 check_for_bare_parameter_packs, and call it before we put the
3864 condition into the statement.
3865 (finish_mem_initializers): Pass pointer to
3866 check_for_bare_parameter_packs.
3867 (finish_member_declaration): Ditto.
3868 * parser.c (cp_parser_base_clause): Ditto.
3870 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3873 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3874 with the final TREE_READONLY flag in place. processing_template_decl
3875 is known to be 0 in this part of function.
3878 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3879 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3880 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3881 * semantics.c (finish_omp_atomic): Revert most of the
3882 2007-02-05 changes, just keep the new representation of
3883 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3885 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3888 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3891 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3896 * typeck.c (merge_types): Don't lose rvalue references when
3898 * call.c (build_over_call): Don't elide move constructors just
3899 because the copy constructor is trivial (!).
3900 (compare_ics): If comparing cv-qualifiers fails, we can still order
3901 based on binding lvalues vs. rvalues.
3903 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3906 * pt.c (unify_pack_expansion): bring handling of function call
3907 arguments into line with type_unification_real.
3909 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3911 * typeck.c (build_binary_op): Use pedwarn instead of error for
3914 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3917 * parser.c (cp_parser_unary_expression): For &&label call
3918 cp_parser_non_integral_constant_expression and return error_mark_node
3919 if it returned true.
3922 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3923 is neither FUNCTION_TYPE nor METHOD_TYPE.
3925 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3928 * parser.c (cp_parser_nested_name_specifier_opt): Use
3929 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3930 typedef of currently open class.
3932 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3935 * error.c (dump_expr): Deal specially with statements.
3937 2007-11-01 Jason Merrill <jason@redhat.com>
3940 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3942 (lookup_template_class): Use it to get the outer template args
3943 for instantiating one.
3946 * pt.c (reduce_template_parm_level): tsubst the parameters
3947 of a template template parm.
3949 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3952 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3954 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3957 * parser.c (cp_parser_postfix_dot_deref_expression): If
3958 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3959 first and if that succeeds and type is SCALAR_TYPE_P, create
3963 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3964 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3965 as for std::type_info.
3967 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3970 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3971 pp_cxx_delete_expression): Change to static linkage.
3972 * cxx-pretty-print.h: Adjust declarations.
3973 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3974 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3975 MODOP_EXPR): Forward to pp_expression.
3977 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3980 2007-10-31 Christian Bruel <christian.bruel@st.com>
3981 Mark Mitchell <mark@codesourcery.com>
3984 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3985 if retval is volatile.
3987 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3990 * decl2.c (build_offset_ref_call_from_tree): Call
3991 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3992 if FN is DOTSTAR_EXPR.
3994 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3998 * pt.c (find_parameter_packs_r): Fix typo in comment.
3999 (convert_template_argument): Look at the pattern of a pack
4000 expansion to determine what kind of entity we're converting.
4001 (coerce_template_parameter_pack): When we have coerced a non-type
4002 template parameter pack, substitute into the type of that pack.
4003 (tsubst_pack_expansion): When our substitution of a parameter pack
4004 is a "trivial" substitution of itself, just substitute into the
4005 pack expansion rather than actually expanding.
4007 2007-10-29 Jakub Jelinek <jakub@redhat.com>
4010 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
4011 for non-integral type bitfields. Return true if bitfield is correct, false
4012 error has been diagnosed.
4013 (check_field_decls): If check_bitfield_decl returned false, call also
4016 2007-10-28 Paolo Carlini <pcarlini@suse.de>
4017 Mark Mitchell <mark@codesourcery.com>
4020 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4021 class member error out and return.
4023 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4025 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4026 to current_function_decl rather than 0.
4029 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4031 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4033 2007-10-27 Jason Merrill <jason@redhat.com>
4036 * call.c (convert_default_arg): Detect recursion.
4038 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4041 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4042 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4044 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4046 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4048 2007-10-26 Jason Merrill <jason@redhat.com>
4051 * pt.c (get_template_info): New fn.
4052 (template_class_depth): Use it.
4053 (push_template_decl_real): Check that the template args of the
4054 definition match the args of the previous declaration.
4056 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4059 * decl2.c (coerce_new_type): Do not allow a default argument for
4060 the first parameter.
4062 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4065 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4066 don't see the leading '('. Only lookup names if we get an
4069 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4072 * parser.c (cp_parser_parenthesized_expression_list): Set
4073 greater_than_is_operator_p to true in between the parens.
4075 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4078 * decl.c (grokdeclarator): In case of conflicting specifiers
4079 just return error_mark_node.
4081 2007-10-26 Ollie Wild <aaw@google.com>
4083 * expr.c (cxx_expand_expr): Removed.
4084 * cp-tree.h (exx_expand_expr): Removed.
4085 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4088 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4091 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4093 2007-10-23 Jason Merrill <jason@redhat.com>
4095 PR c++/25950 (DR 391)
4096 * call.c (struct conversion): Remove check_copy_constructor_p.
4097 (reference_binding): Always bind a reference directly to a
4098 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4100 (check_constructor_callable): Remove.
4101 (convert_like_real): Don't call it.
4102 (initialize_reference): Don't call check_constructor_callable.
4103 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4104 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4105 conversions if LOOKUP_NO_TEMP_BIND.
4106 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4107 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4109 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4111 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4114 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4115 before checking if its type is integral.
4117 2007-10-22 Jason Merrill <jason@redhat.com>
4120 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4121 * pt.c (apply_late_template_attributes): Splice out dependent
4122 attributes from DECL_ATTRIBUTES.
4124 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4126 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4128 * typeck.c (build_binary_op) : Use appropriate warning option
4129 instead of unnamed warning.
4131 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4134 * pt.c (current_template_args): Do not change TREE_LIST elements
4135 with a TREE_VALUE of error_mark_node.
4137 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4139 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4140 * decl.c (start_decl): Tidy.
4141 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4143 (grokdeclarator): Clarify comment.
4145 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4148 * decl.c (grokfndecl): Return NULL after the "definition of
4149 implicitly-declared" error happened.
4151 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4154 * call.c (build_user_type_conversion_1): Do not consider conversion
4155 functions to convert a (possibly cv-qualified) object to the (possibly
4156 cv-qualified) same object type (or a reference to it), to a (possibly
4157 cv-qualified) base class of that type (or a reference to it).
4159 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4161 * pt.c (tsubst): Use template_parm_level_and_index.
4163 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4166 * parser.c (cp_parser_compound_statement): Handle label-declarations
4167 at the beginning of the compound statement.
4168 (cp_parser_block_declaration): Issue diagnostics about __label__
4169 not at the beginning of a block.
4171 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4174 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4175 to convert_template_argument.
4176 (coerce_template_parms): Return error_mark_node after fixed-length
4178 (tsubst_decl): Check for error_mark_node the return value of the
4179 first tsubst in 'case VAR_DECL'.
4181 2007-10-08 Ollie Wild <aaw@google.com>
4183 * typeck2.c (digest_init): Call cplus_expand_constant after
4184 convert_for_initialization.
4185 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4186 * expr.c (cplus_expand_constant): Updated function description.
4188 2007-10-04 Jason Merrill <jason@redhat.com>
4191 * call.c (initialize_reference): Handle local static reference
4194 2007-10-03 Jason Merrill <jason@redhat.com>
4197 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4198 (push_namespace): Here.
4199 (handle_namespace_attrs): New fn for the attr code.
4200 (leave_scope): Don't pop_visibility.
4201 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4202 * parser.c (cp_parser_namespace_definition): Call
4203 handle_namespace_attrs and pop_visibility as appropriate.
4206 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4208 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4210 * decl.c (duplicate_decls): Preserve linkage flags for mere
4211 redeclarations of gnu_inline definitions.
4213 2007-10-03 Jason Merrill <jason@redhat.com>
4216 * decl.c (wrap_cleanups_r): New fn.
4217 (wrap_temporary_cleanups): New fn.
4218 (initialize_local_var): Call it.
4220 2007-09-29 Jason Merrill <jason@redhat.com>
4223 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4224 constant to not have DECL_EXTERNAL if it's file-local.
4226 2007-09-28 Ollie Wild <aaw@google.com>
4229 2007-09-27 Ollie Wild <aaw@google.com>
4231 * typeck2.c (digest_init): Call cplus_expand_constant after
4232 convert_for_initialization.
4233 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4234 * expr.c (cplus_expand_constant): Updated function description.
4236 2007-09-28 Jason Merrill <jason@redhat.com>
4239 * class.c (layout_empty_base): Take rli parameter, update
4240 rli->record_align if empty base has user-specified alignment.
4241 (build_base_field): Pass rli to it.
4243 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4246 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4248 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4251 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4252 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4253 (dump_parameters): Just call dump_type for argument packs too.
4255 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4258 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4259 qualification by creating qualified PACK_EXPANSION_PATTERN and
4260 then calling make_pack_expansion on it.
4262 2007-09-27 Ollie Wild <aaw@google.com>
4264 * typeck2.c (digest_init): Call cplus_expand_constant after
4265 convert_for_initialization.
4266 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4267 * expr.c (cplus_expand_constant): Updated function description.
4269 2007-09-27 Jason Merrill <jason@redhat.com>
4272 * decl2.c (is_late_template_attribute): Don't crash on unknown
4275 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4278 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4279 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4280 spaces in the formatting.
4281 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4283 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4285 * error.c (cxx_print_error_function): Add third argument, pass
4286 it over to lhd_print_error_function.
4287 (cp_print_error_function): If diagnostic->abstract_origin, print
4289 * cp-tree.h (struct diagnostic_info): New forward decl.
4290 (cxx_print_error_function): Add third argument.
4292 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4295 * name-lookup.c (pushtag): Do not create an implicit typedef before
4296 the associated type declaration is known to be valid.
4298 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4300 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4301 rather than pointers.
4303 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4306 * search.c (check_final_overrider): Fail if
4307 targetm.comp_type_attributes returns 0.
4309 2007-09-24 Jason Merrill <jason@redhat.com>
4312 * pt.c (resolve_typename_type): Don't look things up in the original
4313 template if it would mean losing template arguments.
4315 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4318 * cp-tree.h (cxx_type_hash_eq): New prototype.
4319 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4320 * tree.c (cxx_type_hash_eq): New function.
4322 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4325 * tree.c (cp_build_qualified_type_real): Build a canonical
4326 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4328 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4332 * tree.c (cplus_array_compare): Compare pointers, not types.
4333 (build_cplus_array_type_1): Store new array type into the hash
4334 table before building the canonical type; build the canonical type
4336 (cp_build_qualified_type_real): Put all of the array types with
4337 cv-qualified element types into the C++ array hash table, built as
4338 variants of the unqualified versions.
4340 2007-09-23 Jason Merrill <jason@redhat.com>
4343 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4344 for deprecation warnings.
4346 2007-09-22 Jason Merrill <jason@redhat.com>
4349 * call.c (build_over_call): Warn about deprecated virtuals.
4352 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4353 (MAYBE_TAGGED_TYPE_P): Remove.
4354 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4355 instead of calling is_late_template_attribute again.
4356 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4357 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4358 Don't crash on typedefs from non-template classes.
4359 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4360 (is_late_template_attribute): All attributes applied to template
4361 parms or typename types are dependent. Static.
4362 (splice_template_attributes): Pass decl through.
4363 (save_template_attributes): Likewise.
4365 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4368 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4369 returned from tsubst_pack_expansion.
4370 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4371 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4373 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4376 * semantics.c (finish_id_expression): Use consistently
4377 context_for_name_lookup.
4378 * decl.c (fixup_anonymous_aggr): Fix error message for
4379 anonymous struct (vs union).
4381 2007-09-19 Jason Merrill <jason@redhat.com>
4384 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4385 (retrieve_specialization): Only tagged types use
4386 DECL_TEMPLATE_INSTANTIATIONS.
4387 (instantiate_class_template): Push nested classes too.
4388 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4390 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4391 * init.c (is_aggr_type): Remove redundant tests.
4392 * class.c (push_nested_class): Use CLASS_TYPE_P.
4394 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4397 * init.c (build_zero_init): If, recursively, build_zero_init
4398 returns a NULL_TREE, do not append it to the VEC of constructors.
4400 2007-09-18 Jason Merrill <jason@redhat.com>
4403 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4404 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4405 ATTR_FLAG_TYPE_IN_PLACE.
4406 (tsubst): Do unqualified lookup to find typedefs from current class.
4407 [ARRAY_TYPE]: Propagate alignment info.
4408 * decl2.c (is_late_template_attribute): Only defer handling of
4409 attribute aligned if the expression is dependent.
4410 (save_template_attributes): If we're deferring any attributes,
4411 make this a naming typedef.
4413 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4415 PR c++/33462 (again)
4416 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4417 va_arg instead of __builtin_va_arg.
4419 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4422 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4423 (pp_cxx_primary_expression): Use it.
4424 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4425 * error.c (dump_expr): Use it.
4427 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4430 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4431 out case TYPEID_EXPR to...
4432 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4433 and pp_cxx_right_paren.
4434 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4435 * error.c (dump_expr): Use it.
4437 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4440 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4441 (pp_cxx_primary_expression): Use it.
4442 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4443 * error.c (dump_expr): Use it.
4445 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4448 * init.c (build_new): Remove warning for zero-element
4451 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4454 * call.c (maybe_handle_implicit_object): Set this_p, clear
4455 rvaluedness_matches_p.
4456 (compare_ics): Do not compare rvaluedness matching when one of the
4457 operands is an implicit object.
4459 2007-09-14 Jason Merrill <jason@redhat.com>
4461 PR c++/17743, c++/19163
4462 * decl2.c (is_late_template_attribute): New fn.
4463 (splice_template_attributes, save_template_attributes): New fns.
4464 (cplus_decl_attributes): Call save_template_attributes.
4465 * pt.c (apply_late_template_attributes): New fn.
4466 (instantiate_class_template, tsubst_decl): Use it.
4467 * cp-tree.h: Declare is_late_template_attribute.
4469 2007-09-13 Tom Tromey <tromey@redhat.com>
4471 * parser.c (cp_lexer_new_main): Don't use
4472 c_lex_return_raw_strings.
4473 (cp_lexer_get_preprocessor_token): Update. Add special case when
4476 2007-09-11 Jan Hubicka <jh@suse.cz>
4478 * method.c (use_thunk): Use tree_rest_of_compilation
4479 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4480 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4481 * cp-tree.h (expand_body): Kill.
4482 (emit_associated_thunks): Declare.
4483 * semantics.c (emit_associated_thunks): Export.
4484 (expand_body): Kill.
4486 2007-09-09 David Daney <ddaney@avtrex.com>
4489 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4490 to calculate cookie_ptr.
4492 2007-09-08 Jason Merrill <jason@redhat.com>
4495 * pt.c (most_specialized_class): Set processing_template_decl
4496 while tsubsting partial spec args.
4498 2007-09-06 Jason Merrill <jason@redhat.com>
4500 * decl2.c (get_guard): Copy visibility from the guarded variable.
4502 2007-09-06 Jan Hubicka <jh@suse.cz>
4504 * semantics.c (expand_body): Do not mark arguments of clones used.
4506 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4509 * decl.c (cp_finish_decl): When processing_template_decl,
4510 deal correctly with init as TREE_LIST.
4512 2007-09-06 Tom Tromey <tromey@redhat.com>
4514 * decl.c (finish_function): Put return's location on line zero of
4517 2007-09-05 Jason Merrill <jason@redhat.com>
4520 * except.c (prepare_eh_type): Use type_decays_to.
4523 * init.c (build_delete): Use build_headof to get the address of the
4524 complete object if we aren't using the deleting destructor.
4525 * rtti.c (build_headof): No longer static.
4526 * cp-tree.h: Declare it.
4528 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4530 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4531 decl if a prototype for XX is provided with throw().
4534 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4535 on __*_chk non-__builtin_* decls.
4537 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4540 * semantics.c (finish_id_expression): Use context_for_name_lookup
4541 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4542 * class.c (finish_struct_anon): Deal correctly with anonymous
4543 structs (vs unions, as GNU extension) in error messages.
4545 2007-09-05 Jan Hubicka <jh@suse.cz>
4547 * sematics.c (expand_body): Remove unnecesary import_export_decl
4548 call, DECL_EXTERNAL checks and current_function_decl saving.
4550 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4552 PR c++/29731 (again)
4553 * parser.c (cp_parser_primary_expression): Return error_mark_node
4554 when a statement-expression is found in a template-argument list.
4556 2007-09-04 Jason Merrill <jason@redhat.com>
4558 * except.c (initialize_handler_parm): Use
4559 fold_build_cleanup_point_expr.
4562 * call.c (reference_binding): Don't look for user-defined conversions
4566 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4567 the MUST_NOT_THROW_EXPR.
4569 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4571 * decl.c (cp_finish_decl): Call determine_visibility before
4572 make_rtl_for_nonlocal_decl.
4574 2007-09-04 Jason Merrill <jason@redhat.com>
4577 * pt.c (most_specialized_class): Substitute outer template
4578 arguments into the arguments of a member template partial
4580 (strip_innermost_template_args): New fn.
4582 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4584 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4586 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4588 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4589 * decl.c (cp_make_fname_decl): Likewise,
4590 * parser.c (cp_parser_string_literal): Likewise,
4591 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4592 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4595 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4598 * typeck.c (build_unary_op): Fix error message for
4599 Boolean expression as operand to operator--.
4601 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4603 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4604 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4607 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4610 * init.c (build_default_init): Make extern.
4611 * cp-tree.h (build_default_init): Declare here.
4612 * pt.c (tsubst_expr): When the instantiation of the initializer of
4613 a variable results in an empty list, default-initialize the
4615 (tsubst_copy_and_build): When the instantiation of the initializer
4616 in a new expression results in an empty initializer list,
4617 default-initialize it.
4619 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4621 * mangle.c (write_type): Change mangling of rvalue reference from
4624 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4626 * decl.c (duplicate_decls): Remove duplicated line.
4628 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4631 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4632 BOUND_TEMPLATE_TEMPLATE_PARM.
4634 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4637 * search.c (lookup_member): Check the name argument for
4640 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4643 * parser.c (cp_parser_trait_expr): Check rerurn value of
4646 2007-08-30 Ollie Wild <aaw@google.com>
4648 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4649 convert_ptrmem for pointer to member conversions.
4650 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4651 (ocp_convert): Update cp_convert_to_pointer call.
4652 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4654 (build_static_cast_1): Check can_convert for conversions in either
4656 (get_delta_difference_1): New function.
4657 (get_delta_difference): Refactor to call get_delta_difference_1.
4659 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4661 * decl.c (start_preparsed_function): Set
4662 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4664 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4667 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4668 BOUND_TEMPLATE_TEMPLATE_PARM.
4670 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4674 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4675 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4677 2007-08-27 Jason Merrill <jason@redhat.com>
4680 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4681 Look inside STMT_EXPR.
4682 * semantics.c (stmt_expr_value_expr): New fn.
4683 * cp-tree.h: Declare it.
4686 * decl.c (groktypename): Ignore attributes applied to class type.
4688 2007-08-28 Richard Guenther <rguenther@suse.de>
4690 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4692 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4694 * error.c (dump_expr): Handle COMPLEX_CST.
4695 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4696 (pp_cxx_expression): Likewise.
4698 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4700 * decl.c (GNU_INLINE_P): New.
4701 (duplicate_decls): Handle gnu_inline. Merge attributes and
4702 some flags in overriding definitions.
4703 (redeclaration_error_message): Handle gnu_inline.
4704 (start_preparsed_function): Likewise.
4706 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4708 * call.c (sufficient_parms_p): Constify.
4709 * class.c (same_signature_p): Likewise.
4710 * cp-gimplify.c (is_invisiref_parm,
4711 cxx_omp_privatize_by_reference): Likewise.
4712 * cp-objcp-common.c (has_c_linkage): Likewise.
4713 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4714 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4715 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4716 num_artificial_parms_for, comp_template_parms,
4717 template_parameter_pack_p, any_dependent_template_arguments_p,
4718 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4719 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4720 zero_init_p, member_p, cp_lvalue_kind,
4721 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4722 varargs_function_p, is_dummy_object, special_function_kind,
4723 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4724 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4725 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4726 cp_has_mutable_p, at_least_as_qualified_p,
4727 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4728 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4729 * except.c (nothrow_libfn_p): Likewise.
4730 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4732 * pt.c (comp_template_parms, template_parameter_pack_p,
4733 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4734 any_dependent_template_arguments_p): Likewise.
4735 * repo.c (repo_export_class_p): Likewise.
4736 * semantics.c (anon_aggr_type_p): Likewise.
4737 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4738 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4739 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4740 zero_init_p, special_function_p): Likewise.
4741 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4742 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4743 compparms, invalid_nonstatic_memfn_p,
4744 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4745 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4746 cp_has_mutable_p, lvalue_or_else): Likewise.
4748 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4750 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4751 * cp-objcp-common.c (cp_tree_size): Ditto.
4752 * tree.c (cp_walk_subtrees): Ditto
4753 * cp-tree.def (TINST_LEVEL): Go away.
4754 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4755 move together with other non-tree structs.
4756 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4757 (union lang_tree_node): Eliminate tinst_level field.
4758 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4759 (current_instantiation, outermost_tinst_level): Return
4760 a "struct tinst_level *".
4762 * error.c (print_instantiation_partial_context): Change second
4763 parameter to a "struct tinst_level *". Replace accessor macros
4765 (print_instantiation_full_context): Likewise.
4766 * lex.c (in_main_input_context): Likewise.
4768 * pt.c (struct pending_templates): New.
4769 (pending_templates, last_pending_template): Use it as a type.
4770 (current_tinst_level): Change typo to "struct tinst_level *"
4771 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4772 (add_pending_template): Construct a "struct pending_template".
4773 Replace TINST_LEVEL accessor macros with field access.
4774 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4775 (pop_tinst_level): Likewise.
4776 (instantiate_pending_templates): Likewise. Factor common code used
4777 when an instantiation has been done.
4778 (outermost_tinst_level): Replace tree_last with loop.
4779 (current_instantiation): Return a "struct tinst_level *".
4781 2007-08-24 Ollie Wild <aaw@google.com>
4783 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4784 * name-lookup.h (cp_binding_level): Remove vtables member.
4786 2007-08-24 Richard Guenther <rguenther@suse.de>
4788 * tree.c (cp_cannot_inline_tree_fn): Remove.
4789 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4790 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4793 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4796 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4797 error_mark_node right away if build_expr_type_conversion
4801 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4802 is error_mark_node rather than NULL_TREE.
4803 * pt.c (check_explicit_specialization): Likewise.
4806 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4807 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4809 2007-08-22 Jason Merrill <jason@redhat.com>
4812 * pt.c (outermost_tinst_level): New function.
4813 * lex.c (in_main_input_context): New function.
4814 * cp-tree.h: Declare it.
4815 * decl2.c (constrain_class_visibility): Use it to avoid warning
4816 about uses of the anonymous namespace in the main input file.
4818 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4820 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4822 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4825 * class.c (finish_struct_1): Warn when a class has virtual
4826 functions and accessible non-virtual destructor.
4828 2007-08-20 Richard Guenther <rguenther@suse.de>
4832 * call.c (build_new_method_call): Convert initializer to
4834 * init.c (build_aggr_init): Do not fiddle with types.
4835 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4836 * except.c (build_throw): Do not drop qualifiers for the
4838 * typeck.c (get_member_function_from_ptrfunc): Do not
4839 fiddle with types, instead convert.
4840 (build_ptrmemfunc1): Convert to the target type for
4842 (gfc_trans_allocate): Convert result to target type.
4843 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4844 pointer-to-member structures shall have alias set zero as well.
4846 2007-08-20 Richard Guenther <rguenther@suse.de>
4848 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4850 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4851 (nonstatic_local_decl_p): Likewise.
4852 * tree.c (cp_auto_var_in_fn_p): Remove.
4853 * decl.c (nonstatic_local_decl_p): Remove.
4855 2007-08-20 Richard Guenther <rguenther@suse.de>
4857 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4859 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4860 cp_walk_subtrees lh parameter.
4861 (cp_walk_tree_without_duplicates): New define to
4862 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4863 * tree.c (count_trees): Call
4864 cp_walk_tree_without_duplicates.
4865 (verify_stmt_tree): Call cp_walk_tree.
4866 (break_out_target_exprs): Likewise.
4867 (WALK_SUBTREE): Likewise.
4868 * cp-gimplify.c (cp_genericize): Likewise.
4869 * cp-pt.c (find_parameter_packs_r): Likewise.
4870 (uses_parameter_packs): Likewise.
4871 (make_pack_expansion): Likewise.
4872 (check_for_bare_parameter_packs): Likewise.
4873 (for_each_template_parm): Likewise.
4874 * decl.c (check_default_argument): Call
4875 cp_walk_tree_without_duplicates.
4876 * except.c (build_throw): Likewise.
4877 * decl2.c (type_visibility): Likewise.
4878 * semantics.c (expand_or_defer_fn): Likewise.
4879 (finalize_nrv): Call cp_walk_tree.
4881 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4884 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4885 Initialize it with save_expr rather than get_temp_regvar.
4887 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4890 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4893 2007-08-17 Ollie Wild <aaw@google.com>
4896 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4897 declarations into appropriate slots for comparison. Fix type
4900 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4903 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4904 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4906 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4909 * parser.c (cp_parser_class_head): Improve error message.
4911 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4913 * pt.c (instantiate_decl): Set input_location
4914 for the function end.
4916 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4918 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4920 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4921 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4922 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4923 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4924 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4925 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4926 * typeck.c (cp_type_quals): Likewise.
4927 * typeck2.c (cxx_incomplete_type_diagnostic,
4928 cxx_incomplete_type_error): Likewise.
4930 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4933 * pt.c (tsubst_friend_function): When check_classfn
4934 returns error_mark_node likewise return it.
4936 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4939 * typeck.c (check_return_expr): Don't NRV optimize vars in
4941 * decl.c (finish_function): Comment fix.
4943 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4946 * pt.c (push_template_decl_real): Depending on TYPE_P
4947 use either TYPE_CONTEXT or DECL_CONTEXT.
4949 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4951 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4952 constructors and destructors return this.
4954 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4957 * decl2.c (check_classfn): Return error_mark_node in case of error;
4958 in that case, do not call add_method.
4959 * decl.c (start_decl): Deal with check_classfn returning
4961 (grokfndecl): Likewise.
4962 * pt.c (tsubst_friend_function): Likewise.
4964 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4967 * typeck.c (build_binary_op): Disallow vector float types with
4968 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4970 2007-08-11 Ian Lance Taylor <iant@google.com>
4972 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4974 * cp-tree.h (cxx_get_alias_set): Update declaration.
4976 2007-08-10 Ollie Wild <aaw@google.com>
4978 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4980 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4982 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4983 (lookup_using_namespace): Fix ambiguous_decl call.
4984 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4986 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4988 * call.c (name_as_c_string): Use CONST_CAST.
4989 * decl.c (build_decl): Likewise.
4990 * parser.c (cp_parser_string_literal): Likewise.
4992 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4995 * error.c (dump_expr): Consistently use the *_cxx_*
4996 variants of the pretty-print functions.
4998 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5001 * decl.c (check_special_function_return_type): Just error
5002 on return type specified for conversion operator.
5004 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
5006 * typeck2.c (readonly_error): Handle general expressions.
5007 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
5009 2007-08-06 Dan Hipschman <dsh@google.com>
5011 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
5012 access function name.
5014 2007-08-04 Alfred Minarik <a.minarik@aon.at>
5017 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
5018 * g++spec.c (lang_specific_driver): Check them.
5020 2007-08-06 Paolo Carlini <pcarlini@suse.de>
5023 * pt.c (inline_needs_template_parms): Fix comment; change return type
5026 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
5029 2007-03-26 Dirk Mueller <dmueller@suse.de>
5031 * parser.c (cp_parser_member_declaration): Pedwarn
5032 about stray semicolons after member declarations.
5034 2007-08-02 Lee Millward <lee.millward@gmail.com>
5039 * parser.c (cp_parser_asm_definition): Detect and discard asm
5040 statements with invalid inputs or outputs.
5041 (cp_parser_asm_operand_list): Return error mark node if any
5042 of the operands are invalid. Adjust documentation.
5044 2007-08-02 Nick Clifton <nickc@redhat.com>
5046 * typeck.c: Change copyright header to refer to version 3 of the
5047 GNU General Public License and to point readers at the COPYING3
5048 file and the FSF's license web page.
5049 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5050 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5051 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5052 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5053 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5054 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5055 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5056 name-lookup.h, parser.c: Likewise.
5058 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5061 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5063 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5066 * semantics.c (finish_label_stmt): Reject the __label__
5067 extension outside function scopes.
5069 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5071 * parser.c (eof_token): Un-constify.
5072 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5073 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5076 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5078 * pt.c, tree.c, typeck2.c: Fix comment typos.
5080 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5081 Mark Mitchell <mark@codesourcery.com>
5084 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5085 hidden due to friend declarations in local classes.
5087 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5089 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5090 * cp-tree.def (DECLTYPE_TYPE): New.
5091 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5092 (dump_type_prefix): Ditto.
5093 (dump_type_suffix): Ditto.
5094 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5095 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5096 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5098 (DECLTYPE_TYPE_EXPR): New.
5099 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5100 (finish_declared_type): Declare.
5101 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5102 DECLTYPE_TYPE nodes.
5103 (pp_cxx_type_id): Ditto.
5104 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5105 (tsubst): Substitute into a DECLTYPE_TYPE node.
5106 (tsubst_copy): Ditto.
5107 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5109 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5110 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5111 structural equality (because we can't hash the expressions).
5112 (finish_declared_type): New.
5113 * lex.c (reswords): Add "decltype" keyword.
5114 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5115 (cp_parser_postfix_expression): Add member_access_only_p to
5116 restrict postfix expression to member access expressions.
5117 (cp_parser_unary_expression): Update call to
5118 cp_parser_postfix_expression to reflect new parameter.
5119 (cp_parser_declared_type): New.
5120 (cp_parser_simple_type_specifier): Parse decltype types.
5122 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5125 * call.c (convert_for_arg_passing): Only widen bitfields to their
5126 declared types if necessary.
5128 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5130 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5133 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5135 * decl.c (typename_hash, typename_compare): Constify.
5136 * mangle.c (hash_type, compare_type): Likewise.
5137 * pt.c (eq_local_specializations, hash_local_specialization):
5139 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5140 list_hash): Likewise.
5141 * typeck2.c (pat_compare): Likewise.
5143 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5145 * method.c (implicitly_declare_fn): Increase alignment if member
5146 function pointer format requires it.
5148 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5151 * typeck.c (check_return_expr): Do not pass a null argument
5154 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5157 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5160 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5163 * typeck.c (convert_arguments): Only use default args if we have
5167 * typeck.c (structural_comptypes): No need to check
5168 resolve_typename_type return value here.
5169 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5170 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5171 original type rather than error_mark_node in case of failure.
5172 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5173 resolve_typename_type result check.
5174 (cp_parser_direct_declarator, cp_parser_head,
5175 cp_parser_constructor_declarator_p): Likewise.
5177 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5179 * pt.c (template_parms_variadic_p): Remove.
5180 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5182 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5185 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5186 argument to dump_aggr_init_expr_args instead of false.
5188 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5190 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5191 canonical types; otherwise, fall back to structural type
5192 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5193 internal compiler error if the canonical types are wrong.
5195 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5198 * parser.c (cp_parser_make_indirect_declarator): When the
5199 the code argument is ERROR_MARK return cp_error_declarator.
5201 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5204 * decl.c (cxx_init_decl_processing): Don't set
5205 force_align_functions_log.
5206 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5207 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5208 FUNCTION_DECL, return its alignment.
5210 2007-07-09 Richard Guenther <rguenther@suse.de>
5212 * decl.c (start_preparsed_function): Do not promote return type.
5214 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5217 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5219 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5222 * pt.c (resolve_overloaded_unification): Robustify. Return a
5224 (type_unification_real): Adjust accordingly.
5226 2007-07-06 Richard Guenther <rguenther@suse.de>
5228 * init.c (build_new_1): Use the correct pointer type.
5229 * typeck2.c (build_m_component_ref): Likewise.
5231 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5234 * init.c (build_zero_init): Always build an initializer for
5236 * typeck2.c (build_functional_cast): Use build_zero_init.
5239 * init.c (build_new_1): Always pass the allocation function to
5240 build_op_delete_call.
5241 * call.c (build_op_delete_call): Handle operator delete with a
5242 variable-argument list. Do not issue an error when no matching
5243 deallocation function is available for a new operator.
5246 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5247 * decl.c (value_dependent_init_p): New function.
5248 (cp_finish_decl): Use it.
5249 * pt.c (value_dependent_expression_p): Use
5250 any_value_dependent_elements_p.
5251 * parser.c (cp_parser_primary_expression): Add comment about
5252 treating dependent qualified names as integral
5253 constant-expressions.
5255 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5257 * decl.c (build_ptrmemfunc_type): Always use structural equality
5258 tests when comparing pointer-to-member-function types, because the
5259 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5262 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5264 * init.c (build_new): Tweak comment.
5266 2007-06-29 Dave Brolley <brolley@redhat.com>
5269 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5270 type to its base type and number of elements here.
5271 * init.c (build_new): Call complete_type_or_else to ensure that the
5272 type is complete and to issue a diagnostic if it is not.
5273 (build_new_1): Don't call complete_type_or_else here.
5275 2007-07-03 Richard Guenther <rguenther@suse.de>
5278 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5281 2007-07-02 Simon Baldwin <simonb@google.com>
5283 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5284 for inner-style nested forward declarations that don't declare
5287 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5290 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5291 DECL_P in not a variable and appears more than once error messages.
5293 2007-07-01 Ollie Wild <aaw@google.com>
5295 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5296 (select_decl): Remove function.
5297 (unqualified_namespace_lookup): Populate binding by calling
5298 ambiguous_decl. Remove select_decl call.
5299 (lookup_qualified_name): Remove select_decl call.
5300 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5301 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5302 generation when name lookup is ambiguous.
5304 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5307 * init.c (build_new_1): Use structural equality on the copy of the
5310 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5312 * decl2.c (determine_visibility): Implement
5313 flag_visibility_ms_compat effect on type info.
5314 * decl.c (cxx_init_decl_processing): Implement
5315 global effect of flag_visibility_ms_compat.
5317 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5319 * decl2.c (start_objects): Mark constructor-running function
5322 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5325 * decl.c (grokdeclarator): Reset friendp for member functions declared
5326 friend of their own class.
5328 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5330 * decl2.c (determine_visibility): Don't look for dllexport here.
5331 (determine_visibility_from_class): Tidy.
5333 2007-06-18 Simon Baldwin <simonb@google.com>
5336 * parser.c (cp_parser_single_declaration): Added check for storage
5337 class other than sc_none in parsed declaration, and a flag to indicate
5338 if the call is part of an explicit template specialization parse.
5339 * (cp_parser_explicit_specialization): Specialization check flag added
5340 to call to cp_parser_single_declaration(), set true.
5341 * (cp_parser_template_declaration_after_export): Specialization check
5342 flag added to call to cp_parser_single_declaration(), set false.
5343 * pt.c (check_explicit_specialization): Added code to copy visiblity
5344 and linkage from the templated function to the explicit specialization.
5346 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5348 * typeck.c (build_binary_op): For templates build the
5349 expression in pieces to avoid the assert in build2_stat.
5350 (get_member_function_from_ptrfunc):
5351 Change over to using POINTER_PLUS_EXPR and convert
5352 the second operand to sizetype.
5353 * typeck2.c (build_m_component_ref): Likewise.
5354 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5355 instead of PLUS_EXPR for pointers.
5356 (build_new_1): Likewise.
5357 (build_vec_delete_1): Likewise.
5358 (build_vec_delete): Likewise.
5359 * class.c (build_base_path): Likewise.
5360 (build_base_path): Likewise.
5361 (convert_to_base_statically): Likewise.
5362 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5363 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5364 instead of PLUS_EXPR.
5365 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5366 instead of PLUS_EXPR for pointers.
5367 * call.c (build_special_member_call): Likewise.
5368 * rtti.c (build_headof): Likewise.
5369 Use sizetype instead of ptrdiff_type_node.
5370 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5371 instead of PLUS_EXPR for pointers.
5372 * except.c (expand_start_catch_block): Do a
5373 NEGATIVE and then a POINTER_PLUS_EXPR instead
5375 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5376 PLUS_EXPR on pointer types over to use
5377 POINTER_PLUS_EXPR and remove the conversion
5378 to the pointer types.
5379 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5380 adding to a pointer type. Use size_int instead of
5381 ssize_int. Convert the index to sizetype before
5382 adding it to the pointer.
5384 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5386 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5387 (DECL_ANON_UNION_VAR_P): New macro.
5388 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5389 than DECL_VAR_MARKED_P, to keep track of which variables we have
5391 * decl.c (redeclaration_error_message): Complain about redeclaring
5392 anonymous union members at namespace scope.
5393 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5395 2007-06-14 Geoff Keating <geoffk@apple.com>
5397 * decl2.c (determine_visibility): Ensure that functions with
5398 hidden types as parameters are hidden.
5401 * decl2.c (determine_visibility): Remove duplicate code for
5404 2007-06-12 Ian Lance Taylor <iant@google.com>
5407 * init.c (avoid_placement_new_aliasing): New static function.
5408 (build_new_1): Call it.
5410 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5412 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5413 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5415 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5418 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5419 on init, the non-decl cond operand and increment value.
5421 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5424 * decl.c (check_initializer): Report an error when a brace enclosed
5425 initializer is used for a non-aggregate type in C++98.
5426 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5428 (grokdeclarator): Likewise.
5429 (move_fn_p): Likewise.
5430 * typeck.c (check_return_expr): Likewise.
5431 * call.c (reference_binding): Likewise.
5432 * error.c (cp_cpp_error): Likewise.
5433 * pt.c (check_default_tmpl_args): Likewise.
5435 * lex.c (init_reswords): Likewise.
5436 * parser.c (p_parser_primary_expression): Likewise.
5437 (TOKEN_PRECEDENCE): Likewise.
5438 (cp_parser_init_declarator): Likewise.
5439 (cp_parser_ptr_operator): Likewise.
5440 (cp_parser_parameter_declaration): Likewise.
5441 (cp_parser_enclosed_template_argument_list): Likewise.
5442 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5443 (cp_parser_next_token_ends_template_argument_p): Likewise.
5445 2007-06-04 Simon Baldwin <simonb@google.com>
5447 * decl.c (grokdeclarator): Readability change. Moved case labels
5448 into direct switch statement scope.
5450 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5452 * call.c (convert_like_real): Remove pointless code.
5454 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5456 * decl.c (get_atexit_fn_ptr_type): New function.
5457 (get_atexit_node): Use it.
5458 (start_cleanup_fn): Likewise.
5459 (register_dtor_fn): Use the object's destructor, instead of a
5460 separate cleanup function, where possible.
5461 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5462 (atexit_fn_ptr_type_node): New macro.
5463 * decl2.c (build_cleanup): Use build_address.
5465 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5467 * typeck.c (build_binary_op): Include types in error.
5469 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5472 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5473 needs runtime initialization.
5475 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5478 * semantics.c (finish_trait_expr): Complete the types.
5480 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5481 Douglas Gregor <doug.gregor@gmail.com>
5482 Pedro Lamarao <pedro.lamarao@mndfck.org>
5483 Howard Hinnant <howard.hinnant@gmail.com>
5487 * typeck.c (comptypes): Don't consider rvalue and lvalue
5488 reference types to be equivalent.
5489 (check_return_expr): Move from certain lvalues when returning
5491 * decl.c (grokdeclarator): Implement reference collapsing.
5492 (copy_fn_p): Don't consider constructors taking rvalue references
5493 to be copy constructors.
5495 * call.c (conversion): New "rvaluedness_matches_p" member.
5496 (convert_class_to_reference): Require reference type as first
5497 parameter instead of base type.
5498 (reference_binding): Add logic to handle rvalue references.
5499 (implicit_conversion): Update inaccurate comment.
5500 (convert_like_real): Disable creation of temporaries that are
5501 impossible to initialize for types with move constructors.
5502 (build_over_call): Elide move constructors when possible.
5503 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5504 (maybe_handle_ref_bind): Return conversion instead of type node.
5505 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5506 determine preferred conversion sequences.
5507 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5508 (LOOKUP_PREFER_RVALUE): New.
5509 (DECL_MOVE_CONSTRUCTOR_P): New.
5510 (struct cp_declarator): Add "reference" member for reference
5511 types, with new "rvalue_ref" flag.
5512 (cp_build_reference_type): Declare.
5513 (move_fn_p): Declare.
5514 * error.c (dump_type_prefix): Format rvalue reference types
5515 correctly in error messages.
5516 * except.c (build_throw): Move from certain lvalues when
5518 * mangle.c (write_type): Mangle rvalue references differently
5519 than regular references.
5520 * parser.c (make_reference_declarator): Add boolean parameter for
5522 (cp_parser_make_indirect_declarator): New.
5523 (cp_parser_new_declarator_opt): Call
5524 cp_parser_make_indirect_declarator.
5525 (cp_parser_conversion_declarator_opt): Ditto.
5526 (cp_parser_declarator): Ditto.
5527 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5529 * pt.c (tsubst): Implement reference collapsing.
5530 (maybe_adjust_types_for_deduction): Implement special template
5531 parameter deduction rule for rvalue references.
5532 (type_unification_real): Update calls to
5533 maybe_adjust_types_for_deduction.
5534 (try_one_overload): Ditto.
5535 (unify_pack_expansion): Ditto.
5536 * tree.c (lvalue_p_1): Handle rvalue reference types.
5537 (cp_build_reference_type): New.
5539 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5542 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5543 variables that need runtime initialization.
5545 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5548 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5549 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5550 case POSTDECREMENT_EXPR>): Return the error_mark_node
5551 if either the real or imaginary parts would an
5554 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5555 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5558 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5559 token is a closing brace, false if there are no tokens left.
5560 (cp_parser_namespace_alias_definition): Only consume the next token if
5561 it is a closing brace.
5563 * parser.c (cp_parser_class_specifier): Likewise.
5565 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5567 * semantics.c (finish_member_declaration): Fix a typo in the
5570 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5582 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5583 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5584 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5585 whether everything was okay. Fix indentation.
5586 (push_template_decl_real): Check for bare parameter packs in
5587 function parameters; where errors occur, mark the parameter types
5588 with ERROR_MARK_NODEs to avert ICEs.
5589 (coerce_template_parameter_pack): New.
5590 (coerce_template_parms): Moved parameter pack coercion into
5591 coerce_template_parameter_pack, and permit it anywhere in the
5592 template parameter list (not just at the end). Parameter and
5593 argument indices can vary (somewhat) separately now, so add
5594 PARM_IDX and ARG_IDX.
5595 (fn_type_unification): Don't set an argument pack as incomplete if
5596 no argument pack was deduced.
5597 (type_unification_real): If a type parameter is a parameter pack
5598 and has not otherwise been deduced, it will be deduced to an empty
5600 (more_specialized_fn): Use the actual lengths of the argument
5601 lists when comparing against expansions.
5602 * semantics.c (finish_member_declaration): If a field's type has
5603 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5605 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5608 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5610 2007-05-22 Ollie Wild <aaw@google.com>
5612 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5613 (unqualified_namespace_lookup): Adds check for hidden types.
5615 2007-05-22 Ollie Wild <aaw@google.com>
5617 * decl.c (duplicate_decls): Verify namespace names are unique.
5619 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5621 * decl.c (cxx_maybe_build_cleanup): Handle
5622 __attribute__((cleanup)).
5624 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5626 * cvt.c (cp_convert_and_check): Don't check warnings if the
5629 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5631 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5633 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5636 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5637 type only if is a class type (5.2.8/4).
5639 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5641 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5642 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5643 c_common_unsigned_type.
5645 2007-05-11 Silvius Rus <rus@google.com>
5647 * typeck.c (build_indirect_ref): Add call to
5648 strict_aliasing_warning.
5649 (build_reinterpret_cast_1): Condition call to
5650 strict_aliasing_warning.
5652 2007-05-11 Jan Hubicka <jh@suse.cz>
5654 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5655 * decl2.c (start_objects): ctors and dtors are no longer public.
5656 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5658 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5660 * typeck.c (build_unary_op): Remove code that used to
5661 handle non lvalue increments/decrements.
5663 2007-05-07 Mike Stump <mrs@apple.com>
5665 * parser.c (check_empty_body): Add.
5666 (cp_parser_iteration_statement): Add call to check_empty_body.
5668 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5671 * mangle.c (write_mangled_name): Mangle static variable names.
5672 (write_unqualified_name): Use local-source-name for
5673 namespace-scope static variables.
5675 2007-05-04 Dirk Mueller <dmueller@suse.de>
5677 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5680 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5683 * decl2.c (constrain_class_visibility):
5684 Use strip_pointer_or_array_types instead of strip_array_types.
5686 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5689 * decl.c (reshape_init_r): Don't reshape the first element if it
5690 is a pointer to member function.
5692 2007-04-27 Simon Baldwin <simonb@google.com>
5694 * decl.c (grokparms): Changed message format from %qD to %qE.
5696 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5698 * error.c (maybe_warn_variadic_templates): Variadic templates are
5699 now in C++0x, so only warn about them in C++98 mode.
5701 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5704 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5705 integeral types from vectors types.
5707 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5710 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5711 for type dependent OMP_CLAUSE_DECLs.
5713 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5716 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5717 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5718 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5719 * init.c (build_zero_init): Adjust, as
5720 COMPLEX_TYPE is now a SCALAR_TYPE.
5721 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5722 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5724 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5726 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5727 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5728 (trait_expr_value): Adjust.
5730 2007-04-23 Simon Baldwin <simonb@google.com>
5732 * decl.c (grokparms): Added new error for duplicate function
5733 parameters names in function prototypes, to match gcc behavior.
5735 2007-04-23 Jan Hubicka <jh@suse.cz>
5737 * decl2.c (finish_objects): Do not call target constructor/destructor
5740 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5742 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5743 instead of checking GIMPLE_STMT_P in chain_next.
5745 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5748 * call.c (convert_for_arg_passing): Convert bitfields to their
5751 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5754 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5756 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5759 * decl2.c (constrain_class_visibility):
5760 Do not warn about the use of anonymous namespace in the main input file.
5762 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5764 * cp-tree.h (current_template_parms): Fix typo in comment.
5766 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5768 * cp-tree.h, error.c: Fix comment typos.
5770 2007-04-13 Jason Merrill <jason@redhat.com>
5773 * call.c (reference_binding): Add c_cast_p parm. If true,
5774 add quals to TO as needed to make it reference-compatible.
5776 2007-04-11 Jan Hubicka <jh@suse.cz>
5778 * class.c (convert_to_base_statically): Fold produced tree; verify
5779 that we are not processing template_decl.
5781 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5784 * class.c (build_base_path): Ensure that the converted pointer has
5785 the same cv-qualification as the input.
5787 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5789 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5791 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5793 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5795 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5796 * tree.c (cp_add_pending_fn_decls): Remove.
5797 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5799 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5801 Revert change removing staticp.
5803 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5805 * cp-objcp-common.c (cxx_staticp): Remove.
5806 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5807 * cp-tree.h (cxx_staticp):
5809 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5811 * class.c (check_for_override): Don't remove dllmport attribute
5814 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5817 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5818 type issue error and return early.
5820 2007-03-30 Jason Merrill <jason@redhat.com>
5823 * typeck.c (cp_type_readonly): New fn.
5824 * cp-tree.h: Declare it.
5825 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5826 (cp_finish_decl): Not here.
5828 2007-03-31 Richard Guenther <rguenther@suse.de>
5830 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5833 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5838 * parser.c (declarator_can_be_parameter_pack): New.
5839 (cp_parser_template_parameter): Only parse the `...' if the
5840 declarator can be a parameter pack.
5841 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5843 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5844 types (they could be used as array bounds).
5845 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5846 (tsubst_pack_expansion): Handle failure to expand parameter
5849 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5852 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5853 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5854 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5855 (CLASS_TYPE_NON_UNION_P): Add.
5856 (struct lang_type_class): Add has_complex_dflt.
5857 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5858 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5859 * cp-tree.def: Add TRAIT_EXPR.
5860 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5861 * lex.c (struct resword): Add __has_nothrow_assign,
5862 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5863 __has_trivial_constructor, __has_trivial_copy,
5864 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5865 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5866 __is_pod, __is_polymorphic, __is_union.
5867 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5868 (cp_parser_trait_expr): New.
5869 * semantics.c (finish_trait_expr, trait_expr_value
5870 classtype_has_nothrow_copy_or_assign_p): New.
5871 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5873 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5874 * class.c (check_bases, check_field_decl, check_bases_and_members):
5875 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5876 * pt.c (uses_template_parms, tsubst_copy_and_build,
5877 value_dependent_expression_p, type_dependent_expression_p): Deal with
5879 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5881 2007-03-29 Richard Guenther <rguenther@suse.de>
5883 * tree.c (cp_walk_subtrees): Do not set input_location.
5885 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5888 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5891 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5893 * parser.c (struct cp_parser): Update comment for
5894 greater_than_is_operator_p.
5895 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5896 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5897 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5898 !GREATER_THAN_IS_OPERATOR_P.
5899 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5900 `>>' operators that will become two `>' tokens in C++0x.
5901 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5902 mode, allowing it to terminate default arguments.
5903 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5904 `>>' like two consecutive `>' tokens.
5905 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5906 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5907 ends a template argument.
5909 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5911 * decl.c (redeclaration_error_message): Complain when redeclaring
5912 a friend function with default template arguments (C++0x mode only).
5913 * cp-tree.h (check_default_tmpl_args): Declare.
5914 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5915 template arguments in function templates. Add support for checking
5916 the default template arguments of friend templates.
5917 (push_template_decl_real): Fix call to check_default_tmpl_args.
5918 (type_unification_real): If a template parameter has not been
5919 deduced but provides a default template argument, substitute into
5920 that default template argument.
5921 * parser.c (cp_parser_init_declarator): When declaring (but not
5922 defining!) a function template in C++0x mode, check for default
5925 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5928 * decl.c (grokdeclarator): Deal with cv-qualified function type
5929 typedefs in the same way for member and non-member functions.
5931 2007-03-26 Dirk Mueller <dmueller@suse.de>
5933 * parser.c (cp_parser_member_declaration): Pedwarn
5934 about stray semicolons after member declarations.
5936 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5939 * pt.c (instantiate_decl): Set in_system_header.
5941 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5943 * cp-tree.h (current_tempalte_parms): Improve documentation.
5944 * pt.c (current_template_args): Likewise.
5947 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5948 not consume tokens when failing.
5950 2007-03-22 Jim Wilson <wilson@specifix.com>
5951 Mark Mitchell <mark@codesourcery.com>
5954 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5955 consistent with FROM.
5957 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5959 * error.c (dump_expr): Handle dependent names that designate types.
5960 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5962 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5964 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5966 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5968 * cvt.c (cp_convert_and_check) : Define.
5969 * cp-tree.h (cp_convert_and_check): Declare.
5970 * call.c (convert_conversion_warnings): Rename to
5971 conversion_null_warnings. The warning for floating-point to
5972 integer is handled by convert_and_check in convert_like_real.
5973 (convert_like_real): convert_conversion_warnings was renamed as
5974 conversion_null_warnings.
5975 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5976 overflow and changes of value during conversion.
5978 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5981 * parser.c (cp_parser_statement): If 'namespace' is found, this
5982 only can be a namespace alias definition, so parse it now.
5983 (cp_parser_namespace_alias_definition): if we find an open brace
5984 instead of '=', then this is actually a misplaced namespace
5987 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5990 * decl.c (cxx_init_decl_processing): Move command-line options
5991 processing to c-opts.c.
5993 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5995 * ptree.c (cxx_print_type): Use formatting markup for integers
5996 when printing template parameter index/level/orig level.
5997 (cxx_print_xnode): Ditto.
5998 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5999 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
6000 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
6002 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
6003 rather than a HOST_WIDE_INT.
6004 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
6005 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
6007 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
6008 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
6009 IN_BASE_INITIALIZER bool bitfields.
6010 (struct cp_declarator): Make KIND a 4-bit field. Make
6011 PARAMETER_PACK_P a bool bitfield just after KIND.
6012 * pt.c (uses_parameter_packs): Destroy the pointer set.
6013 (make_pack_expansion): Ditto.
6014 (check_for_bare_parameter_packs): Ditto.
6015 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
6017 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
6020 * call.c (convert_default_arg): Instead of copying the node,
6023 2007-03-15 Dirk Mueller <dmueller@suse.de>
6026 * call.c (convert_conversion_warnings): New..
6027 (convert_like_real): .. factored out from here.
6028 (convert_conversion_warnings): Add warning about
6029 false being converted to NULL in argument passing.
6031 2007-03-14 Dirk Mueller <dmueller@suse.de>
6033 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6034 (finish_do_body): Warn about empty body in do/while statement.
6036 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6038 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6040 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6043 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6046 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6048 * repo.c (init_repo): Initialize random_seed saved options.
6049 (finish_repo): Adjust.
6051 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6054 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6057 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6059 * decl.c (compute_array_index_type): New warning flag warn_vla.
6061 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6064 * call.c (convert_default_arg): Copy non-constant arguments.
6066 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6069 * parser.c (cp_parser_postfix_expression): Disallow compound
6070 literals in constant expressions.
6073 * semantics.c (finish_typeof): Use unlowered_expr_type.
6075 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6078 * cp-tree.h (unlowered_expr_type): New function.
6079 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6080 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6081 (unlowered_expr_type): New function.
6082 (build_unary_op): Disallow predecrements of bool bitfields.
6083 * call.c (build_conditional_expr): Use unlowered_expr_type.
6084 * pt.c (type_unification_real): Likewise.
6086 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6089 * typeck.c (check_return_expr): Check for bare parameter packs.
6090 (comptypes): Compare template parameter packs and
6091 type pack expansions.
6092 * decl.c (grokdeclarator): Deal with the declaration of function
6094 (grokparms): Verify that the (optional) function parameter pack is
6095 at the end of the parameter list.
6096 (xref_basetypes): Handle pack expansions in the base class.
6097 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6098 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6099 (NONTYPE_ARGUMENT_PACK): New.
6100 (TYPE_PACK_EXPANSION): New.
6101 (EXPR_PACK_EXPANSION): New.
6102 (ARGUMENT_PACK_SELECT): New.
6103 * cp-objcp-common.c (cp_tree_size): Compute size of
6104 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6105 ARGUMENT_PACK_SELECT.
6106 * error.c (dump_template_argument): Print template argument packs.
6107 (dump_template_argument_list): Ditto.
6108 (dump_template_parameter): Dump `...' for template type parameter
6110 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6111 (dump_parameters): Print function parameter packs.
6112 (dump_template_parms): Print template argument packs.
6113 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6114 (maybe_warn_variadic_templates): New.
6115 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6116 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6117 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6119 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6120 (write_template_arg): Write argument packs as separate arguments.
6121 * cp-tree.h (struct template_parm_index_s): Add flag that
6122 indicates that the template parameter is actually a parameter
6124 (struct tree_argument_pack_select): New.
6125 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6126 (union lang_tree_node): Add argument_pack_select.
6127 (FUNCTION_PARAMETER_PACK_P): New.
6128 (PACK_EXPANSION_P): New.
6129 (PACK_EXPANSION_PATTERN): New.
6130 (SET_PACK_EXPANSION_PATTERN): New.
6131 (PACK_EXPANSION_PARAMETER_PACKS): New.
6132 (ARGUMENT_PACK_P): New.
6133 (ARGUMENT_PACK_ARGS): New.
6134 (SET_ARGUMENT_PACK_ARGS): New.
6135 (ARGUMENT_PACK_INCOMPLETE_P): New.
6136 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6137 (TEMPLATE_PARM_PARAMETER_PACK): New.
6138 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6139 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6140 (ARGUMENT_PACK_SELECT_INDEX): New.
6141 (ARGUMENT_PACK_SELECT_ARG): New.
6142 (struct cp_declarator): Add parameter_pack_p flag.
6143 (maybe_warn_variadic_templates): Declare.
6144 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6145 indicate a template parameter pack.
6146 (uses_parameter_packs): Declare.
6147 (template_parameter_pack_p): Declare.
6148 (template_parms_variadic_p): Declare.
6149 (make_pack_expansion): Declare.
6150 (check_for_bare_parameter_packs): Declare.
6151 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6152 sizeof... expressions.
6153 (pp_cxx_expression): Print pack expansions and non-type argument
6155 (pp_cxx_exception_specification): Print pack expansions.
6156 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6157 (pp_cxx_ctor_initializer): Print pack expansions.
6158 (pp_cxx_type_id): Print pack expansions.
6159 (pp_cxx_template_argument_list): Print argument packs.
6160 (pp_cxx_template_parameter): Print ellipsis for template parameter
6162 * pt.c (comp_template_parms): Compare template parameter packs.
6163 (template_parameter_pack_p): New.
6164 (template_parms_variadic_p): New.
6165 (template_args_variadic_p): New.
6166 (make_ith_pack_parameter_name): New.
6167 (struct find_parameter_pack_data): New.
6168 (find_parameter_packs_r): New.
6169 (uses_parameter_packs): New.
6170 (make_pack_expansion): New.
6171 (check_for_bare_parameter_packs): New.
6172 (expand_template_argument_pack): New.
6173 (reduce_template_parm_level): Propagate parameter pack flag.
6174 (process_template_parm): Add is_parameter_pack parameter to state
6175 when the parameter is actually a parameter pack. Create template
6176 parameter packs when is_parameter_pack is true.
6177 (current_template_args): The argument for a template parameter
6178 pack is an argument pack containing a single pack expansion.
6179 (process_partial_specialization): When checking that non-type
6180 argument expressions do not involve template parameters, loop over
6181 the arguments in argument packs separately.
6182 (push_template_decl_real): Check that the type of the declaration
6183 does not have any bare parameter packs. Check that primary
6184 templates have no more than one parameter pack, and that it comes
6185 at the end of the template parameter list.
6186 (convert_template_argument): Handle coercions for pack expansion
6187 expressions by coercing the pattern then rebuilding the expansion.
6188 (coerce_template_parms): When coercing the arguments for a
6189 variadic template, pack "extra" arguments into an argument pack.
6190 (coerce_template_template_parms): Cannot coerce between parameter
6191 packs and non-pack parameters.
6192 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6193 (comp_template_args): Expand all template arguments packs before
6194 comparing template argument lists.
6195 (mangle_class_name_for_template): Make argument packs as separate
6197 (for_each_template_parm_r): No need to handle BASELINK.
6198 (instantiate_class_template): Handle pack expansions in the base
6200 (tsubst_pack_expansion): New.
6201 (tsubst_template_args): Handle substitutions of argument packs and
6202 pack expansion into template argument lists.
6203 (tsubst_decl): Expand function parameter packs into separate
6204 function parameters.
6205 (tsubst_arg_types): Expand a type pack expansion into separate
6207 (tsubst_exception_specification): Handle pack expansions in
6208 exception specifiers.
6209 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6210 replacing a template parameter with its argument. If we encounter
6211 a substitution for an argument pack, just return the parameter
6213 (tsubst_copy): sizeof(X...) returns the number of elements in
6214 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6215 PARM_DECL is a parameter pack.
6216 (tsubst_expr): Expression pack expansions and argument packs
6217 cannot show up here; they will all be handled through function
6218 calls, sizeof, and template argument lists.
6219 (tsubst_copy_and_build): sizeof(X...) returns the number of
6220 elements in parameter pack X. Handle pack expansions in TREE_LIST
6221 and CONSTRUCTOR nodes.
6222 (fn_type_unification): Handle "incomplete" explicit template
6223 argument lists that specify some of the arguments for a template
6225 (type_unification_real): Unify arguments against pack expansions.
6226 (template_parm_level_and_index): New, helper function.
6227 (unify_pack_expansion): New.
6228 (unify): Unify argument packs on an argument-by-argument basis,
6229 handling variadic argument packs as well.
6230 (more_specialized_fn): Handle unification of function parameter
6231 packs. All things being equal, prefer non-variadic function
6232 templates to variadic function templates.
6233 (more_specialized_class): Prefer the variadic class template
6234 partial specialization that binds fewer arguments to a parameter
6236 (regenerate_decl_from_template): Expand function parameter packs
6237 into separate parameters.
6238 (instantiate_decl): Ditto.
6239 (tsubst_initializer_list): Handle pack expansions for base-class
6241 (dependent_type_p_r): Determine dependent types in argument packs
6242 and pack expansions.
6243 (value_dependent_expression_p): Determine value-dependence of
6244 non-type argument packs.
6245 (dependent_template_arg_p): Handle argument packs.
6246 * semantics.c (finish_cond): Check for bare parameter packs.
6247 (finish_expr_stmt): Ditto.
6248 (finish_for_expr): Ditto.
6249 (finish_switch_cond): Ditto.
6250 (finish_mem_initializers): Ditto.
6251 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6253 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6254 * parser.c (make_declarator): Declarator is not an expansion.
6255 (make_pointer_declarator): Transfer parameter pack flag to outer
6257 (make_reference_declarator): Ditto.
6258 (make_ptrmem_declarator): Ditto.
6259 (make_call_declarator): Ditto.
6260 (make_array_declarator): Ditto.
6261 (cp_parser_postfix_expression): Allow pack expansion expressions
6262 in the argument list for a call expression.
6263 (cp_parser_parenthesized_expression_list): Add new parameter
6264 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6265 into separate arguments."
6266 (cp_parser_new_placement): Allow pack expansion expressions.
6267 (cp_parser_new_initializer): Ditto.
6268 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6269 base-class initializer expansion.
6270 (cp_parser_mem_initializer): Ditto.
6271 (cp_parser_template_parameter_list): Keep track of whether the
6272 template parameter is a template parameter pack.
6273 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6274 template parameter pack.
6275 (cp_parser_type_parameter): Ditto.
6276 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6278 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6279 this declarator is a parameter pack.
6280 (cp_parser_parameter_declaration): The ellipsis does not end the
6281 parameter declaration, because it might be a parameter pack. Parse
6282 the ellipsis to indicate a parameter pack.
6283 (cp_parser_initializer): Allow pack expansions.
6284 (cp_parser_initializer_list): Allow ellipsis to create an
6285 initializer expansion.
6286 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6288 (cp_parser_type_id_list): Allow ellipsis to create an exception
6289 specifier expansion.
6290 (cp_parser_attribute_list): Don't allow pack expansions.
6291 (cp_parser_functional_cast): Allow pack expansions.
6292 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6293 compute the length of a parameter pack.
6294 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6295 end a template argument.
6296 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6297 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6300 2007-03-09 Dirk Mueller <dmueller@suse.de>
6302 * call.c (build_new_op): Call warn_logical_operator.
6304 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6307 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6310 * pt.c (any_template_arguments_need_structural_equality_p):
6313 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6315 * decl.c (grokdeclarator): Disable warnings for anonymous
6318 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6320 * typeck2.c (readonly_error): Always emit a hard error.
6321 Remove last argument.
6322 * cp-tree.h (readonly_error): Adjust prototype.
6323 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6324 * typeck.c (build_unary_op): Likewise.
6325 (build_modify_expr): Likewise.
6327 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6330 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6332 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6335 * parser.c (struct cp_parser): New IN_IF_STMT.
6336 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6337 returning if parsing the body of an 'if' statement or issuing an
6338 error and continuing.
6339 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6341 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6343 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6346 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6349 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6351 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6352 Objective-C++. Don't exit early if -shared-libgcc needs to be
6355 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6357 * typeck.c (common_base_type): Delete unused function.
6359 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6361 * Make-lang.in: Add dummy lang.install-pdf target.
6363 2007-03-01 Simon Baldwin <simonb@google.com>
6366 * decl.c (check_tag_decl): Added new warning for typedef ignored
6367 when it precedes an otherwise valid non-typedef declaration.
6369 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6371 * typeck.c (build_function_call): Store converted arguments
6372 in a stack-allocated array instead of building a list.
6373 (convert_arguments): Store arguments in the array passed in as an
6374 argument, and return the actual number of arguments.
6375 * call.c (build_call): Delete, and replace with...
6376 (build_call_n, build_call_a): New.
6377 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6378 (build_over_call): Store converted arguments in a stack-allocated
6379 array instead of building a list.
6380 (build_cxx_call): Pass arguments in an array instead of as a list.
6381 (build_java_interface_fn_ref): Rewrite to avoid constructing
6383 * tree.h: Update declarations to reflect above changes.
6384 * method.c (use_thunk): Use a stack-allocated array to hold
6385 the arguments instead of a list.
6386 * rtti.c (throw_bad_cast): Update call to cxx_call.
6387 (throw_bad_typeid): Likewise.
6388 (build_dynamic_cast_1): Likewise.
6389 * init.c (build_builtin_delete_call): Use build_call_n.
6390 * decl.c (expand_static_init): Likewise.
6391 * except.c (cp_protect_cleanup_actions): Likewise.
6392 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6393 (gimplify_must_not_throw_expr): Likewise.
6394 (cxx_omp_apply_fn): Use build_call_a.
6396 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6398 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6399 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6401 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6403 * cp-tree.h (static_ctors): Remove.
6404 * cp-tree.h (static_dtors): Likewise.
6405 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6406 refactoring of tree_map hierarchy.
6407 (decl_shadowed_for_var_insert): Likewise.
6408 * semantics.c (expand_body): Use c_expand_body.
6409 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6410 * decl2.c (static_ctors): Remove.
6411 (static_dtors): Likewise.
6412 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6413 objc_generate_static_init_call. Do not call static_[cd]tors.
6414 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6416 (cp_write_global_declarations): Likewise.
6418 2007-02-23 Richard Guenther <rguenther@suse.de>
6420 * class.c (note_name_declared_in_class): Make declaration
6421 changes meaning a pedwarn.
6423 2007-02-22 Michael Matz <matz@suse.de>
6426 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6427 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6428 dump_function_decl): Guard emitting outer scopes by new flag.
6429 * cp-lang.c (cxx_dwarf_name): New function.
6430 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6431 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6433 (push_template_decl_real, lookup_template_class): Remove calls
6436 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6438 * call.c (build_new_method_call): Ensure that explicit calls of
6439 destructors have type "void".
6441 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6443 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6444 and -Walways-true with -Waddress.
6445 * cvt.c (convert_to_void): Replace unconditional warning with
6448 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6450 * decl.c, tree.c: Fix comment typos.
6452 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6455 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6456 statement expression if we had an error mark node.
6458 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6459 Brooks Moses <brooks.moses@codesourcery.com>
6460 Lee Millward <lee.millward@codesourcery.com>
6462 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6463 Change class to tcc_vl_exp.
6465 * call.c (build_call): Use build_call_list instead
6467 (build_over_call): Likewise.
6468 (build_new_method_call): Use build_min_non_dep_call_list
6469 instead of build_min_non_dep.
6471 * error.c (dump_call_expr_args): New function.
6472 (dump_aggr_init_expr_args): New function.
6473 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6474 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6476 * cvt.c (convert_to_void): Use build_call_array instead
6477 of build3; use new AGGR_INIT_EXPR accessor macros.
6479 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6480 instead of TREE_CODE_LENGTH.
6482 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6483 AGGR_INIT_EXPR accessor macros.
6485 * cp-gimplify.c (cp_gimplify_init_expr): Use
6486 AGGR_INIT_EXPR_SLOT to set the slot operand.
6488 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6489 (AGGR_INIT_EXPR_SLOT): New macro.
6490 (AGGR_INIT_EXPR_ARG): New macro.
6491 (aggr_init_expr_nargs): New macro.
6492 (AGGR_INIT_EXPR_ARGP): New macro.
6493 (aggr_init_expr_arg_iterator): New.
6494 (init_aggr_init_expr_arg_iterator): New.
6495 (next_aggr_init_expr_arg): New.
6496 (first_aggr_init_expr_arg): New.
6497 (more_aggr_init_expr_args_p): New.
6498 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6499 (stabilize_aggr_init): New declaration.
6500 (build_min_non_dep_call_list): Likewise.
6502 * tree.c (process_aggr_init_operands): New function.
6503 (build_aggr_init_array) New function.
6504 (build_cplus_new): Update to use new CALL_EXPR and
6505 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6506 build_aggr_init_array.
6507 (build_min_non_dep_call_list) New function.
6508 (build_min_nt): Assert input code parameter is not a variable
6509 length expression class.
6510 (build_min, build_min_non_dep): Likewise.
6511 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6512 to check for equality instead of recursing. Handle tcc_vl_exp
6514 (stabilize_call): Update to only handle CALL_EXPRs, not
6515 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6516 (stabilize_aggr_init): New function.
6517 (stabilize_init): Use it.
6519 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6520 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6521 AGGR_INIT_EXPR accessor macros and argument iterators.
6523 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6524 build_vl_exp. Iterate through the operands, recursively
6525 processing each one.
6526 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6527 CALL_EXPR accessor macros.
6528 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6529 tree code classes. Use TREE_OPERAND_LENGTH instead of
6532 * semantics.c (finish_call_expr): Use build_nt_call_list
6533 instead of build_nt.
6534 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6535 accessor macros. Use build_call_array to construct the
6536 CALL_EXPR node instead of build3
6538 * decl2.c (build_offset_ref_call_from_tree): Use
6539 build_nt_call_list and build_min_non_dep_call_list instead
6540 of build_min_nt and build_min_non_dep.
6542 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6543 Use build_nt_call_list instead of build_min_nt.
6545 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6548 * call.c (build_conditional_expr): Improve error message.
6550 2007-02-13 Dirk Mueller <dmueller@suse.de>
6552 * friend.c (do_friend): Annotate warning about friend
6553 declarations in templates with OPT_Wnon_template_friend.
6554 Convert informal message from warning() to inform().
6556 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6557 Mark Mitchell <mark@codesourcery.com>
6560 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6561 instantiations for variables.
6563 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6566 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6567 Check warn_unused_value just once.
6569 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6572 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6573 (fn_type_unificiation): Likewise.
6574 (get_bindings): Likewise.
6576 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6579 * decl.c (finish_function): Use DECL_REPLACEABLE.
6580 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6582 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6584 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6586 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6588 * decl.c (grokvardecl): Don't error if !have_tls.
6589 (grokdeclarator): Likewise.
6590 * parser.c (cp_parser_omp_threadprivate): Likewise.
6592 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6595 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6596 parameters and result decls in omp clauses.
6597 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6600 2007-02-05 Dirk Mueller <dmueller@suse.de>
6603 * parser.c (cp_parser_class_specifier): Always initialize bases.
6605 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6607 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6608 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6609 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6611 * semantics.c (finish_omp_atomic): Store a whole expression node
6612 in operand 1, and integer_zero_node in operand 0, for dependent
6613 OMP_ATOMIC. Rewrite to make flow easier to understand.
6615 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6617 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6619 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6621 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6622 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6624 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6626 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6627 keyword warning to -Wc++0x-compat.
6629 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6631 * decl.c (grokdeclarator): Update documentation.
6633 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6636 * decl.c (grokdeclarator): If __thread is used together with
6637 a storage class other than extern and static, clear thread_p
6638 after issuing diagnostics and fall through to checking the
6641 2007-01-30 Roger Sayle <roger@eyesopen.com>
6643 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6644 calculating the size of an array (to avoid recursive errors).
6646 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6649 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6651 * call.c (convert_like_real): Don't warn when converting to
6654 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6656 * decl.c (pop_label): Replace warning with call to
6657 warn_for_unused_label.
6659 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6662 * semantics.c (finish_pseudo_destructor_expr): Check the
6663 destrutor name by calling check_dtor_name.
6665 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6667 * lex.c (D_CPP0X): Rename.
6669 (reswords): D_CPP0X -> D_CXX0X.
6670 (init_reswords): Ditto.
6671 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6672 of C++0x keywords as identifiers.
6674 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6677 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6680 2007-01-23 Ian Lance Taylor <iant@google.com>
6682 * typeck.c (convert_for_assignment): Only warn about a = b = c
6683 when converting to bool.
6685 2007-01-23 Roger Sayle <roger@eyesopen.com>
6687 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6689 * typeck.c (ignore_overflows): Remove the remaining uses of
6690 TREE_CONSTANT_OVERFLOW.
6692 2007-01-20 Jan Hubicka <jh@suse.cz>
6694 * decl2.c (start_objects, start_static_storage_duration_function):
6695 Do not make the functions uninlinable.
6697 2007-01-17 Ian Lance Taylor <iant@google.com>
6699 * class.c (add_method): Call VEC_reserve_exact rather than passing
6700 a negative size to VEC_reserve.
6702 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6705 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6707 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6710 * decl.c (make_typename_type): If the qualified name is not a
6711 type, issue an error.
6712 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6715 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6717 * rtti.c: Include target.h.
6718 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6719 don't emit typeinfo for fundamental types as weak.
6720 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6722 2007-01-08 Richard Guenther <rguenther@suse.de>
6724 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6726 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6728 * call.c (standard_conversion): Pass flag to
6729 vector_types_convertible_p to disallow emission of note.
6730 * typeck.c (convert_for_assignment): Pass flag to
6731 vector_types_convertible_p to allow emission of note.
6732 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6733 to disallow emission of note.
6735 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6738 * typeck.c (build_binary_op): Call overflow_warning if
6739 TREE_OVERFLOW_P is true for the result and not for any of the
6742 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6745 * class.c (add_method): Don't wait until template
6746 instantiation time to complain about duplicate methods.
6748 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6751 * semantics.c (finish_unary_op_expr): Warn only if result
6752 overflowed and operands did not.
6754 2007-01-05 Ian Lance Taylor <iant@google.com>
6756 * typeck.c (build_binary_op): Warn about comparing a non-weak
6759 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6761 * pt.c (tsubst): Propagate the need for structural equality checks
6762 when reducing the level of template parameters.
6764 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6766 * pt.c: Fix a comment typo.
6768 2007-01-02 Ian Lance Taylor <iant@google.com>
6770 * semantics.c (maybe_convert_cond): Optionally warn when using an
6771 assignment as a condition.
6772 * typeck.c (convert_for_assignment): Optionally warn about
6773 assigning the result of an assignment to a bool.
6775 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6777 * pt.c (canonical_template_parms): Correct typo in comment.
6779 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6781 * typeck.c (structural_comptypes): Renamed from "comptypes".
6782 (comptypes): Use canonical type information to perform fast type
6783 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6784 canonical type comparison returns the same results as we would see
6785 from the current, structural check. Support COMPARE_STRUCTURAL
6786 when we need structural checks.
6787 * decl.c (typename_compare): Fix comment.
6788 (build_typename_type): TYPENAME_TYPE nodes require structural
6789 equality checks, because they resolve different based on the
6791 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6792 require structural equality checks (for now).
6793 (build_ptrmemfunc_type): Build the canonical pointer to member
6795 (compute_array_index_type): Whenever we build a new index type
6796 to represent the size of an array in a template, we need to mark
6797 this index type as requiring structural equality. This goes for
6798 arrays with value-dependent sizes with the current ABI, or all
6800 * tree.c (cplus_array_hash): New.
6801 (struct cplus_array_info): New.
6802 (cplus_array_compare): New.
6803 (cplus_array_htab): New.
6804 (build_cplus_array_type_1): Use a hash table to cache the array
6805 types we build. Build the canonical array type for each array
6807 (cp_build_qualified_type_real): When building a cv-qualified array
6808 type, use the hash table of array types and build canonical array
6810 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6811 use structural equality (for now).
6812 * cp-tree.h (COMPARE_STRUCTURAL): New.
6813 * pt.c (canonical_template_parms): New.
6814 (canonical_type_parameter): New.
6815 (process_template_parm): Find the canonical type parameter.
6816 (lookup_template_class): When we have named the primary template
6817 type, set the canonical type for our template class to the primary
6818 template type. If any of the template arguments need structural
6819 equality checks, the template class needs structural equality
6821 (tsubst): When reducing the level of a template template
6822 parameter, we require structural equality tests for the resulting
6823 parameter because its template parameters have not had their types
6824 canonicalized. When reducing a template type parameter, find the
6825 canonical reduced type parameter.
6826 (any_template_arguments_need_structural_equality_p): New.