1 2009-01-19 Jason Merrill <jason@redhat.com>
4 * parser.c (cp_parser_unqualified_id): In a template,
6 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
8 2009-01-16 Jason Merrill <jason@redhat.com>
11 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
12 * init.c (build_new): Don't call describable_type unless we
16 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
19 * search.c (protected_accessible_p): N doesn't vary.
21 2009-01-15 Jason Merrill <jason@redhat.com>
24 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
25 accept hidden friends.
27 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
30 * decl.c (grokdeclarator): Check for a non namespace/class context.
32 2009-01-15 Jason Merrill <jason@redhat.com>
36 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
37 a function isn't necessarily an lvalue. Take tree, not const_tree.
38 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
39 * typeck.c (lvalue_or_else): Likewise.
40 * cp-tree.h: Adjust prototypes.
42 2009-01-15 Steve Ellcey <sje@cup.hp.com>
45 * pt.c (tsubst): Check for NULL args.
47 2009-01-15 Dodji Seketeli <dodji@redhat.com>
50 * name-lookup.c (pushtag): Don't create members to types that are not
53 2009-01-14 Nick Clifton <nickc@redhat.com>
56 * parser.c: Pass cp_id_kind computed in
57 cp_parser_postfix_dot_deref_expression to
58 cp_parser_primary_expression.
60 2009-01-13 Jakub Jelinek <jakub@redhat.com>
63 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
64 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
67 2009-01-12 Jason Merrill <jason@redhat.com>
68 Steve Ellcey <sje@cup.hp.com>
71 * name-lookup.c (lookup_name_real): Keep looking past a hidden
74 2009-01-12 Dodji Seketeli <dodji@redhat.com>
77 * pt.c (parameter_of_template_p): New function.
78 * cp-tree.h: Declare it.
79 * name-lookup.c (binding_to_template_parms_of_scope_p): New
81 (outer_binding): Take template parameters in account when looking for
84 2009-01-12 Jason Merrill <jason@redhat.com>
87 * tree.c (pod_type_p): Return 1 for structs created by the back end.
89 2009-01-12 Jakub Jelinek <jakub@redhat.com>
92 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
93 offsetof member-designator, handle it as `[0].'.
96 * decl.c (start_function): If grokdeclarator hasn't returned
97 FUNCTION_DECL nor error_mark_node, issue diagnostics.
99 2009-01-11 Jakub Jelinek <jakub@redhat.com>
102 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
103 (gimplify_if_stmt): ... this.
104 (cp_gimplify_expr): Don't handle IF_STMT here.
105 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
107 2009-01-10 Andrew Pinski <pinskia@gmail.com>
110 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
113 * typeck2.c (build_functional_cast): Check for reference type and NULL
116 2009-01-09 Steve Ellcey <sje@cup.hp.com>
118 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
120 2009-01-09 Jakub Jelinek <jakub@redhat.com>
123 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
125 2009-01-09 John F. Carr <jfc@mit.edu>
128 * parser.c (cp_parser_class_specifier): Clear
129 parser->in_unbraced_linkage_specification_p while parsing class
132 2009-01-07 Jakub Jelinek <jakub@redhat.com>
135 * semantics.c (finish_goto_stmt): Convert destination to
138 2009-01-06 Jason Merrill <jason@redhat.com>
145 * pt.c (check_default_tmpl_args): Don't complain about
146 out-of-order parameter packs in the enclosing class
147 or parameter packs after default args.
148 (coerce_template_parms): If we have more than one
149 parameter pack, don't flatten argument packs.
150 (template_args_equal): Handle argument packs.
151 (comp_template_args): Don't flatten argument packs.
152 (check_instantiated_arg): Split out from...
153 (check_instantiated_args): Here. Handle arg packs.
154 (convert_template_argument): Just check that nontype argument
155 packs have the right type.
157 2009-01-05 Dodji Seketeli <dodji@redhat.com>
160 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
162 2009-01-05 Jason Merrill <jason@redhat.com>
165 * typeck2.c (process_init_constructor_union): Handle union with
168 * mangle.c (write_expression): Remove mangling for zero-operand
172 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
176 * class.c (defaultable_fn_p): Only operator== can be a copy
179 2009-01-02 Jason Merrill <jason@redhat.com>
182 * typeck2.c (process_init_constructor_union): Handle excess
184 (process_init_constructor_record): Likewise.
187 * typeck2.c (digest_init_r): Don't use process_init_constructor
188 for non-aggregate classes.
190 2008-12-31 Jakub Jelinek <jakub@redhat.com>
193 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
194 Return error_mark_node if cp_parser_non_integral_constant_expression
198 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
200 2008-12-29 Jakub Jelinek <jakub@redhat.com>
203 * parser.c (cp_parser_condition): Use cp_parser_require
204 instead of cp_lexer_consume_token to consume =.
207 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
209 2008-12-28 Jakub Jelinek <jakub@redhat.com>
212 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
213 around volatile iteration var in condition and/or increment
216 2008-12-27 Jakub Jelinek <jakub@redhat.com>
219 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
222 2008-12-21 Jason Merrill <jason@redhat.com>
225 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
227 2008-12-20 Jakub Jelinek <jakub@redhat.com>
228 Manuel López-Ibáñez <manu@gcc.gnu.org>
231 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
232 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
235 2008-12-19 Jakub Jelinek <jakub@redhat.com>
238 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
241 2008-12-18 Jakub Jelinek <jakub@redhat.com>
244 * init.c (perform_member_init): For value-initialized
245 references call permerror instead of warning and don't emit any
248 2008-12-18 Jason Merrill <jason@redhat.com>
251 * parser.c (cp_parser_token_starts_cast_expression): An EOF
252 can't start a cast-expression.
254 2008-12-17 Jason Merrill <jason@redhat.com>
256 * semantics.c (describable_type): New function.
257 (finish_decltype_type): Use it for dependent exprs.
258 * cp-tree.h: Declare it.
259 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
260 (write_expression): If skip_evaluation, use type stubs.
261 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
262 declarations of a function.
263 * init.c (build_new): Do auto deduction if type is describable.
264 * decl.c (cp_finish_decl): Likewise.
265 * parser.c (cp_parser_omp_for_loop): Likewise.
267 2008-12-10 Jason Merrill <jason@redhat.com>
270 * mangle.c (write_builtin_type): Add mangling for decimal floating
271 point and fixed point types.
272 (write_type): Pass FIXED_POINT_TYPE along.
274 2008-12-09 Mark Mitchell <mark@codesourcery.com>
277 * class.c (resolve_address_of_overloaded_function): Check
278 accessibility of member functions unless FLAGS indicates
280 * call.c (standard_conversion): Adjust flags passed to
282 (convert_default_arg): Do not perform access checks.
283 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
285 2008-12-08 Steve Ellcey <sje@cup.hp.com>
287 * decl2.c (mark_used): Remove assemble_external call.
289 2008-12-08 Dodji Seketeli <dodji@redhat.com>
292 * name-lookup.c (kept_level_p): Don't forget the case of levels
293 having using directives.
295 2008-12-08 Richard Henderson <rth@redhat.com>
298 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
299 * decl.c (record_unknown_type): Likewise.
300 (start_enum, finish_enum): Likewise.
302 2008-12-05 Jakub Jelinek <jakub@redhat.com>
305 * error.c (dump_expr): Handle BIT_FIELD_REF.
307 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
310 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
313 2008-12-04 Jason Merrill <jason@redhat.com>
316 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
318 * class.c (check_bases_and_members): Rather than assuming any
319 user-declared default constructor is complex here.
321 2008-12-04 Richard Guenther <rguenther@suse.de>
324 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
325 pointer access with TREE_NO_WARNING.
327 2008-12-03 Jason Merrill <jason@redhat.com>
330 * init.c (build_value_init): Do initial zero-initialization
331 of a class with an implicitly-defined constructor using
332 build_zero_init rather than in build_value_init.
333 (build_value_init_1): Fold into build_value_init.
336 * parser.c (cp_parser_conversion_type_id): Diagnose
337 'operator auto' here.
338 * decl.c (grokdeclarator): Not here.
341 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
342 on explicit constructors.
343 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
344 CONSTRUCTOR_IS_DIRECT_INIT.
346 2008-12-02 Jason Merrill <jason@redhat.com>
348 PR c++/35782, c++/37860
349 * call.c (build_user_type_conversion_1): Remember
351 (convert_like_real): Likewise.
352 (build_over_call): Don't require the copy constructor
353 for copy-list-initialization.
354 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
357 * decl.c (cp_finish_decl): Handle =default and =delete for
360 2008-12-01 Jakub Jelinek <jakub@redhat.com>
363 * parser.c (cp_parser_omp_for_loop): Handle auto.
364 * pt.c (tsubst_omp_for_iterator): Likewise.
366 2008-11-28 Jason Merrill <jason@redhat.com>
369 * init.c (perform_member_init): Fix value-initialization.
370 (build_value_init_1): Add assert to catch cases that will break
372 (build_default_init): Remove.
373 * cp-tree.h: Remove its prototype.
374 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
375 value-initialization.
378 * parser.c (cp_parser_class_name): Only call
379 maybe_note_name_used_in_class if we actually found a class name.
381 2008-11-25 Jason Merrill <jason@redhat.com>
384 * decl2.c (check_classfn): Error rather than abort on parameter
387 2008-11-20 Jason Merrill <jason@redhat.com>
390 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
393 * call.c (build_over_call): Take the address of the function even
395 (build_new_method_call): Remember the type of the called function
398 2008-11-19 Dodji Seketeli <dodji@redhat.com>
401 * pt.c (coerce_template_template_parm): Use the more robust
402 uses_template_parms instead of dependent_type_p.
404 2008-11-19 Dodji Seketeli <dodji@redhat.com>
407 * pt.c (lookup_template_class): Check pointers before dereferencing
409 * error.c (dump_template_decl): Likewise.
411 2008-11-19 Jason Merrill <jason@redhat.com>
414 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
415 that names a class for linkage purposes.
418 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
419 name is not a declaration.
422 * pt.c (instantiate_decl): Don't require a definition of
423 a template that is explicitly instantiated 'extern'.
425 2008-11-18 Jason Merrill <jason@redhat.com>
426 Jakub Jelinek <jakub@redhat.com>
429 * parser.c (cp_parser_type_id): Complain about auto.
430 * decl.c (grokdeclarator): Complain about parameters and
431 conversion functions declared with auto.
433 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
435 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
437 2008-11-17 Jakub Jelinek <jakub@redhat.com>
440 * init.c (constant_value_1): Handle TREE_LIST init.
442 2008-11-15 Jakub Jelinek <jakub@redhat.com>
445 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
446 argtype instead of result_type.
448 2008-11-14 Jason Merrill <jason@redhat.com>
451 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
452 for a non-dependent call.
455 * call.c (build_aggr_conv): Increment i.
457 2008-11-13 Jason Merrill <jason@redhat.com>
460 * typeck2.c (process_init_constructor_record): Update bitfield
462 (check_narrowing): Update bitfield handling, print source type.
464 2008-11-12 Jakub Jelinek <jakub@redhat.com>
468 2007-05-07 Mike Stump <mrs@apple.com>
469 * parser.c (check_empty_body): Add.
470 (cp_parser_iteration_statement): Add call to check_empty_body.
472 2008-11-12 Jason Merrill <jason@redhat.com>
475 * typeck.c (cp_build_modify_expr): Update bitfield handling.
477 2008-11-12 Jakub Jelinek <jakub@redhat.com>
480 * parser.c (cp_parser_simple_declaration): Don't commit
481 to tentative parse if parse errors were seen.
484 * error.c (dump_expr): Handle COMPLEX_EXPR.
486 2008-11-10 Jakub Jelinek <jakub@redhat.com>
489 * parser.c (cp_parser_enum_specifier): After parsing :,
490 parse definitely. Don't return early if type specifier
493 2008-11-06 David Edelsohn <edelsohn@gnu.org>
496 * g++spec.c (LIBSTDCXX_STATIC): New.
497 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
500 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
503 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
506 2008-11-05 Richard Guenther <rguenther@suse.de>
509 * decl.c (start_preparsed_function): Use the correct type for
510 building the RESULT_DECL.
512 2008-10-31 Jakub Jelinek <jakub@redhat.com>
515 * decl.c (grokdeclarator): Diagnose auto function decl without
516 late return type and late return type function decl where type
520 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
523 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
526 * class.c (check_bitfield_decl): Rename min_precision to
527 tree_int_cst_min_precision.
528 * decl.c (finish_enum): Likewise.
530 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
533 * parser.c (cp_parser_token_starts_cast_expression): New.
534 (cp_parser_cast_expression): Peek the next token to decide whether
535 this could be a parenthesized constructor or is definitely an
538 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
541 * typeck.c (build_x_binary_op): Update call to
542 warn_about_parentheses.
543 * parser.c (cp_parser_binary_expression): Add note about passing
544 the correct code for unary expressions.
546 2008-10-24 Jakub Jelinek <jakub@redhat.com>
548 * Make-lang.in (check-c++-subtargets): New alias for
549 check-g++-subtargets.
550 (lang_checks_parallelized): Add check-g++.
551 (check_g++_parallelize): New variable.
553 2008-10-21 Richard Guenther <rguenther@suse.de>
555 * semantics.c (simplify_aggr_init_exprs_r): Remove.
556 (expand_or_defer_fn): Do not walk the function body to
557 simplify aggr_init_exprs.
559 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
562 * typeck.c (cp_common_type): New. The same as
563 type_after_usual_arithmetic_conversions but without promotions.
564 (type_after_usual_arithmetic_conversions): Do the promotions and
566 (common_type): Make it behave like the C version of this
567 function. Do not handle pointer types.
568 (common_pointer_type): Move handling of pointer types from
570 (cp_build_binary_op): Use common_pointer_type instead of
571 common_type in call to pointer_diff.
572 Use cp_common_type instead of common_type.
573 * cp-tree.h (common_pointer_type): Declare.
575 2008-10-14 Jakub Jelinek <jakub@redhat.com>
578 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
579 arguments if they don't already have COND_EXPR's type.
581 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
584 * pt.c (push_template_decl_real): Check that current_template_parms
586 (process_partial_specialization): Assert current_template_parms not
589 2008-10-13 Doug Evans <dje@google.com>
591 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
593 2008-10-10 Jakub Jelinek <jakub@redhat.com>
596 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
599 2008-10-09 Jakub Jelinek <jakub@redhat.com>
602 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
603 setting it to error_mark_node.
605 2008-10-07 Steve Ellcey <sje@cup.hp.com>
607 * decl.c (start_cleanup_fn): Declare as inline.
609 2008-10-06 Jason Merrill <jason@redhat.com>
611 PR c++/37376, other mangling issues
612 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
613 (write_member_name): Break out from...
614 (write_expression): ...here. Handle dependent COMPONENT_REF.
615 (write_template_arg): Wrap an argument pack in 'I'/'E'.
616 (write_builtin_type): Update char16/32_t mangling.
617 (write_nested_name, write_prefix): Don't forget template args
619 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
622 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
624 * typeck.c (build_x_indirect_ref): Add location argument.
625 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
626 (cp_build_unary_op): Add location argument.
627 (cp_build_modify_expr): Same.
628 * class.c (build_base_path): Pass location to build_indirect_ref.
629 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
632 2008-10-05 Dodji Seketeli <dodji@redhat.com>
635 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
636 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
637 of the innermost containing BLOCK.
639 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
642 * error.c (dump_function_decl): Save the exceptions in case of
643 error about incompatible specifications in a specialization.
645 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
647 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
649 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
652 * parser.c (cp_parser_selection_statement): Fix uninitialized
655 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
659 * decl.c (grokdeclarator): Set the type for typedefs to a
660 nested-name-specifier to error_mark_node.
662 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
664 * parser.c (cp_parser_selection_statement): Implement here the
665 -Wempty-body warning for `if' and `else' statements.
666 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
668 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
671 * name-lookup.c (maybe_process_template_type_declaration): Check
672 return value of push_template_decl_real for error_mark_node.
674 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
676 * semantics.c (finish_fname): Pass location to fname_decl.
678 2008-09-23 Jakub Jelinek <jakub@redhat.com>
681 * semantics.c (finish_omp_for): If processing_template_decl, just build
682 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
684 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
686 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
687 (get_member_function_from_ptrfunc): Same.
688 (build_x_binary_op): Same.
689 (build_binary_op): Same.
690 (cp_build_binary_op): New location argument.
691 (pointer_diff): Pass location to cp_build_binary_op.
692 (cp_truthvalue_conversion): Pass location to build_binary_op.
693 (convert_ptrmem): Pass location to cp_build_binary_op.
694 (cp_build_modify_expr): Same.
695 (build_ptrmemfunc): Same.
696 * init.c (expand_cleanup_for_base): Pass location to
697 c_common_truthvalue_conversion.
698 (build_new_1): Pass location to cp_build_binary_op.
699 (build_vec_delete_1): Pass location to *build_binary_op,
700 c_common_truthvalue_conversion.
701 (build_vec_init): Same.
702 (build_delete): Same.
703 * decl.c (compute_array_index_type): Same.
704 * call.c (build_new_op): Same.
705 * rtti.c (build_dynamic_cast_1): Same.
706 * cp-tree.h: Add argument to cp_build_binary_op.
707 * semantics.c (handle_omp_for_class_iterator): Pass location to
708 *build_binary_op, c_common_truthvalue_conversion.
709 * decl2.c (get_guard_cond): Same.
711 2008-09-17 Richard Guenther <rguenther@suse.de>
714 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
715 result to the correct type.
717 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
720 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
721 parameter for duplicate.
723 2008-09-17 Jason Merrill <jason@redhat.com>
726 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
728 2008-09-17 Jakub Jelinek <jakub@redhat.com>
731 * typeck.c (build_array_ref): Use protected_set_expr_location instead
732 of SET_EXPR_LOCATION when ret might not be an expression.
734 2008-09-17 Jan Hubicka <jh@suse.cz>
737 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
739 2008-09-16 Jakub Jelinek <jakub@redhat.com>
742 * semantics.c (finish_compound_literal): Return error_mark_node if
746 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
749 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
751 * decl.c (duplicate_decls): Call error_at.
752 (grokfndecl): New location argument. Use location if available.
753 (grokdeclarator): Pass declarator location to grokfndecl.
754 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
755 * decl2.c (check_classfn): Use error_at.
756 * parser.c (cp_parser_init_declarator): Set function_start_locus
758 (cp_parser_member_declaration): Set id_loc for function declarators.
760 2008-09-09 Jan Hubicka <jh@suse.cz>
763 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
765 2008-09-09 Jakub Jelinek <jakub@redhat.com>
768 * tree.c (array_type_nelts_top): Add size_one_node instead of
771 2008-09-09 Jason Merrill <jason@redhat.com>
774 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
777 2008-09-09 Jakub Jelinek <jakub@redhat.com>
780 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
781 being error_operand_p. Don't clear value if it was error_mark_node.
783 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
785 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
786 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
787 * semantics.c (anon_aggr_type_p): Remove.
789 2008-09-06 Jason Merrill <jason@redhat.com>
792 * parser.c (cp_parser_parameter_declaration_list): Process the
793 PARM_DECLs as we go and push them. Return a TREE_LIST.
794 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
795 (cp_parser_direct_declarator): Create a binding level and
796 suppress deprecated warnings in the parameter list.
797 (make_call_declarator): PARMS is now a tree.
798 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
799 * decl.h (enum deprecated_states, deprecated_state): Move here.
801 (type_is_deprecated): New fn.
802 (grokparms): PARMLIST is a tree now. Warn about parms that
803 use deprecated types.
804 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
806 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
807 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
809 * name-lookup.c (pushtag): Look through function parameter scopes.
810 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
811 when we're parsing a function declarator.
813 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
816 * tree.c (cp_build_qualified_type_real): Deal with sharing of
817 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
820 2008-09-04 Ian Lance Taylor <iant@google.com>
822 * parser.c (check_no_duplicate_clause): Change code parameter to
823 enum omp_clause_code.
825 2008-09-03 Jakub Jelinek <jakub@redhat.com>
828 * decl.c (cp_finish_decl): Only set
829 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
832 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
834 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
835 deferred_mark_used_calls vector and exit early.
836 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
838 (finish_function): Set defer_mark_used_calls for the duration of the
839 function. Call mark_used on any queued decls.
841 2008-09-02 Jason Merrill <jason@redhat.com>
844 * call.c (build_over_call): Make =delete work with SFINAE.
845 * class.c (resolve_address_of_overloaded_function): Likewise.
847 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
848 threadprivate_or_deleted_p.
849 (CP_DECL_THREADPRIVATE_P): Adjust.
850 (DECL_DELETED_FN): Likewise.
851 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
852 (SD_DELETED): New macro.
853 * parser.c (cp_parser_init_declarator): Use them.
854 * decl.c (start_decl): Use them.
856 * decl2.c (mark_used): Give =deleted error even in sizeof.
858 * typeck2.c (check_narrowing): Downgrade narrowing error to
861 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
863 * typeck.c (build_array_ref): Use new location argument.
864 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
865 * call.c (build_new_op): Same.
866 * decl2.c (grok_array_decl): Same.
867 * cp-tree.h (build_array_ref): Add location argument to prototype.
869 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
871 * typeck.c (build_x_indirect_ref): Add location argument.
872 * class.c (build_base_path): Pass location to build_indirect_ref.
873 * pt.c (tsubst_copy_and_build): Pass location to
874 finish_label_address_expr.
875 * parser.c (cp_parser_unary_expression): Same.
877 2008-08-31 Jason Merrill <jason@redhat.com>
879 Implement late-specified return type using 'auto'.
880 * cp-tree.h (struct cp_declarator): Add late_return_type field to
882 * parser.c (cp_parser_late_return_type_opt): New fn.
883 (cp_parser_direct_declarator): Use it.
884 (make_call_declarator): Put it in the declarator.
885 * decl.c (grokdeclarator): Splice in late-specified return type.
886 * pt.c (splice_late_return_type): New fn.
888 2008-08-29 Michael Meissner <gnu@the-meissners.org>
890 * decl.c (builtin_function_1): Take a bool argument to decide
891 whether to use pushdecl or pushdecl_top_level.
892 (duplicate_decls): Copy function specific target and optimization
893 options on duplicate declarations.
894 (cxx_builtin_function): Update builtin_function_1 call.
895 (cxx_builtin_function_ext_scope): New function, guarantee that the
896 declaration is done at global scope.
898 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
899 macro, define builtin function hook for delayed machine specific
902 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
904 2008-08-30 Jason Merrill <jason@redhat.com>
907 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
909 2008-08-29 Jason Merrill <jason@redhat.com>
911 Implement C++0x 'auto' semantics.
912 * decl.c (start_decl_1): Don't complain about auto being incomplete.
913 (cp_finish_decl): Deduce auto.
914 * init.c (build_new): Handle 'new auto'.
915 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
916 message for auto than for normal template type parms.
917 * pt.c (type_dependent_expression_p): Handle { }.
918 (make_auto): New function.
919 (listify_autos): New function.
920 (do_auto_deduction): New function.
921 (is_auto): New function.
922 (type_uses_auto): New function.
923 * cp-tree.h: Declare them.
924 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
925 treat auto as a declspec.
926 (cp_parser_simple_type_specifier): It's a type-specifier.
928 2008-08-29 Mark Mitchell <mark@codesourcery.com>
930 * mangle.c (write_type): Add target-specific manglings for
931 non-fundamental types to the substitution table.
934 2008-08-29 Jakub Jelinek <jakub@redhat.com>
938 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
939 Adjust debug_hooks->imported_module_or_decl callers.
941 2008-08-29 Jan Hubicka <jh@suse.cz>
943 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
945 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
948 * decl.c (reshape_init_r): Check init for error_mark_node.
950 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
953 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
954 (finish_return_stmt): Likewise.
955 (finish_switch_condition): Likewise.
957 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
959 * cp-tree.h: Fix #error directive.
961 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
963 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
964 usual arithmetic conversions on scoped enumeration types.
965 (common_type): Ditto.
966 (default_conversion): Don't perform integral promotions on scoped
968 (build_array_ref): Scoped enumeration types can't be used as
970 * decl.c (start_enum): If building a C++0x scoped enumeration,
971 enter its scope. If provided with an underlying type, check that
972 underlying type and set up the enumeration type accordingly.
973 (finish_enum): Only compute an underlying type if the underlying
974 type isn't already fixed, and only convert the enumerator values
975 now if we've just computed the underlying type. Finish the scope
976 of C++0x scoped enumerations.
977 (build_enumerator): For enumerations with a fixed underlying type,
978 check the enumerator values when the enumerator is defined.
979 (lookup_enumerator): New.
980 * call.c (standard_conversion): Don't allow assignment from
981 integers to scoped enumeration types, even with -fpermissive.
982 Don't convert from scoped enumerations to bool or any arithmetic
984 (build_conditional_expr): Don't per the usual arithmetic
985 conversions for scoped enumeration types.
986 (convert_like_real): Check complain to see if we should
988 * error.c (class_key_or_enum_as_string): Print scoped enums.
989 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
991 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
992 (SCOPED_ENUM_P): New.
993 (UNSCOPED_ENUM_P): New.
994 (SET_SCOPED_ENUM_P): New.
995 (ENUM_UNDERLYING_TYPE): New.
996 * pt.c (lookup_template_class): Update the instantiation of enum
997 types to deal with C++0x scoped enumerations and underlying
999 * name-lookup.c (begin_scope): Deal with scoped enumeration
1001 (lookup_qualified_name): Deal with lookup into enumeration types.
1002 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1003 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1004 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1005 parse a type-name that can be an enumeration type.
1006 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1007 (cp_parser_elaborated_type_specifier): Parse the
1008 optional `struct' or `class' following enum (in C++0x).
1009 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1012 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1014 * typeck.c: Update all calls to pedwarn.
1017 * error.c: Likewise.
1019 * name-lookup.c: Likewise.
1020 * parser.c: Likewise.
1022 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1025 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1028 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1030 * parser.c: Update all calls to inform.
1031 * typeck.c: Likewise.
1033 * class.c: Likewise.
1035 * method.c: Likewise.
1036 * friend.c: Likewise.
1037 * typeck2.c: Likewise.
1039 * name-lookup.c: Likewise.
1042 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1045 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1047 2008-08-18 Tomas Bily <tbily@suse.cz>
1049 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1051 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1053 * typeck.c: Update all callers of permerror.
1055 * class.c: Likewise.
1058 * except.c: Likewise.
1060 * typeck2.c: Likewise.
1062 * semantics.c: Likewise.
1063 * name-lookup.c: Likewise.
1065 * decl2.c: Likewise.
1066 * parser.c: Likewise.
1068 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1071 * pt.c (check_template_shadow): Change to return a bool.
1072 * name-lookup.c (push_class_level_binding): Early return if
1073 check_template_shadow returns false.
1074 * cp-tree.h (check_template_shadow): Adjust declaration.
1076 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1079 * decl.c (grokdeclarator): In case of extern and initializer, return
1080 error_mark_node after the error.
1082 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1085 * decl.c (grokfndecl): Call check_main_parameters_type only if
1088 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1091 * parser.c (cp_parser_class_head): Early return error_mark_node in
1092 case of global qualification of class name or qualified name that
1093 does not name a class.
1095 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1098 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1100 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1103 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1104 Delete forward declarations. Check that toplev.h has not been
1105 included before this file. Include toplev.h and diagnostic.h.
1106 * error.c (cp_cpp_error): Use DK_PEDWARN.
1107 (cxx_incomplete_type_diagnostic): Update declaration.
1108 (cxx_incomplete_type_error): Use DK_ERROR.
1109 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1110 as argument. Use emit_diagnostic.
1111 (cxx_incomplete_type_error): Use DK_ERROR.
1112 (add_exception_specifier): Use diagnostic_t instead of custom
1114 * typeck.c (complete_type_or_else): Update call to
1115 cxx_incomplete_type_diagnostic.
1116 * init.c (build_delete): Likewise.
1117 * call.c (diagnostic_fn_t): Remove unused typedef.
1118 (build_temp): Pass a pointer to diagnostic_t.
1119 (convert_like_real): Use emit_diagnostic.
1120 (joust): Check return value of warning before giving informative
1122 * friend.c (do_friend): Check return value of warning
1123 before giving informative note.
1124 * parser.c (cp_parser_template_id): Likewise.
1126 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1129 * class.c (check_bases_and_members): Warn with -Wuninitialized
1132 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1135 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1136 and make sure it is not a union.
1138 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1140 * semantics.c (finish_decltype_type): Initialize type.
1142 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1144 * semantics.c (finish_decltype_type): Handle calls to function
1145 pointers and references to functions properly.
1147 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1150 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1151 following a type-id is an error when in C++0x mode.
1153 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1156 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1158 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1161 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1163 2008-08-05 Jason Merrill <jason@redhat.com>
1166 * decl.c (build_ptrmemfunc_type): Don't require structural
1167 comparison of PMF types.
1168 * tree.c (cp_build_qualified_type_real): Don't clear
1169 a valid TYPE_PTRMEMFUNC_TYPE.
1170 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1173 2008-08-04 Jason Merrill <jason@redhat.com>
1176 * typeck2.c (check_narrowing): Allow narrowing conversion
1177 from an explicit floating-point constant.
1180 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1183 2008-08-04 Simon Baldwin <simonb@google.com>
1186 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1187 the declaration's id is followed by a semicolon.
1189 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1192 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1193 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1195 2008-07-31 Jason Merrill <jason@redhat.com>
1198 * init.c (build_new_1): Don't convert pointer to the data type
1199 until we're actually going to treat it as that type.
1202 * tree.c (build_aggr_init_expr): Split out...
1203 (build_cplus_new): ...from here.
1204 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1205 * init.c (build_new_1): new T() means value-initialization,
1206 not default-initialization.
1207 (build_vec_init): Likewise.
1208 (build_value_init_1): Use build_aggr_init_expr.
1210 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1213 * decl2.c (fix_temporary_vars_context_r): New function.
1214 (one_static_initialization_or_destruction): Make sure temporary
1215 variables part of the initialiser have their DECL_CONTEXT()
1218 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1221 * typeck.c (build_binary_op): Encapsulate code into
1224 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1227 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1228 TYPE_UID instead of pointers.
1230 2008-07-29 Jan Hubicka <jh@suse.cz>
1232 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1233 * decl.c (duplicate_decls): Likewise.
1234 (grokfndecl): Likewise.
1235 (start_method): Likewise.
1236 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1238 * pt.c (register_specialization, regenerate_decl_from_template):
1240 * decl2.c (grokfield): Likewise.
1242 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1245 * decl.c (duplicate_decls): Merge USED flags.
1247 2008-07-27 Jason Merrill <jason@redhat.com>
1250 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1252 2008-07-28 Richard Guenther <rguenther@suse.de>
1254 Merge from gimple-tuples-branch.
1256 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1258 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1261 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1263 * decl.c (finish_function): Call gimple_body after cp_genericize.
1265 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1267 * optimize.c: Include gimple.h instead of tree-gimple.h.
1268 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1269 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1272 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1274 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1276 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1278 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1280 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1282 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1284 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1285 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1286 (cxx_omp_clause_copy_ctor): Same.
1287 (cxx_omp_clause_assign_op): Same.
1289 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1291 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1292 (cp_gimplify_expr): Adjust caller.
1294 2008-05-11 Doug Kwan <dougkwan@google.com>
1296 * init.c (build_vec_delete): Add type conversion for argument
1297 0 of POINTER_PLUS_EXPR.
1299 2008-04-29 Doug Kwan <dougkwan@google.com>
1301 * decl2 (File): Include "gimple.h"
1302 (cp_write_global_declarations): Use gimple_body instead of
1304 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1306 2008-04-10 Diego Novillo <dnovillo@google.com>
1308 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1310 * optimize.c (maybe_clone_body): Re-enable call to
1312 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1313 code with call to gimple_unreachable.
1314 (cp_genericize): Fix handling of clone bodies.
1316 2008-04-04 Diego Novillo <dnovillo@google.com>
1318 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1320 * optimize.c (maybe_clone_body): Re-enable.
1322 2008-02-19 Diego Novillo <dnovillo@google.com>
1323 Oleg Ryjkov <olegr@google.com>
1325 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1327 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1328 argument to gimple_seq *. Update all users.
1329 (gimplify_must_not_throw_expr): Likewise.
1331 2008-02-04 Oleg Ryjkov <olegr@google.com>
1333 * except.c: Include gimple.h
1334 (cp_protect_cleanup_actions): Convert to tuples.
1335 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1337 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1339 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1340 instead of annotating each block manually.
1342 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1344 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1345 (gimplify_for_stmt): Same.
1346 (gimplify_switch_stmt): Same.
1347 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1349 [WHILE_STMT]: Return GS_OK.
1350 [SWITCH_STMT]: Same.
1351 [CONTINUE_STMT]: Same.
1353 (cp_genericize): Set gimple_body() of cloned functions when needed.
1355 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1357 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1358 (cp_gimplify_init_expr): Convert to tuples.
1359 (gimplify_must_not_throw_expr): Make function return a
1360 gimplify_status and convert to tuples.
1362 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1364 * cp-gimplify.c (genericize_try_block): Enable and do not call
1366 (genericize_catch_block): Same.
1367 (genericize_eh_spec_block): Same.
1368 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1369 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1371 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1373 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1374 * decl.c (finish_function): Use gimple_body instead of
1376 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1377 * cp-gimplify.c (genericize_try_block): Comment out.
1378 (genericize_catch_block): Same.
1379 (genericize_eh_spec_block): Same.
1380 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1381 (gimplify_for_stmt): Comment out.
1382 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1383 (cp_gimplify_omp_for): Same.
1384 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1385 Comment out call to gimplify_stmt and append_to_statement_list.
1386 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1387 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1388 (cp_gimplify_expr): Same.
1389 Comment out calls to genericize_*_block. Comment out call to
1392 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1395 * class.c (type_has_user_provided_default_constructor): Handle
1398 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1400 * decl.c (push_library_fn): Add a parameter for the exceptions that
1401 the function may throw.
1402 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1404 (build_library_fn): Change to static.
1405 * cp-tree.h: Adjust declarations.
1406 * except.c (declare_nothrow_library_fn): New.
1407 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1408 do_allocate_exception): Use the latter, adjust the declarations
1409 (ie, add empty exception-specification), consistently with the
1410 actual implementation in libsupc++.
1412 2008-07-25 Jan Hubicka <jh@suse.cz>
1414 * typeck.c (inline_conversion): Remove.
1415 (cp_build_function_call): Do not use inline_conversion.
1416 * decl.c (duplicate_decls): Do not insist on inline being declared
1418 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1419 from being output. We now remove static functions always.
1420 (finish_function): Do return warning on all static functions.
1421 * call.c (build_over_call): Do not use inline_conversion.
1422 * cp-tree.h (possibly_inlined_p): Declare.
1423 (inline_conversion): Remove.
1424 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1425 * decl2.c (cp_write_global_declarations): Likewise.
1426 (mark_used): Likewise.
1427 (possibly_inlined_p): New functions.
1429 2008-07-25 Jason Merrill <jason@redhat.com>
1431 * class.c (type_has_user_provided_default_constructor): Handle
1434 2008-07-23 Jan Hubicka <jh@suse.cz>
1436 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1437 (grogfndecl): Drop flag_inline_trees code.
1438 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1439 * lex.c (cxx_init): Do not set unit-at-a-time.
1441 2008-07-23 Jason Merrill <jason@redhat.com>
1443 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1444 trying to mangle a decl with no name.
1446 Implement defaulted/deleted functions as per N2346
1447 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1448 (DECL_DELETED_FN): New macro.
1449 (DECL_DEFAULTED_FN): New macro.
1450 * class.c (user_provided_p): New fn.
1451 (defaultable_fn_p): New fn.
1452 (type_has_user_provided_constructor): New fn.
1453 (type_has_user_provided_default_constructor): New fn.
1454 (check_methods): A defaulted fn is still trivial.
1455 (check_bases_and_members): Likewise.
1456 * decl.c (grok_special_member_properties): Likewise.
1457 (duplicate_decls): Complain about redeclaring a function as deleted.
1458 (start_decl): initialized==2 means deleted.
1459 (cp_finish_decl): Handle deleted/defaulted semantics.
1460 * decl2.c (grokfield): Likewise.
1461 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1462 Complain about using a deleted fn.
1463 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1464 (perform_member_init): Check for a user-provided default constructor
1465 even if TYPE_NEEDS_CONSTRUCTING.
1466 (build_new_1): Likewise.
1467 * call.c (build_over_call): Don't call mark_used twice.
1468 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1469 * search.c (check_final_overrider): Check for deleted mismatch.
1470 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1471 (cp_parser_pure_specifier): Handle =default and =delete.
1473 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1475 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1478 * typeck.c: All calls to pedwarn changed.
1479 * decl.c: All calls to pedwarn changed.
1480 * call.c: All calls to pedwarn changed.
1481 * error.c: All calls to pedwarn changed.
1482 * typeck2.c: All calls to pedwarn changed.
1483 * pt.c: All calls to pedwarn changed.
1484 * name-lookup.c: All calls to pedwarn changed.
1485 * parser.c: All calls to pedwarn changed.
1487 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1489 * call.c: Fix comment typos.
1490 * class.c: Likewise.
1491 * cp-tree.h: Likewise.
1492 * cxx-pretty-print.c: Likewise.
1495 * name-lookup.c: Likewise.
1496 * operators.def: Likewise.
1497 * parser.c: Likewise.
1500 * typeck.c: Likewise.
1502 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1506 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1507 copy constructors and copy assignment operators proper.
1509 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1511 * parser.c (cp_token): Remove in_system_header.
1512 (eof_token): Remove in_system_header.
1513 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1514 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1515 (cp_parser_member_declaration): Use in_system_header_at.
1516 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1517 (pop_tinst_level): Don't set in_system_header.
1518 (instantiate_class_template): Don't set in_system_header.
1519 (instantiate_decl): Don't set in_system_header.
1520 (instantiate_pending_templates): Don't set in_system_header.
1522 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1525 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1526 TYPE_NOTHROW_P, not TREE_NOTHROW.
1527 (trait_expr_value): Likewise.
1529 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1532 * call.c (convert_like_real): Don't take the error code path
1533 when a rvalue or base conversion has the bad_p field set.
1535 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1537 * rtti.c (emit_support_tinfos): Add char16_type_node and
1539 * typeck2.c (digest_init): Support char16_t and char32_t.
1541 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1543 * cvt.c (convert_to_void): Avoid C++ keywords.
1544 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1546 * friend.c (is_friend): Likewise.
1547 * init.c (perform_member_init): Likewise.
1548 * mangle.c (write_template_prefix, write_template_template_param):
1550 * name-lookup.c (do_namespace_alias, do_using_directive,
1551 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1552 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1553 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1555 * pt.c (is_specialization_of_friend, lookup_template_class,
1556 push_tinst_level, instantiate_class_template,
1557 tsubst_copy_and_build): Likewise.
1558 * tree.c (add_stmt_to_compound): Likewise.
1559 * typeck.c (finish_class_member_access_expr): Likewise.
1561 2008-07-17 Julian Brown <julian@codesourcery.com>
1562 Mark Mitchell <mark@codesourcery.com>
1564 * decl2.c (determine_visibility): Allow target to override
1565 visibility of class data.
1567 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1570 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1571 semantics to the current WP (N2691).
1573 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1576 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1577 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1578 complies with exception specification constraints.
1580 2008-07-14 Jason Merrill <jason@redhat.com>
1582 * lex.c (init_reswords): Always set D_OBJC.
1584 2008-07-11 Tom Tromey <tromey@redhat.com>
1585 Ian Lance Taylor <iant@google.com>
1587 * lex.c (struct resword, reswords): Don't define.
1588 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1589 (init_reswords): Clarify mask code. Use c_common_reswords rather
1592 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1595 * decl.c (grokdeclarator): Warn about initializing variables
1596 of storage class 'extern' only after the type of the declarator
1597 has been properly computed.
1599 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1602 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1603 carries the location of the primary type.
1604 * parser.c (cp_parser_check_type_definition): Update documentation.
1605 (cp_parser_check_for_definition_in_return_type,
1606 cp_parser_check_for_invalid_template_id,
1607 cp_parser_set_decl_spec_type,
1608 cp_parser_check_for_definition_in_return_type,
1609 cp_parser_diagnose_invalid_type_name,
1610 cp_parser_new_expression, cp_parser_explicit_instantiation,
1611 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1612 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1615 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1619 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1620 Add a location_t parameter so that
1621 error message can have a more accurate location.
1622 * cp-tree.h: Updated prototype
1623 * pt.c (tsubst_qualified_id): Use location in error messages.
1624 * parser.c (cp_parser_postfix_expression,
1625 cp_parser_objc_statement, cp_parser_trait_expr,
1626 cp_parser_token_is_class_key,
1627 cp_parser_uncommitted_to_tentative_parse_p,
1628 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1629 cp_parser_error, cp_parser_name_lookup_error,
1630 cp_parser_simulate_error, cp_parser_check_decl_spec,
1631 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1632 cp_parser_diagnose_invalid_type_name,
1633 cp_parser_parse_and_diagnose_invalid_type_name,
1634 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1635 cp_parser_string_literal, cp_parser_primary_expression,
1636 cp_parser_primary_expression, cp_parser_unqualified_id,
1637 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1638 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1639 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1640 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1641 cp_parser_jump_statement, cp_parser_block_declaration,
1642 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1643 cp_parser_function_specifier_opt, cp_parser_decltype,
1644 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1645 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1646 cp_parser_type_parameter, cp_parser_template_id,
1647 cp_parser_template_name, cp_parser_template_argument): Likewise.
1649 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1652 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1653 on function return type.
1655 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1658 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1659 on function return type in case of system header.
1661 2008-07-09 Raksit Ashok <raksit@google.com>
1663 * parser.c (cp_parser_postfix_expression): New warning based on flag
1664 warn_disallowed_functions.
1666 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1669 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1670 functions declared with a storage class qualifier.
1672 2008-07-03 Richard Guenther <rguenther@suse.de>
1675 * typeck.c (cp_build_function_call): Move code to verify
1676 builtin function arguments ...
1677 * call.c (build_cxx_call): ... here.
1679 2008-07-02 Jason Merrill <jason@redhat.com>
1681 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1683 Implement WG21 N2672, Initializer List proposed wording
1684 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1685 (struct lang_type_class): Add has_list_ctor bitfield.
1686 (TYPE_HAS_LIST_CTOR): New macro.
1687 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1688 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1689 (LOOKUP_NO_NARROWING): New macro.
1690 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1691 * parser.c (cp_parse_braced_list): Split out from...
1692 (cp_parser_initializer_clause): ...here.
1693 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1695 (cp_lexer_next_token_is_not_keyword): New fn.
1696 (cp_parser_parenthesized_expression_list): Handle { }.
1697 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1698 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1699 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1700 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1701 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1702 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1703 (cp_parser_save_member_function_body): Likewise.
1704 * call.c (conversion_kind): Add ck_list, ck_aggr.
1705 (struct conversion): Add check_narrowing bitfield, conversion list.
1706 (build_list_conv): New fn.
1707 (build_aggr_conv): New fn.
1708 (implicit_conversion): Call them.
1709 (standard_conversion): Set check_narrowing if appropriate.
1710 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1711 (build_user_type_conversion_1): When converting from an init list,
1712 we allow additional conversions except when calling a copy ctor.
1713 (convert_like_real): Calling an explicit ctor for an init list is
1714 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1715 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1716 class doesn't have a list ctor, break the {} into a TREE_LIST.
1717 (compare_ics): ck_list is better than other UDCs.
1718 (set_up_extended_ref_temp): Split out from initialize_reference.
1719 (is_std_init_list): New fn.
1720 (is_list_ctor): New fn.
1721 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1722 (reshape_init_array_1): Pass it to build_constructor.
1723 (reshape_init_class): Ditto.
1724 (initialize_artificial_var): Pass the appropriate type.
1725 (build_aggr_init_full_exprs): Split out from...
1726 (check_initializer): ...here. Handle new semantics.
1727 (build_init_list_var_init): New subroutine of check_initializer.
1728 (grokdeclarator): Converting constructors can have more than one parm.
1729 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1730 * init.c (expand_default_init): Only do digest_init for aggregates.
1731 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1732 build_constructor_from_list.
1733 (generic_initializer, ptr_initializer): Ditto.
1734 (ptm_initializer, class_initializer): Ditto.
1735 (get_pseudo_ti_init): Ditto.
1736 * error.c (dump_type): Handle init_list_type_node.
1737 (maybe_warn_cpp0x): New fn.
1738 (maybe_varn_variadic_templates): Call it.
1739 * cvt.c (ocp_convert): Handle conversion from { }.
1740 * tree.c (build_array_of_n_type): New fn.
1741 * typeck2.c (store_init_value): Use init_list_type_node.
1742 (digest_init): Likewise.
1743 (check_narrowing): New fn.
1744 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1745 of vector of constructor elts. Handle non-aggregate types. Make
1746 constant literals static.
1747 * pt.c: (tsubst_copy_and_build): Adjust.
1748 (unify): Handle { }.
1749 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1751 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1753 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1754 (comp_ptr_ttypes_const): Likewise.
1756 2008-07-01 Andrew Haley <aph@redhat.com>
1758 * decl.c (finish_constructor_body): Don't set the return value of
1759 the constructor if the constructor is that of a Java type.
1761 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1764 * decl2.c (is_late_template_attribute): If the first attribute
1765 argument is IDENTIFIER_NODE, don't consider it when checking
1766 if arguments are value or type dependent.
1768 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1771 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1774 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1776 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1778 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1781 * repo.c (repo_emit_p): Put const static data members initialized
1782 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1785 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1788 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1791 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1794 * typeck.c (cp_build_function_call): Show example syntax in
1797 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1799 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1800 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1801 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1802 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1803 pedwarn to permerror.
1804 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1805 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1806 * identify_goto, check_previous_goto_1, check_goto, define_label,
1807 check_tag_decl, start_decl, check_class_member_definition_namespace,
1808 grokfndecl, grokdeclarator): Likewise.
1809 * except.c (check_handlers): Likewise.
1810 * typeck2.c (digest_init): Likewise.
1811 * pt.c (check_specialization_namespace,
1812 check_explicit_instantiation_namespace,
1813 maybe_process_partial_specialization, check_explicit_specialization,
1814 convert_template_argument, do_decl_instantiation,
1815 do_type_instantiation, instantiate_decl): Likewise.
1816 * semantics.c (finish_template_type_parm): Likewise.
1817 * name-lookup.c (pushdecl_maybe_friend,
1818 check_for_out_of_scope_variable): Likewise.
1819 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1820 coerce_new_type): Likewise.
1821 * parser.c (cp_parser_nested_name_specifier_opt,
1822 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1823 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1824 (cp_parser_parameter_declaration): Check flag_permissive instead of
1825 flag_pedantic_errors.
1826 * call.c (joust): Change pedwarn to warning.
1827 * friend.c (make_friend_class): Likewise.
1829 2008-06-16 Jan Hubicka <jh@suse.cz>
1831 * method.c: Include cgraph.h.
1832 (use_thunk): Use cgraph_add_new_function instead of calling backend
1835 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1837 * parser.c: Fix comment typo.
1839 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1842 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1843 grokdeclarator and apply it to the created declaration.
1844 * cp-tree.h (grokbitfield): Update prototype.
1845 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1846 since they are now applied in grokbitfield. Adjusted the call to
1848 (cp_parser_objc_class_ivars): Likewise.
1850 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1853 * class.c (type_requires_array_cookie): Do not consider delete[]
1854 operators with an ellipsis as second argument.
1856 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1859 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1862 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1865 * pt.c (maybe_process_partial_specialization): Check the tree
1866 returned by push_template_decl for error_mark_node.
1867 * parser.c (cp_parser_class_head): Likewise, check the tree
1868 returned by the latter.
1870 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1873 * decl.c (grokdeclarator): In case of wrong return type return
1874 immediately error_mark_node.
1876 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1878 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1879 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1880 finish_omp_taskwait): New prototypes.
1881 (cxx_omp_clause_default_ctor): Add outer argument.
1882 (finish_omp_for): Add new clauses argument.
1883 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1884 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1885 (cxx_omp_clause_default_ctor): Add outer argument.
1886 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1887 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1888 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1889 Add par_clauses argument. If decl is present in parallel's
1890 lastprivate clause, change that clause to shared and add
1891 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1892 Fix wording of error messages. Adjust finish_omp_for caller.
1893 Add clauses argument. Parse loops with random access iterators.
1894 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1896 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1897 cp_parser_omp_for_loop callers.
1898 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1900 (cp_parser_omp_clause_name): Handle collapse and untied
1902 (cp_parser_omp_clause_schedule): Handle auto schedule.
1903 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1904 and PRAGMA_OMP_CLAUSE_UNTIED.
1905 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1906 (OMP_TASK_CLAUSE_MASK): Define.
1907 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1908 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1909 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1910 PRAGMA_OMP_TASKWAIT.
1911 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1912 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1913 (tsubst_omp_for_iterator): New function.
1914 (dependent_omp_for_p): New function.
1915 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1916 loops. Adjust finish_omp_for caller. Handle loops with random
1917 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1918 (tsubst_expr): Handle OMP_TASK.
1919 * semantics.c (cxx_omp_create_clause_info): New function.
1920 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1921 OMP_CLAUSE_COLLAPSE.
1922 (cxx_omp_predetermined_sharing): Removed.
1923 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1924 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1925 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1926 clauses argument. Fix check for type dependent cond or incr.
1927 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1928 fold_convert to convert incr amount to difference_type. Only
1929 fold if not in template. If decl is mentioned in lastprivate
1930 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1931 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1933 (finish_omp_threadprivate): Allow static class members of the
1935 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1936 finish_omp_taskwait): New functions.
1938 * parser.c (cp_parser_binary_expression): Add prec argument.
1939 (cp_parser_assignment_expression): Adjust caller.
1940 * cp-tree.h (outer_curly_brace_block): New prototype.
1941 * decl.c (outer_curly_brace_block): No longer static.
1943 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1946 * pt.c (push_template_decl_real): Consistently return error_mark_node
1949 2008-06-02 Tomas Bily <tbily@suse.cz>
1951 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1952 (cp_build_unary_op): Likewise.
1953 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1954 (maybe_warn_about_returning_address_of_local): Likewise.
1956 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1959 * pt.c (tsubst_initializer_list): Consistently check the tree
1960 returned by tsubst_pack_expansion for error_mark_node.
1962 2008-05-27 Michael Matz <matz@suse.de>
1965 * call.c (build_new_op): Make warning conditional on
1968 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1971 * call.c (convert_like_real): Convert bitfield to desired type
1972 before creating temporary.
1974 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1976 * Makefile.in: Adjusted dependencies on c-incpath.o.
1978 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1981 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1982 fold_build_cleanup_point_expr on build_call_a results.
1985 * semantics.c (omp_clause_info_fndecl): New function.
1986 (finish_omp_clauses): Use it.
1988 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1991 * cp-tree.h (check_array_initializer): New prototype.
1992 * decl.c (check_array_initializer): New function.
1993 (check_initializer): Call it.
1994 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1996 2008-05-21 Tom Tromey <tromey@redhat.com>
1998 * mangle.c (save_partially_mangled_name): Remove.
1999 (restore_partially_mangled_name): Likewise.
2000 (write_encoding): Update.
2001 (write_unqualified_name): Likewise.
2002 (start_mangling): Always use name_obstack. Remove 'ident_p'
2004 (get_identifier_nocopy): Remove.
2005 (finish_mangling_internal): Rename from finish_mangling.
2006 (finish_mangling): New function.
2007 (finish_mangling_get_identifier): Likewise.
2008 (partially_mangled_name, partially_mangled_name_len): Remove.
2009 (mangle_decl_string): Change return type. Update.
2010 (mangle_decl, mangle_type_string, mangle_special_for_type,
2011 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2012 mangle_ref_init_variable): Update.
2014 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2017 * semantics.c (begin_class_definition): Extend checks on the first
2020 2008-05-12 Tomas Bily <tbily@suse.cz>
2022 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2023 * call.c (build_over_call): Likewise.
2024 * error.c (dump_expr): Use CASE_CONVERT.
2025 * class.c (fixed_type_or_null): Likewise.
2027 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2029 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2031 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2034 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2036 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2037 DECL_LOOPING_CONST_OR_PURE_P attributes.
2038 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2041 2008-05-02 Simon Baldwin <simonb@google.com>
2044 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2046 2008-05-01 Simon Baldwin <simonb@google.com>
2048 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2050 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2053 * pt.c (more_specialized_fn): Stop the loop even if there are no
2054 arguments before ellipsis.
2056 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2059 * parser.c (cp_parser_lookup_name): Look through single function
2063 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2064 COMPOUND_EXPR if the second argument would be error_mark_node.
2066 2008-04-28 Jason Merrill <jason@redhat.com>
2067 Liu Guanwei <liu_gw@163.com>
2070 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2071 in default arguments.
2073 2008-04-25 Jan Hubicka <jh@suse.cz>
2075 * typeck.c (check_return_expr): Update.
2076 * decl.c (start_preparsed_function): Update.
2077 * method.c (use_thunk): Update.
2079 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2082 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2083 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2084 * decl2.c (is_late_template_attribute): Only make vector_size
2085 late tmpl attribute if argument is type or value dependent.
2086 (cp_reconstruct_complex_type): New function.
2088 2008-04-24 Richard Guenther <rguenther@suse.de>
2090 * typeck.c (cp_build_function_call): Call
2091 check_builtin_function_arguments.
2093 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2095 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2096 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2097 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2098 * class.c (build_base_path): Don't set TREE_INVARIANT.
2099 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2100 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2101 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2102 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2103 (generic_initializer): Don't set TREE_INVARIANT.
2104 (ptr_initializer): Don't set TREE_INVARIANT.
2105 (ptm_initializer): Don't set TREE_INVARIANT.
2106 (class_initializer): Don't set TREE_INVARIANT.
2107 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2108 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2109 (build_template_parm_index): Don't set TREE_INVARIANT.
2110 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2111 (process_template_parm): Don't set TREE_INVARIANT.
2113 2008-04-22 Jason Merrill <jason@redhat.com>
2116 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2117 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2118 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2120 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2123 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2124 expression is errorneous.
2126 2008-04-21 Jason Merrill <jason@redhat.com>
2129 * tree.c (cp_tree_equal): Handle FIXED_CST.
2132 * pt.c (template_template_parm_bindings_ok_p): Set
2133 processing_template_decl while in this function.
2135 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2137 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2138 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2139 char16_t and char32_t.
2140 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2141 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2142 extended builtin type "u8char{16,32}_t".
2143 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2145 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2146 (cp_parser_is_string_literal): Idem.
2147 (cp_parser_string_literal): Idem.
2148 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2150 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2151 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2152 * typeck.c (string_conv_p): Support char16_t and char32_t.
2154 2008-04-17 Jason Merrill <jason@redhat.com>
2157 * call.c (build_user_type_conversion_1): Represent second step of
2158 copy-init with an rvalue conversion.
2159 (convert_like_real) [ck_user]: Don't implicitly add it here.
2161 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2164 * decl.c (layout_var_decl): If extern or static var has variable
2165 size, set TREE_TYPE (decl) to error_mark_node.
2167 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2170 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2173 2008-04-09 Jason Merrill <jason@redhat.com>
2176 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2177 not a pushed variable.
2179 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2181 * call.c (build_op_delete_call): Fix quotation in warning message.
2182 * decl.c (grokdeclarator): Quote keyword in error message.
2183 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2186 * parser.c (cp_parser_check_type_definition): Print error string
2187 directly rather than using "%s".
2188 (cp_parser_postfix_expression): Fix quotation.
2189 (cp_parser_decltype): Likewise.
2190 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2192 * parser.c (cp_parser_non_integral_constant_expression): Build error
2193 message with CONCAT rather than using "%s".
2194 (cp_parser_primary_expression): Fix quotation.
2195 (cp_parser_postfix_expression): Likewise.
2196 (cp_parser_postfix_dot_deref_expression): Likewise.
2197 (cp_parser_unary_expression): Likewise.
2198 (cp_parser_new_expression): Likewise.
2199 (cp_parser_delete_expression): Likewise.
2201 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2202 as `)', not as `('. Fix quotation.
2203 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2204 (cp_parser_primary_expression): Likewise.
2205 (cp_parser_nested_name_specifier_opt): Likewise.
2206 (cp_parser_postfix_expression): Likewise.
2207 (cp_parser_postfix_open_square_expression): Likewise.
2208 (cp_parser_parenthesized_expression_list): Likewise.
2209 (cp_parser_pseudo_destructor_name): Likewise.
2210 (cp_parser_new_expression): Likewise.
2211 (cp_parser_direct_new_declarator): Likewise.
2212 (cp_parser_delete_expression): Likewise.
2213 (cp_parser_cast_expression): Likewise.
2214 (cp_parser_question_colon_clause): Likewise.
2215 (cp_parser_builtin_offsetof): Likewise.
2216 (cp_parser_trait_expr): Likewise.
2217 (cp_parser_label_for_labeled_statement): Likewise.
2218 (cp_parser_compound_statement): Likewise.
2219 (cp_parser_selection_statement): Likewise.
2220 (cp_parser_condition): Likewise.
2221 (cp_parser_iteration_statement): Likewise.
2222 (cp_parser_already_scoped_statement): Likewise.
2223 (cp_parser_simple_declaration): Likewise.
2224 (cp_parser_linkage_specification): Likewise.
2225 (cp_parser_static_assert): Likewise.
2226 (cp_parser_decltype): Likewise.
2227 (cp_parser_conversion_function_id): Likewise.
2228 (cp_parser_operator_function_id): Likewise.
2229 (cp_parser_operator): Likewise.
2230 (cp_parser_type_parameter): Likewise.
2231 (cp_parser_template_id): Likewise.
2232 (cp_parser_explicit_instantiation): Likewise.
2233 (cp_parser_explicit_specialization): Likewise.
2234 (cp_parser_enum_specifier): Likewise.
2235 (cp_parser_namespace_definition): Likewise.
2236 (cp_parser_namespace_alias_definition): Likewise.
2237 (cp_parser_using_declaration): Likewise.
2238 (cp_parser_using_directive): Likewise.
2239 (cp_parser_asm_definition): Likewise.
2240 (cp_parser_direct_declarator): Likewise.
2241 (cp_parser_ptr_operator): Likewise.
2242 (cp_parser_parameter_declaration_clause): Likewise.
2243 (cp_parser_initializer_clause): Likewise.
2244 (cp_parser_class_specifier): Likewise.
2245 (cp_parser_member_specification_opt): Likewise.
2246 (cp_parser_member_declaration): Likewise.
2247 (cp_parser_pure_specifier): Likewise.
2248 (cp_parser_constant_initializer): Likewise.
2249 (cp_parser_base_clause): Likewise.
2250 (cp_parser_exception_specification_opt): Likewise.
2251 (cp_parser_try_block): Likewise.
2252 (cp_parser_function_try_block): Likewise.
2253 (cp_parser_handler): Likewise.
2254 (cp_parser_throw_expression): Likewise.
2255 (cp_parser_asm_operand_list): Likewise.
2256 (cp_parser_attributes_opt): Likewise.
2257 (cp_parser_label_declaration): Likewise.
2258 (cp_parser_constructor_declarator_p): Likewise.
2259 (cp_parser_template_declaration_after_export): Likewise.
2260 (cp_parser_single_declaration): Likewise.
2261 (cp_parser_objc_message_expression): Likewise.
2262 (cp_parser_objc_message_args): Likewise.
2263 (cp_parser_objc_encode_expression): Likewise.
2264 (cp_parser_objc_defs_expression): Likewise.
2265 (cp_parser_objc_protocol_expression): Likewise.
2266 (cp_parser_objc_selector_expression): Likewise.
2267 (cp_parser_objc_protocol_refs_opt): Likewise.
2268 (cp_parser_objc_typename): Likewise.
2269 (cp_parser_objc_method_keyword_params): Likewise.
2270 (cp_parser_objc_superclass_or_category): Likewise.
2271 (cp_parser_objc_try_catch_finally_statement): Likewise.
2272 (cp_parser_objc_synchronized_statement): Likewise.
2273 (cp_parser_objc_throw_statement): Likewise.
2274 (cp_parser_omp_var_list_no_open): Likewise.
2275 (cp_parser_omp_clause_default): Likewise.
2276 (cp_parser_omp_clause_if): Likewise.
2277 (cp_parser_omp_clause_num_threads): Likewise.
2278 (cp_parser_omp_clause_reduction): Likewise.
2279 (cp_parser_omp_clause_schedule): Likewise.
2280 (cp_parser_omp_critical): Likewise.
2281 (cp_parser_omp_for_loop): Likewise.
2282 (cp_parser_omp_sections_scope): Likewise.
2284 * parser.c (cp_parser_template_parameter_list): Simplify.
2286 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2288 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2290 2008-04-07 Jason Merrill <jason@redhat.com>
2293 * class.c (type_has_user_nondefault_constructor): A template
2294 counts as a nondefault constructor.
2296 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2298 * decl.c (cxx_push_function_context): Delete.
2299 (cxx_pop_function_context): Delete.
2300 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2302 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2303 LANG_HOOKS_FUNCTION_FINAL): Delete.
2304 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2305 LANG_HOOKS_MISSING_NORETURN_OK_P.
2306 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2308 * semantics.c (current_stmt_tree): Fix comment.
2310 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2313 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2314 before calling fold_offsetof.
2316 2008-04-03 Tom Tromey <tromey@redhat.com>
2318 * Make-lang.in (c++_OBJS): New variable.
2320 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2322 * optimize.c (clone_body): New, from tree-inline.c.
2324 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2326 * method.c (synthesize_method): Use {push,pop}_function_context.
2327 * name-lookup.c (push_to_top_level): Likewise.
2328 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2330 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2333 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2336 2008-03-27 Tom Tromey <tromey@redhat.com>
2338 * Make-lang.in: Revert automatic dependency patch.
2340 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2343 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2344 (build_compound_expr): New, for compatibility with C
2345 build_compound_expr.
2346 (cp_build_compound_expr): Renamed from build_compound_expr.
2347 (build_c_cast): New, for compatibility with C build_c_cast.
2348 (cp_build_c_cast): Renamed from build_c_cast.
2349 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2350 * decl.c (cxx_maybe_build_cleanup): Ditto.
2351 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2352 (cp_build_compound_expr): Renamed from build_compound_expr.
2353 (build_c_cast): Add C-compatible prototype.
2354 (cp_build_c_cast): Renamed from build_c_cast.
2355 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2356 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2358 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2360 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2361 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2362 ending in a pack expansion, both of which can occur when
2363 substituting into a nested template.
2364 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2365 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2366 * parser.c (cp_parser_template_parameter): Deal with unnamed
2367 non-type template parameter packs identified by pack expansions in
2370 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2373 * pt.c (apply_late_template_attributes): Don't call tsubst on
2374 first attribute argument if it is IDENTIFIER_NODE.
2377 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2378 and LTGT_EXPR to pp_expression.
2380 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2382 * pt.c (coerce_template_template_parm): Moved the body of the loop
2383 of coerce_template_template_parms here, to make iteration over a
2384 template argument pack simpler.
2385 Also, allow matching of a template parameter pack in the template
2386 template parameter to a template parameter in the template
2388 (coerce_template_template_parms): Deal with variadic template
2389 template parameters. Use coerce_template_template_parm.
2390 (unify): Make sure we coerce the template template argument's
2391 template arguments to the template template parameter's template
2392 parameters, not the other way around.
2394 2008-03-25 Tom Tromey <tromey@redhat.com>
2396 * Make-lang.in: Remove .o targets.
2397 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2399 (c++_OBJS): New variable.
2400 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2402 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2404 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2405 (composite_pointer_type): Ditto.
2406 (common_type): Fix call to composite_pointer_type.
2407 (cxx_sizeof_nowarn): New; used to be a macro.
2408 (cxx_sizeof_expr): Add SFINAE support.
2409 (cxx_alignof_expr): Ditto.
2410 (decay_conversion): Fix calls for SFINAE support.
2411 (rationalize_conditional_expr): Add SFINAE support.
2412 (build_class_member_access_expr): Ditto.
2413 (finish_class_member_access_expr): Ditto.
2414 (build_x_indirect_ref): Ditto.
2415 (build_indirect_ref): Original version renamed to
2416 cp_build_indirect_ref; new version provides a bridge from
2418 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2420 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2421 (build_function_call): Original version renamed to
2422 cp_build_function_call; new version provides a bridge from
2424 (cp_build_function_call): Was build_function_call; added SFINAE
2426 (convert_arguments): Add SFINAE support.
2427 (build_x_binary_op): Ditto.
2428 (build_binary_op): Original version renamed to cp_build_binary_op;
2429 new version provides a bridge from c-common.
2430 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2431 (pointer_diff): Fix calls for SFINAE.
2432 (build_x_unary_op): Add SFINAE support.
2433 (condition_conversion): Fix calls for SFINAE.
2434 (build_unary_op): Original version renamed to cp_build_unary_op;
2435 new version provides a bridge from c-common.
2436 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2437 (unary_complex_lvalue): Fix calls for SFINAE.
2438 (build_x_conditional_expr): Add SFINAE support.
2439 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2440 (build_x_compound_expr): Add SFINAE support.
2441 (convert_ptrmem): Fix calls for SFINAE.
2442 (build_static_cast_1): Add SFINAE support.
2443 (build_static_cast): Ditto.
2444 (build_reinterpret_cast_1): Ditto.
2445 (build_reinterpret_cast): Ditto.
2446 (build_const_cast_1): Ditto.
2447 (build_const_cast): Ditto.
2448 (build_c_cast): Ditto.
2449 (build_modify_expr): Original version renamed to
2450 cp_build_modify_expr; new version provides a bridge from c-common.
2451 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2453 (build_x_modify_expr): Add SFINAE support.
2454 (build_ptrmemfunc): Fix calls for SFINAE.
2455 (convert_for_assignment): Add SFINAE support.
2456 (convert_for_initialization): Ditto.
2457 (check_return_expr): Fix calls for SFINAE.
2458 (lvalue_or_else): Add SFINAE support.
2459 * init.c (perform_member_init): Fix calls for SFINAE.
2460 (emit_mem_initializers): Ditto.
2461 (expand_virtual_init): Ditto.
2462 (expand_cleanup_for_base): Ditto.
2463 (build_aggr_init): Add SFINAE support.
2464 (expand_default_init): Ditto.
2465 (expand_aggr_init_1): Fix calls for SFINAE.
2466 (build_offset_ref): Ditto.
2467 (build_new_1): Add SFINAE support.
2469 (build_vec_delete_1): Fix calls for SFINAE.
2470 (get_temp_regvar): Ditto.
2471 (build_vec_init): Add SFINAE support.
2472 (build_dtor_call): Fix calls for SFINAE.
2473 (build_delete): Ditto.
2474 (push_base_cleanups): Ditto.
2475 (build_vec_delete_1): Ditto.
2476 * class.c (build_base_path): Fix calls for SFINAE.
2477 (build_simple_base_path): Ditto.
2478 (convert_to_base_statically): Ditto.
2479 (build_vfn_ref): Ditto.
2480 (resolve_address_of_overloaded_function): Ditto.
2481 * decl.c (check_initializer): Fix calls for SFINAE.
2482 (register_dtor_fn): Ditto.
2483 (compute_array_index_type): Ditto.
2484 (finish_enum): Ditto.
2485 (start_preparsed_function): Ditto.
2486 (cxx_maybe_build_cleanup): Ditto.
2487 * call.c (convert_like): Add COMPLAIN argument.
2488 (convert_like_with_context): Ditto.
2489 (build_this): Fix calls for SFINAE.
2490 (build_user_type_conversion): Ditto.
2491 (resolve_args): Ditto.
2492 (build_new_function_call): Add SFINAE support.
2493 (build_operator_new_call): Fix calls for SFINAE.
2494 (build_object_call): Add SFINAE support.
2495 (build_conditional_expr): Ditto.
2496 (build_new_op): Ditto.
2497 (build_op_delete_call): Fix calls for SFINAE.
2498 (build_temp): Ditto.
2499 (convert_like_real): Add SFINAE support.
2500 (build_x_va_arg): Fix calls for SFINAE.
2501 (convert_default_arg): Ditto.
2502 (build_over_call): Add SFINAE support.
2503 (build_java_interface_fn_ref): Fix calls for SFINAE.
2504 (build_special_member_call): Add SFINAE support.
2505 (build_new_method_call): Ditto.
2506 (perform_implicit_conversion): Ditto.
2507 (perform_direct_initialization_if_possible): Ditto.
2508 (initialize_reference): Fix calls for SFINAE.
2509 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2510 * rtti.c (build_headof): Fix calls for SFINAE.
2511 (get_tinfo_decl_dynamic): Ditto.
2512 (get_typeid): Ditto.
2513 (build_dynamic_cast_1): Add SFINAE support.
2514 (build_dynamic_cast): Ditto.
2515 (tinfo_base_init): Fix calls for SFINAE.
2516 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2517 (do_end_catch): Ditto.
2518 (initialize_handler_parm): Ditto.
2519 (expand_start_catch_block): Ditto.
2520 (do_allocate_exception): Ditto.
2521 (do_free_exception): Ditto.
2522 (build_throw): Ditto.
2523 * cvt.c (build_up_reference): Fix calls for SFINAE.
2524 (convert_to_reference): Ditto.
2525 (ocp_convert): Ditto.
2526 (convert_to_void): Add SFINAE support.
2527 * tree.c (build_dummy_object): Fix calls for SFINAE.
2528 (stabilize_expr): Ditto.
2529 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2531 (build_new_method_call): Ditto.
2532 (build_special_member_call): Ditto.
2533 (build_new_op): Ditto.
2534 (perform_implicit_conversion): Ditto.
2535 (perform_direct_initialization_if_possible): Ditto.
2536 (convert_to_void): Ditto.
2537 (build_aggr_init): Ditto.
2539 (build_vec_init): Ditto.
2540 (build_dynamic_cast): Ditto.
2541 (finish_call_expr): Ditto
2542 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2543 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2544 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2545 (finish_class_member_access_expr): Ditto.
2546 (build_x_indirect_ref): Ditto.
2547 (cp_build_indirect_ref): New.
2548 (cp_build_function_call): Add tsubst_flags_t parameter.
2549 (build_x_unary_op): Ditto.
2550 (cp_build_unary_op): New.
2551 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2552 (build_x_compound_expr): Ditto.
2553 (build_compound_expr): Ditto.
2554 (build_static_cast): Ditto.
2555 (build_reinterpret_cast): Ditto.
2556 (build_const_cast): Ditto.
2557 (build_c_cast): Ditto.
2558 (build_x_modify_expr): Ditto.
2559 (cp_build_modify_expr): New.
2560 (convert_for_initialization): Add tsubst_flags_t parameter.
2561 (cp_build_binary_op): Remove macro; add function declaration.
2562 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2563 (lvalue_or_else): Ditto.
2564 (build_functional_cast): Ditto.
2565 * typeck2.c (digest_init): Fix calls for SFINAE.
2566 (process_init_constructor_array): Ditto.
2567 (process_init_constructor_record): Ditto.
2568 (build_x_arrow): Ditto.
2569 (build_m_component_ref): Ditto.
2570 (build_functional_cast): Add SFINAE support.
2571 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2572 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2573 (finish_expr_stmt): Ditto.
2574 (finish_for_expr): Ditto.
2575 (finish_asm_stmt): Ditto.
2576 (finish_non_static_data_member): Ditto.
2577 (finish_qualified_id_expr): Ditto.
2578 (finish_call_expr): Add SFINAE support.
2579 (finish_increment_expr): Fix calls for SFINAE.
2580 (finish_unary_op_expr): Ditto.
2581 (simplify_aggr_init_expr): Ditto.
2582 (finish_omp_clauses): Ditto.
2583 (finish_omp_for): Ditto.
2584 (finish_omp_barrier): Ditto.
2585 (finish_omo_flush): Ditto.
2586 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2587 (build_anon_union_vars): Ditto.
2588 (get_guard_cond): Ditto.
2590 (one_static_initialization_or_destruction): Ditto.
2591 (do_static_initialization_or_destruction): Ditto.
2592 (generate_ctor_or_dtor_function): Ditto.
2593 (build_offset_ref_call_from_tree): Ditto.
2594 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2595 (cp_parser_postfix_dot_deref_expression): Ditto.
2596 (cp_parser_unary_expression): Ditto.
2597 (cp_parser_new_expression): Ditto.
2598 (cp_parser_cast_expression): Ditto.
2599 (cp_parser_binary_expression): Ditto.
2600 (cp_parser_question_colon_clause): Ditto.
2601 (cp_parser_assignment_expression): Ditto.
2602 (cp_parser_expression): Ditto.
2603 (cp_parser_builtin_offsetof): Ditto.
2604 (cp_parser_template_argument): Ditto.
2605 (cp_parser_functional_cast): Ditto.
2607 2008-03-24 Tom Tromey <tromey@redhat.com>
2609 * lex.c (handle_pragma_interface): Don't copy the filename.
2610 (handle_pragma_implementation): Copy filename using xstrdup.
2612 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2614 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2615 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2616 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2617 (PROMOTES_TO_AGGR_TYPE): Remove.
2618 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2619 * typeck.c (unary_complex_lvalue, build_modify_expr,
2620 convert_for_initialization): Adjust.
2621 * init.c (is_aggr_type): Remove.
2622 (is_class_type): Add.
2623 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2624 build_delete): Adjust.
2625 * lex.c (make_aggr_type): Remove.
2626 (make_class_type): Add.
2627 (cxx_make_type): Adjust.
2628 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2630 * decl.c (build_typename_type, make_typename_type,
2631 make_unbound_class_template, cxx_init_decl_processing,
2632 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2633 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2634 grok_op_properties, xref_tag, check_function_type): Adjust.
2635 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2636 add_builtin_candidate, add_builtin_candidates,
2637 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2638 is_subseq, compare_ics): Adjust.
2639 * method.c (use_thunk): Adjust.
2640 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2641 create_tinfo_types): Adjust.
2642 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2643 build_up_reference, convert_to_reference, convert_from_reference,
2644 ocp_convert, build_expr_type_conversion): Adjust.
2645 * tree.c (bind_template_template_parm, error_type): Adjust.
2646 * dump.c (cp_dump_tree): Adjust.
2647 * search.c (lookup_member): Adjust.
2648 * friend.c (make_friend_class, do_friend): Adjust.
2649 * typeck2.c (store_init_value, process_init_constructor_array,
2650 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2651 build_functional_cast): Adjust.
2652 * pt.c (finish_member_template_decl, process_template_parm,
2653 lookup_template_class, tsubst_function_type, tsubst,
2654 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2656 * semantics.c (begin_class_definition, finish_base_specifier,
2657 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2659 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2660 do_class_using_decl, lookup_qualified_name,
2661 maybe_process_template_type_declaration): Adjust.
2662 * decl2.c (grok_array_decl, check_member_template,
2663 constrain_class_visibility): Adjust.
2664 * parser.c (cp_parser_class_name): Adjust.
2666 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2668 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2670 2008-03-17 Jason Merrill <jason@redhat.com>
2673 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2674 a temp directly to a reference as per DR391.
2676 2008-03-12 Richard Guenther <rguenther@suse.de>
2680 2008-02-04 Richard Guenther <rguenther@suse.de>
2683 * decl.c (record_builtin_java_type): Make jboolean a
2684 integer type again where its mode doesn't match that of bool.
2686 2008-01-25 Richard Guenther <rguenther@suse.de>
2689 * decl.c (record_builtin_java_type): Make __java_boolean
2691 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2692 after TYPE_MAIN_VARIANT check.
2694 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2697 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2701 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2702 DECL_P in not a variable and appears more than once error messages.
2704 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2708 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2712 * typeck.c (structural_comptypes): Call cp_comptypes.
2713 (comptypes): New; called from the C/C++ common bits to perform
2715 (cp_comptypes): Renamed from comptypes, which is already used,
2716 with a different signature, by the C++ front end.
2717 (build_reinterpret_cast_1): Call cp_comptypes.
2718 (ptr_reasonably_similar): Ditto.
2719 * decl.c (decls_match): Ditto.
2720 * cvt.c (convert_to_reference): Ditto.
2721 * cp-tree.h (same_type_p): Ditto.
2722 (same_or_base_type_p): Ditto.
2723 (comptypes): Rename to cp_comptypes.
2724 * pt.c (canonical_type_parameter): Call cp_comptypes.
2726 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2728 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2729 test for equivalence between pointer and references.
2731 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2734 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2735 (check_field_decls): Likewise.
2736 (note_name_declared_in_class): Likewise.
2737 * call.c (build_new_op): Likewise.
2738 (convert_like_real): Likewise.
2739 (build_over_call): Likewise.
2740 * lex.c (unqualified_fn_lookup_error): Likewise.
2741 * parser.c (cp_parser_template_id): Likewise.
2742 * cvt.c (warn_ref_binding): Likewise.
2743 (convert_to_reference): Likewise.
2744 (ocp_convert): Likewise.
2745 (convert_to_void): Use error instead of pedwarn.
2746 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2747 * decl.c (compute_array_index_type): Use constant_expression_error.
2749 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2751 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2752 that auto is either a storage class or a simple type specifier,
2753 depending on the dialect.
2754 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2755 specifier in C++98 mode, error in C++0x mode (since we don't
2756 support auto as a type specifier, yet).
2757 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2758 storage specifier in C++0x mode.
2759 (cp_parser_simple_type_specifier): Parse `auto' as a
2760 simple-type-specifier, but error because we don't support it yet.
2762 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2764 * parser.c (cp_parser_nonclass_name): New.
2765 (cp_parser_pseudo_destructor_name): Use it instead of
2766 cp_parser_type_name.
2767 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2769 2008-02-29 Tom Tromey <tromey@redhat.com>
2771 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2772 (cp_lexer_get_preprocessor_token): Update.
2773 (cp_lexer_set_source_position_from_token): Don't call
2774 restore_input_file_stack.
2775 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2777 2008-02-28 Richard Guenther <rguenther@suse.de>
2780 2008-02-26 Richard Guenther <rguenther@suse.de>
2782 * decl.c (duplicate_decls): Remove decl from global mapping
2783 before ggc_freeing it.
2785 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2788 * rtti.c: Include c-pragma.h.
2789 (push_abi_namespace, pop_abi_namespace): New functions.
2790 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2791 create_tinfo_types, emit_support_tinfos): Use them.
2792 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2794 2008-02-26 Jason Merrill <jason@redhat.com>
2797 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2798 to name the struct for linkage purposes even if it has attributes.
2799 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2801 2008-02-26 Tom Tromey <tromey@redhat.com>
2803 * parser.c (eof_token): Remove old location code.
2804 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2805 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2807 (cp_write_global_declarations): Likewise.
2808 * lex.c (cxx_init): Remove old location code.
2809 (handle_pragma_implementation): Remove test of
2810 USE_MAPPED_LOCATION.
2811 * pt.c (tsubst): Remove old location code.
2812 * error.c (cp_print_error_function): Remove test of
2813 USE_MAPPED_LOCATION.
2814 * decl.c (pop_label): Remove old location code.
2815 (finish_function): Likewise.
2817 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2820 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2822 2008-02-26 Richard Guenther <rguenther@suse.de>
2824 * decl.c (duplicate_decls): Remove decl from global mapping
2825 before ggc_freeing it.
2827 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2830 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2832 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2834 * typeck.c (build_class_member_access_expr): Add appropriate
2835 OPT_W* parameter to warning.
2836 (build_reinterpret_cast_1): Likewise.
2837 * name-lookup.c (push_overloaded_decl): Likewise.
2839 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2842 * error.c (dump_expr): Handle CONJ_EXPR.
2844 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2847 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2848 (dump_expr): Handle FIXED_CST.
2850 2008-02-24 Jason Merrill <jason@redhat.com>
2852 * parser.c (cp_parser_declaration): Handle "inline namespace".
2853 (cp_parser_namespace_definition): Likewise.
2856 * name-lookup.c (arg_assoc_namespace): Look down into inline
2859 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2861 * typeck.c (check_for_casting_away_constness): Use 1 single
2862 argument, the type of cast, to decide what diagnostics generate.
2863 (build_static_cast_1): Remove unused code. Update call to
2864 check_for_casting_away_constness.
2865 (build_reinterpret_cast_1): Update call to
2866 check_for_casting_away_constness.
2867 (build_const_cast_1): Likewise.
2869 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2871 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2872 VEC_NEW_EXPR), forward to pp_expression.
2873 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2875 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2878 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2880 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2883 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2884 template decls' function decl.
2886 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2890 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2893 * pt.c (determine_specialization): In case of function templates,
2894 when the type of DECL does not match FN there is no match.
2896 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2899 * typeck.c (build_binary_op): Warn about floating point
2900 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2902 2008-02-19 Jason Merrill <jason@redhat.com>
2905 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2906 while we look for possible bindings.
2908 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2911 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2915 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2916 vars. Afterwards ensure v is VAR_DECL.
2919 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2920 call cp_finish_decl.
2921 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2924 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2929 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2930 is error_mark_node, return an error early.
2931 (find_parameter_packs_r): Pass the pointer set along to recursive
2932 calls of cp_walk_subtrees; don't try to manage the pointer set
2934 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2935 (make_pack_expansion): Ditto.
2936 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2937 a second pass through the tree with find_parameter_packs_r; that
2938 second pass no longer does anything.
2939 (push_template_decl_real): If we have an erroneous declaration,
2940 set its type to error_mark_node before returning an error.
2942 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2945 * pt.c (tsubst_initializer_list): Deal with the use of
2946 VOID_TYPE_NODE to indicate value-initialization of the bases.
2948 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2949 Jason Merrill <jason@redhat.com>
2953 * class.c (type_has_user_nondefault_constructor): New fn.
2954 * cp-tree.h: Declare it.
2955 * init.c (emit_mem_initializers): Use it for -W warning about
2956 missing base initializer.
2958 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2961 * pt.c (determine_specialization): In case of function templates,
2962 when the type of DECL does not match FN there is no match.
2964 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2965 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2968 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2969 are not identifier :: ~, return before calling cp_parser_type_name.
2971 2008-02-13 Jason Merrill <jason@redhat.com>
2973 PR c++/34962, c++/34937, c++/34939
2974 * decl2.c (is_late_template_attribute): Always defer attributes
2975 vector_size and weak.
2978 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2979 of enumerators, too.
2981 2008-02-12 Jason Merrill <jason@redhat.com>
2984 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2985 if we're doing conversions to call a user-defined conversion function.
2987 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2990 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2993 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2996 * init.c (build_new_1): Don't create placement_expr before
2997 constructing alloc_call. Verify that the pointer is passed by
2998 value to operator new.
3000 2008-02-11 Jason Merrill <jason@redhat.com>
3003 * pt.c (tsubst): Don't look up a template typedef in an explicit
3006 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3009 * tree.c (cp_build_qualified_type_real): When building a
3010 cv-qualified array type, build it as a unique type with
3011 build_cplus_array_type_1 and then adopt the unqualified type's
3014 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3017 * decl.c (groktypename): Check grokdeclarator return.
3019 2008-02-10 Jason Merrill <jason@redhat.com>
3022 * decl2.c (cp_write_global_declarations): Don't write out static
3023 data members with DECL_IN_AGGR_P set.
3025 2008-02-08 Jason Merrill <jason@redhat.com>
3028 * tree.c (build_target_expr_with_type): Handle void initializer.
3029 (bot_manip): Remap slot before recursing.
3031 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3034 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3036 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3039 * tree.c: Include tree-flow.h.
3040 (build_target_expr): Check type compatibility.
3041 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3042 * call.c (convert_like_real): Convert bitfield to expected type.
3044 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3048 * typeck.c (structural_comptypes): Call cp_comptypes.
3049 (comptypes): New; called from the C/C++ common bits to perform
3051 (cp_comptypes): Renamed from comptypes, which is already used,
3052 with a different signature, by the C++ front end.
3053 (build_reinterpret_cast_1): Call cp_comptypes.
3054 (ptr_reasonably_similar): Ditto.
3055 * decl.c (decls_match): Ditto.
3056 * cvt.c (convert_to_reference): Ditto.
3057 * cp-tree.h (same_type_p): Ditto.
3058 (same_or_base_type_p): Ditto.
3059 (comptypes): Rename to cp_comptypes.
3060 * pt.c (canonical_type_parameter): Call cp_comptypes.
3062 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3065 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3066 value dependent expression.
3068 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3071 * decl2.c (save_template_attributes): When we're modifying the
3072 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3073 all of the other variants to add those same attributes. Otherwise,
3074 the main variant will be inconsistent with those other variants.
3076 2008-02-04 Richard Guenther <rguenther@suse.de>
3079 * decl.c (record_builtin_java_type): Make jboolean a
3080 integer type again where its mode doesn't match that of bool.
3082 2008-02-02 Jason Merrill <jason@redhat.com>
3083 Mark Mitchell <mark@codesourcery.com>
3086 * init.c (build_value_init_1): New function.
3087 (build_value_init): New function.
3088 * typeck2.c (build_functional_cast): Call it.
3089 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3091 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3092 TYPE_HAS_CONSTRUCTOR.
3093 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3094 add_implicitly_declared_members): Adjust.
3095 (check_field_decls): Adjust. Remove warnings about reference/const
3096 in class without constructor.
3097 (check_bases_and_members): Adjust. Give those warnings here instead.
3098 * decl.c (fixup_anonymous_aggr): Adjust.
3099 (check_initializer): Adjust, clarify logic slightly.
3100 (grok_special_member_properties): Adjust, only set if user-provided.
3101 * rtti.c (create_tinfo_types): Don't set.
3102 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3103 Use same_type_ignoring_top_level_qualifiers_p.
3104 * pt.c (check_explicit_specialization): Adjust.
3105 (instantiate_class_template): Adjust.
3107 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3108 Jakub Jelinek <jakub@redhat.com>
3112 * typeck.c (structural_comptypes): Handle comparisons of
3113 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3115 * mangle.c (write_builtin_type): Map down to the canonical type,
3116 which will be one of the predefined type nodes.
3118 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3121 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3122 bits to allow for expansion of the number of middle end tree
3125 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3136 * typeck.c (check_return_expr): Tweak call to
3137 check_for_bare_parameter_packs.
3138 * class.c (add_method): Be careful with error_mark_nodes.
3139 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3141 * pt.c (struct find_parameter_pack_data): Remove
3143 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3144 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3145 (make_pack_expansion): Ditto.
3146 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3148 (process_template_parm): Tweak call to
3149 check_for_bare_parameter_packs.
3150 (push_template_decl_real): Tweak calls to
3151 check_for_bare_parameter_packs. If bare parameter packs are found
3152 in the list of exceptions, clear out that list after giving an
3154 * semantics.c (finish_cond): Tweak call to
3155 check_for_bare_parameter_packs.
3156 (finish_expr_stmt): Ditto.
3157 (finish_for_expr): Ditto.
3158 (finish_switch_cond): Ditto.
3159 (finish_mem_initializers): Ditto.
3160 (finish_member_declaration): Ditto.
3161 (finish_static_assert): Check for bare parameter packs in the
3163 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3164 attributes of a declaration.
3165 * parser.c (cp_parser_using_declaration): Tweak call to
3166 check_for_bare_parameter_packs.
3167 (cp_parser_base_clause): Ditto.
3169 2008-01-28 Jason Merrill <jason@redhat.com>
3172 * class.c (build_base_path): Fix !want_pointer case.
3174 2008-01-27 Jason Merrill <jason@redhat.com>
3177 * class.c (build_base_path): Fix previous change.
3179 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3182 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3185 2008-01-26 Richard Guenther <rguenther@suse.de>
3188 * typeck.c (build_binary_op): Remove code to shorten compares.
3190 2008-01-25 Richard Guenther <rguenther@suse.de>
3193 * decl.c (record_builtin_java_type): Make __java_boolean
3195 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3196 after TYPE_MAIN_VARIANT check.
3198 2008-01-25 Jason Merrill <jason@redhat.com>
3201 * class.c (build_base_path): Don't mess with virtual access if
3203 * call.c (standard_conversion): Don't check whether source type
3206 * decl2.c (is_late_template_attribute): Don't defer attribute
3207 visibility just because the type is dependent.
3209 2008-01-25 Jason Merrill <jason@redhat.com>
3210 Mark Mitchell <mark@codesourcery.com>
3213 * call.c (standard_conversion): Allow conversion from integer/real
3215 (compare_ics): Such a conversion is worse than a normal arithmetic
3218 2008-01-25 Richard Guenther <rguenther@suse.de>
3221 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3224 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3227 * pt.c (push_template_decl_real): Return error_mark_node in case
3228 of template definition of non-template.
3230 2008-01-24 Jason Merrill <jason@redhat.com>
3233 * decl2.c (is_late_template_attribute): Defer any attribute with
3234 dependent args. Also defer type attributes if the type is dependent.
3236 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3237 Alexandre Oliva <aoliva@redhat.com>
3240 * call.c (reference_binding): For bitfields use the declared bitfield
3242 (add_builtin_candidates): Likewise.
3243 * class.c (layout_class_type): For bitfields copy over the
3244 original type quals.
3246 2008-01-22 Jason Merrill <jason@redhat.com>
3249 * decl.c (groktypename): Also ignore attributes on dependent
3250 possibly-class types.
3253 * friend.c (do_friend): Check for prior declaration of a friend
3254 function of a local class.
3255 * name-lookup.c (lookup_name_innermost_nonclass_level):
3257 * name-lookup.h: Declare it.
3259 2008-01-22 Tom Tromey <tromey@redhat.com>
3262 * init.c (build_new_1): Only disallow Java aggregates.
3264 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3267 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3268 if decl or init is error_mark_node.
3271 * error.c (dump_expr): Handle VECTOR_CST.
3273 2008-01-21 Jason Merrill <jason@redhat.com>
3276 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3279 * pt.c (retrieve_local_specialization): Robustify.
3280 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3283 * pt.c (tsubst): Only call retrieve_local_specialization if the
3284 original typedef was in a function template.
3287 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3289 2008-01-21 Richard Guenther <rguenther@suse.de>
3292 * error.c (cp_print_error_function): Deal with recursive
3295 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3298 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3300 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3304 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3305 on non-IS_AGGR_TYPE scope.
3306 (constructor_name_p): Assert IS_AGGR_TYPE.
3308 2008-01-18 Ian Lance Taylor <iant@google.com>
3311 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3312 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3313 DECL_IS_OPERATOR_NEW flag.
3315 2008-01-16 Richard Guenther <rguenther@suse.de>
3318 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3319 for conversions to type variants.
3321 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3323 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3324 declaration and code. Update copyright year.
3326 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3329 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3330 know we have a class type.
3332 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3335 * pt.c (coerce_template_parameter_pack): When substituting into
3336 the type of a non-type template parameter pack. use the
3337 deduced/substituted arguments.
3338 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3339 can be a parameter pack with the ellipsis following it. When we
3340 have an erroneous declaration, allow it to be a parameter pack.
3341 (cp_parser_template_parameter): Complain about default
3342 arguments on non-type template parameter packs, and parse them
3343 using the new cp_parser_default_argument.
3344 (cp_parser_parameter_declaration): Complain about parameter packs
3345 with default arguments. Move parsing of default arguments into a
3346 new function, cp_parser_default_argument.
3347 (cp_parser_default_argument): New; extracted from
3348 cp_parser_parameter_declaration.
3350 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3356 * typeck.c (check_return_expr): If there are bare parameter packs
3357 in the return value, set it to error_mark_node.
3358 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3359 * pt.c (find_parameter_packs_r): Look at the type of
3360 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3361 (check_for_bare_parameter_packs): Flip the result: now returns
3362 TRUE when there were bare parameter packs, FALSE otherwise.
3363 (push_template_decl_real): Deal with flipped result of
3364 check_for_bare_parameter_packs.
3365 * semantics.c (finish_cond): If there are bare parameter packs in
3366 the conditional, set it to error_mark_node.
3367 (finish_expr_stmt): If there are bare parameter packs in the
3368 expression, set it to error_mark_node.
3369 (finish_for_expr): Ditto.
3370 (finish_switch_cond): If there are bare parameter packs in
3371 the conditional, set it to error_mark_node.
3372 (finish_mem_initializers): If there are bare parameter packs in
3373 the member initializer, set it to error_mark_node.
3374 (finish_member_declaration): Check the attributes of the
3375 declaration for bare parameter packs, and remove the attributes if
3376 any have bare parameter packs.
3377 * parser.c (cp_parser_using_declaration): Check the using
3378 declaration for bare parameter packs.
3379 (cp_parser_base_clause): If there are bare parameter packs in a
3380 base specifier, don't add it to the chain.
3382 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3385 * error.c (dump_simple_decl): Display ellipsis for template
3386 non-type parameter packs.
3387 (dump_decl): Display ellipsis for template type parameter packs.
3388 (dump_template_decl): Display ellipsis for template template
3390 * pt.c (redeclare_class_template): When redeclaring a class
3391 template, check for collisions between template parameters and
3392 template parameter packs.
3394 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3397 * pt.c (process_partial_specialization): Don't mark template
3398 parameters that occur in non-deduced contexts.
3399 (struct pair_fn_data): Add include_nondeduced_p.
3400 (for_each_template_parm_r): Only visit non-deduced contexts if
3401 include_nondeduced_p is set.
3402 (for_each_template_parm): Added parameter include_nondeduced_p,
3403 which states whether template parameters found in non-deduced
3404 contexts should be visited.
3405 (uses_template_parms): Visit all template parameters, even those
3406 in non-deduced contexts.
3408 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3411 * pt.c (check_default_tmpl_args): Check for parameter packs that
3412 aren't at the end of a primary template.
3413 (push_template_decl_real): Remove check for parameter packs that
3414 aren't at the end of a primary template; that now happens in
3415 check_default_tmpl_args.
3416 * semantics.c (finish_template_template_parm): Use
3417 check_default_tmpl_args to check for errors in the template
3420 2008-01-12 Doug Kwan <dougkwan@google.com>
3422 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3423 instead of OPT_Wreturn_type in warning due to ignored return type
3425 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3426 instead of OPT_Wreturn_type in warning due to ignored return type
3429 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3432 * semantics.c (finish_omp_for): Don't call
3433 fold_build_cleanup_point_expr if processing_template_decl.
3435 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3436 Jakub Jelinek <jakub@redhat.com>
3439 * error.c (dump_template_argument): Deal with TREE_LIST.
3441 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3443 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3444 long" in C++0x mode; change the warning to note that "long long"
3445 is only unsupported in C++98 mode.
3447 2007-12-20 Jason Merrill <jason@redhat.com>
3450 * call.c (standard_conversion): Derived-to-base is considered a
3451 standard conversion.
3453 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3456 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3457 call cp_parser_statement rather than
3458 cp_parser_already_scoped_statement.
3460 2007-12-18 Jason Merrill <jason@redhat.com>
3463 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3465 (dependent_type_p_r): Handle the domain of an array.
3467 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3468 Jakub Jelinek <jakub@redhat.com>
3473 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3474 bindings of template template parameters after all template
3475 arguments have been deduced.
3476 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3478 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3479 (unify): Deal with variadic, bound template template parameters.
3480 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3482 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3485 * decl.c (grokdeclarator): Reject friend sfk_constructor
3488 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3491 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3494 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3497 * cp-lang.c (cp_classify_record): New.
3498 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3500 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3503 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3506 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3507 dynamic_cast in a template.
3509 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3512 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3513 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3515 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3518 * error.c (dump_type_prefix, dump_type_suffix): Handle
3519 TYPE_PACK_EXPANSION.
3522 * error.c (dump_expr): Handle ABS_EXPR.
3524 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3528 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3529 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3530 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3531 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3532 flag_use_repository and repo_emit_p returned 2.
3534 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3537 * tree.c (stabilize_call, stabilize_init): Do nothing if
3538 processing_template_decl.
3540 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3543 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3544 error instead of assertion failure.
3545 * parser.c (cp_parser_decltype): If closing paren is not found,
3546 return error_mark_node.
3548 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3551 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3553 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3554 since arg_assoc_template_arg will deal with them (better).
3556 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3559 * pt.c (tsubst_exception_specification): Handle substitutions into
3560 member templates, where tsubst_pack_expansion returns a
3561 TYPE_PACK_EXPANSION.
3563 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3566 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3567 bindings for the template parameter pack, don't try to keep the
3568 empty deduced arguments.
3569 (unify): If a parameter is a template-id whose template argument
3570 list contains a pack expansion that is not at the end, then we
3571 cannot unify against that template-id.
3573 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3576 * pt.c (current_template_args): Use error_operand_p.
3578 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3581 * error.c (dump_decl): Handle TREE_BINFO.
3583 2007-12-01 Ollie Wild <aaw@google.com>
3586 * typeck.c (build_binary_op): Add conversion of pointers to function
3587 members appearing as operands to the equality operators.
3589 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3592 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3594 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3597 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3599 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3604 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3606 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3609 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3611 PR tree-optimization/34181
3612 * method.c (use_thunk): Don't inline the call in the thunk.
3615 * tree.c (decl_linkage): Static data members and static member
3616 functions in anonymous ns classes are lk_external.
3618 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3621 * decl.c (start_preparsed_function): Pass
3622 processing_template_decl for the new allocate_struct_function
3625 2007-11-25 Richard Guenther <rguenther@suse.de>
3627 * decl.c (poplevel): Use BLOCK_CHAIN.
3629 2007-11-24 Ollie Wild <aaw@google.com>
3631 * typeck.c (delta_from_ptrmemfunc): New function.
3632 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3633 (build_binary_op): Call delta_from_ptrmemfunc.
3635 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3639 * decl.c (cp_finish_decl): Disallow variable or field
3640 definitions if extern "Java" aggregates.
3641 (grokparms): Disallow parameters with extern "Java"
3643 (check_function_type): Disallow function return values
3644 with extern "Java" aggregates.
3645 * init.c (build_new_1): Disallow placement new with
3646 extern "Java" aggregates.
3648 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3649 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3652 * call.c (convert_like_real): Build a zero constant when __null is
3653 converted to an integer type.
3655 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3658 * decl2.c (cp_write_global_declarations): Issue error about static
3659 data members in anonymous namespace which are declared and used,
3662 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3665 * parser.c (cp_parser_class_head): Reject function template ids.
3668 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3669 when processing_template_decl to build_array_type.
3672 * pt.c (more_specialized_fn): Don't segfault if one or
3673 both argument list end with ellipsis.
3675 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3678 * semantics.c (finish_call_expr): Set
3679 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3680 or OVERLOAD with all noreturn functions.
3682 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3685 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3688 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3695 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3696 set to error_mark_node the outermost POINTER_TYPE to the pack if
3697 it is seen in a POINTER_TYPE.
3698 (push_template_decl_real): If check_for_bare_parameter_packs
3699 fails for function return type, set the return type to
3700 integer_type_node. If check_for_bare_parameter_packs failed
3701 for non-function, return error_mark_node.
3704 * call.c (build_new_op): Call resolve_args before calling
3707 2007-11-11 Tom Tromey <tromey@redhat.com>
3710 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3712 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3715 * pt.c (redeclare_class_template): Update error message. Use a
3716 note to show the previous declaration.
3717 (tsubst_friend_class): Use the location of the friend template as
3718 the input location before calling redeclare_class_template.
3720 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3723 * semantics.c (finish_pseudo_destructor_expr): Handle
3724 object == error_mark_node.
3726 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3729 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3730 is not scalar type, let finish_class_member_access_expr handle
3731 diagnostics. Pass BIT_NOT_EXPR argument to
3732 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3734 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3737 * decl.c (cp_complete_array_type): If any of the initializer
3738 elements are pack expansions, don't compute the array size yet.
3740 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3743 * tree.c (decl_linkage): Fields have no linkage.
3745 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3747 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3749 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3754 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3755 Be careful with ERROR_MARK_NODEs.
3756 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3759 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3762 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3765 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3769 * tree.c (c_build_qualified_type): Define bridge to
3770 cp_build_qualified_type.
3772 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3783 * typeck.c (check_return_expr): Pass address of retval to
3784 check_for_bare_parameter_packs.
3785 * class.c (build_base_field): Tolerate bases that have no layout
3787 (end_of_base): Ditto.
3788 * tree.c (canonical_type_variant): Be careful with
3790 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3792 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3793 which states whether parameter packs should be replaced with
3795 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3796 possible. If set_packs_to_error is set true, replace the parameter
3797 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3798 (uses_parameter_packs): Don't set parameter packs to
3800 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3801 which may be modified (if it is a parameter pack). Instructs
3802 find_parameter_packs_r to replace parameter packs with
3803 ERROR_MARK_NODE (so that they won't cause errors later on).
3804 (process_template_parm): Pass pointer to
3805 check_for_bare_parameter_packs.
3806 (process_partial_specialization): Replace pack expansions before
3807 the end of the template argument list with ERROR_MARK_NODE.
3808 (push_template_decl_real): Pass pointer to
3809 check_for_bare_parameter_packs. Replace parameter packs not at the
3810 end of the template parameter list with ERROR_MARK_NODE.
3811 (convert_template_argument): Be more careful about using DECL_NAME
3812 on only declarations.
3813 (unify): Can't unify against ERROR_MARK_NODE.
3814 * semantics.c (finish_cond): Pass pointer to
3815 check_for_bare_parameter_packs.
3816 (finish_expr_stmt): Ditto.
3817 (finish_for_expr): Ditto.
3818 (finish_switch_cond): Pass pointer to
3819 check_for_bare_parameter_packs, and call it before we put the
3820 condition into the statement.
3821 (finish_mem_initializers): Pass pointer to
3822 check_for_bare_parameter_packs.
3823 (finish_member_declaration): Ditto.
3824 * parser.c (cp_parser_base_clause): Ditto.
3826 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3829 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3830 with the final TREE_READONLY flag in place. processing_template_decl
3831 is known to be 0 in this part of function.
3834 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3835 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3836 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3837 * semantics.c (finish_omp_atomic): Revert most of the
3838 2007-02-05 changes, just keep the new representation of
3839 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3841 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3844 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3847 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3852 * typeck.c (merge_types): Don't lose rvalue references when
3854 * call.c (build_over_call): Don't elide move constructors just
3855 because the copy constructor is trivial (!).
3856 (compare_ics): If comparing cv-qualifiers fails, we can still order
3857 based on binding lvalues vs. rvalues.
3859 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3862 * pt.c (unify_pack_expansion): bring handling of function call
3863 arguments into line with type_unification_real.
3865 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3867 * typeck.c (build_binary_op): Use pedwarn instead of error for
3870 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3873 * parser.c (cp_parser_unary_expression): For &&label call
3874 cp_parser_non_integral_constant_expression and return error_mark_node
3875 if it returned true.
3878 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3879 is neither FUNCTION_TYPE nor METHOD_TYPE.
3881 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3884 * parser.c (cp_parser_nested_name_specifier_opt): Use
3885 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3886 typedef of currently open class.
3888 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3891 * error.c (dump_expr): Deal specially with statements.
3893 2007-11-01 Jason Merrill <jason@redhat.com>
3896 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3898 (lookup_template_class): Use it to get the outer template args
3899 for instantiating one.
3902 * pt.c (reduce_template_parm_level): tsubst the parameters
3903 of a template template parm.
3905 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3908 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3910 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3913 * parser.c (cp_parser_postfix_dot_deref_expression): If
3914 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3915 first and if that succeeds and type is SCALAR_TYPE_P, create
3919 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3920 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3921 as for std::type_info.
3923 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3926 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3927 pp_cxx_delete_expression): Change to static linkage.
3928 * cxx-pretty-print.h: Adjust declarations.
3929 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3930 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3931 MODOP_EXPR): Forward to pp_expression.
3933 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3936 2007-10-31 Christian Bruel <christian.bruel@st.com>
3937 Mark Mitchell <mark@codesourcery.com>
3940 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3941 if retval is volatile.
3943 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3946 * decl2.c (build_offset_ref_call_from_tree): Call
3947 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3948 if FN is DOTSTAR_EXPR.
3950 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3954 * pt.c (find_parameter_packs_r): Fix typo in comment.
3955 (convert_template_argument): Look at the pattern of a pack
3956 expansion to determine what kind of entity we're converting.
3957 (coerce_template_parameter_pack): When we have coerced a non-type
3958 template parameter pack, substitute into the type of that pack.
3959 (tsubst_pack_expansion): When our substitution of a parameter pack
3960 is a "trivial" substitution of itself, just substitute into the
3961 pack expansion rather than actually expanding.
3963 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3966 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3967 for non-integral type bitfields. Return true if bitfield is correct, false
3968 error has been diagnosed.
3969 (check_field_decls): If check_bitfield_decl returned false, call also
3972 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3973 Mark Mitchell <mark@codesourcery.com>
3976 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3977 class member error out and return.
3979 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3981 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3982 to current_function_decl rather than 0.
3985 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3987 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3989 2007-10-27 Jason Merrill <jason@redhat.com>
3992 * call.c (convert_default_arg): Detect recursion.
3994 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3997 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3998 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4000 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4002 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4004 2007-10-26 Jason Merrill <jason@redhat.com>
4007 * pt.c (get_template_info): New fn.
4008 (template_class_depth): Use it.
4009 (push_template_decl_real): Check that the template args of the
4010 definition match the args of the previous declaration.
4012 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4015 * decl2.c (coerce_new_type): Do not allow a default argument for
4016 the first parameter.
4018 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4021 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4022 don't see the leading '('. Only lookup names if we get an
4025 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4028 * parser.c (cp_parser_parenthesized_expression_list): Set
4029 greater_than_is_operator_p to true in between the parens.
4031 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4034 * decl.c (grokdeclarator): In case of conflicting specifiers
4035 just return error_mark_node.
4037 2007-10-26 Ollie Wild <aaw@google.com>
4039 * expr.c (cxx_expand_expr): Removed.
4040 * cp-tree.h (exx_expand_expr): Removed.
4041 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4044 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4047 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4049 2007-10-23 Jason Merrill <jason@redhat.com>
4051 PR c++/25950 (DR 391)
4052 * call.c (struct conversion): Remove check_copy_constructor_p.
4053 (reference_binding): Always bind a reference directly to a
4054 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4056 (check_constructor_callable): Remove.
4057 (convert_like_real): Don't call it.
4058 (initialize_reference): Don't call check_constructor_callable.
4059 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4060 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4061 conversions if LOOKUP_NO_TEMP_BIND.
4062 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4063 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4065 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4067 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4070 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4071 before checking if its type is integral.
4073 2007-10-22 Jason Merrill <jason@redhat.com>
4076 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4077 * pt.c (apply_late_template_attributes): Splice out dependent
4078 attributes from DECL_ATTRIBUTES.
4080 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4082 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4084 * typeck.c (build_binary_op) : Use appropriate warning option
4085 instead of unnamed warning.
4087 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4090 * pt.c (current_template_args): Do not change TREE_LIST elements
4091 with a TREE_VALUE of error_mark_node.
4093 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4095 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4096 * decl.c (start_decl): Tidy.
4097 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4099 (grokdeclarator): Clarify comment.
4101 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4104 * decl.c (grokfndecl): Return NULL after the "definition of
4105 implicitly-declared" error happened.
4107 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4110 * call.c (build_user_type_conversion_1): Do not consider conversion
4111 functions to convert a (possibly cv-qualified) object to the (possibly
4112 cv-qualified) same object type (or a reference to it), to a (possibly
4113 cv-qualified) base class of that type (or a reference to it).
4115 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4117 * pt.c (tsubst): Use template_parm_level_and_index.
4119 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4122 * parser.c (cp_parser_compound_statement): Handle label-declarations
4123 at the beginning of the compound statement.
4124 (cp_parser_block_declaration): Issue diagnostics about __label__
4125 not at the beginning of a block.
4127 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4130 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4131 to convert_template_argument.
4132 (coerce_template_parms): Return error_mark_node after fixed-length
4134 (tsubst_decl): Check for error_mark_node the return value of the
4135 first tsubst in 'case VAR_DECL'.
4137 2007-10-08 Ollie Wild <aaw@google.com>
4139 * typeck2.c (digest_init): Call cplus_expand_constant after
4140 convert_for_initialization.
4141 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4142 * expr.c (cplus_expand_constant): Updated function description.
4144 2007-10-04 Jason Merrill <jason@redhat.com>
4147 * call.c (initialize_reference): Handle local static reference
4150 2007-10-03 Jason Merrill <jason@redhat.com>
4153 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4154 (push_namespace): Here.
4155 (handle_namespace_attrs): New fn for the attr code.
4156 (leave_scope): Don't pop_visibility.
4157 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4158 * parser.c (cp_parser_namespace_definition): Call
4159 handle_namespace_attrs and pop_visibility as appropriate.
4162 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4164 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4166 * decl.c (duplicate_decls): Preserve linkage flags for mere
4167 redeclarations of gnu_inline definitions.
4169 2007-10-03 Jason Merrill <jason@redhat.com>
4172 * decl.c (wrap_cleanups_r): New fn.
4173 (wrap_temporary_cleanups): New fn.
4174 (initialize_local_var): Call it.
4176 2007-09-29 Jason Merrill <jason@redhat.com>
4179 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4180 constant to not have DECL_EXTERNAL if it's file-local.
4182 2007-09-28 Ollie Wild <aaw@google.com>
4185 2007-09-27 Ollie Wild <aaw@google.com>
4187 * typeck2.c (digest_init): Call cplus_expand_constant after
4188 convert_for_initialization.
4189 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4190 * expr.c (cplus_expand_constant): Updated function description.
4192 2007-09-28 Jason Merrill <jason@redhat.com>
4195 * class.c (layout_empty_base): Take rli parameter, update
4196 rli->record_align if empty base has user-specified alignment.
4197 (build_base_field): Pass rli to it.
4199 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4202 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4204 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4207 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4208 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4209 (dump_parameters): Just call dump_type for argument packs too.
4211 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4214 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4215 qualification by creating qualified PACK_EXPANSION_PATTERN and
4216 then calling make_pack_expansion on it.
4218 2007-09-27 Ollie Wild <aaw@google.com>
4220 * typeck2.c (digest_init): Call cplus_expand_constant after
4221 convert_for_initialization.
4222 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4223 * expr.c (cplus_expand_constant): Updated function description.
4225 2007-09-27 Jason Merrill <jason@redhat.com>
4228 * decl2.c (is_late_template_attribute): Don't crash on unknown
4231 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4234 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4235 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4236 spaces in the formatting.
4237 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4239 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4241 * error.c (cxx_print_error_function): Add third argument, pass
4242 it over to lhd_print_error_function.
4243 (cp_print_error_function): If diagnostic->abstract_origin, print
4245 * cp-tree.h (struct diagnostic_info): New forward decl.
4246 (cxx_print_error_function): Add third argument.
4248 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4251 * name-lookup.c (pushtag): Do not create an implicit typedef before
4252 the associated type declaration is known to be valid.
4254 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4256 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4257 rather than pointers.
4259 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4262 * search.c (check_final_overrider): Fail if
4263 targetm.comp_type_attributes returns 0.
4265 2007-09-24 Jason Merrill <jason@redhat.com>
4268 * pt.c (resolve_typename_type): Don't look things up in the original
4269 template if it would mean losing template arguments.
4271 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4274 * cp-tree.h (cxx_type_hash_eq): New prototype.
4275 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4276 * tree.c (cxx_type_hash_eq): New function.
4278 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4281 * tree.c (cp_build_qualified_type_real): Build a canonical
4282 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4284 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4288 * tree.c (cplus_array_compare): Compare pointers, not types.
4289 (build_cplus_array_type_1): Store new array type into the hash
4290 table before building the canonical type; build the canonical type
4292 (cp_build_qualified_type_real): Put all of the array types with
4293 cv-qualified element types into the C++ array hash table, built as
4294 variants of the unqualified versions.
4296 2007-09-23 Jason Merrill <jason@redhat.com>
4299 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4300 for deprecation warnings.
4302 2007-09-22 Jason Merrill <jason@redhat.com>
4305 * call.c (build_over_call): Warn about deprecated virtuals.
4308 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4309 (MAYBE_TAGGED_TYPE_P): Remove.
4310 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4311 instead of calling is_late_template_attribute again.
4312 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4313 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4314 Don't crash on typedefs from non-template classes.
4315 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4316 (is_late_template_attribute): All attributes applied to template
4317 parms or typename types are dependent. Static.
4318 (splice_template_attributes): Pass decl through.
4319 (save_template_attributes): Likewise.
4321 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4324 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4325 returned from tsubst_pack_expansion.
4326 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4327 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4329 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4332 * semantics.c (finish_id_expression): Use consistently
4333 context_for_name_lookup.
4334 * decl.c (fixup_anonymous_aggr): Fix error message for
4335 anonymous struct (vs union).
4337 2007-09-19 Jason Merrill <jason@redhat.com>
4340 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4341 (retrieve_specialization): Only tagged types use
4342 DECL_TEMPLATE_INSTANTIATIONS.
4343 (instantiate_class_template): Push nested classes too.
4344 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4346 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4347 * init.c (is_aggr_type): Remove redundant tests.
4348 * class.c (push_nested_class): Use CLASS_TYPE_P.
4350 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4353 * init.c (build_zero_init): If, recursively, build_zero_init
4354 returns a NULL_TREE, do not append it to the VEC of constructors.
4356 2007-09-18 Jason Merrill <jason@redhat.com>
4359 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4360 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4361 ATTR_FLAG_TYPE_IN_PLACE.
4362 (tsubst): Do unqualified lookup to find typedefs from current class.
4363 [ARRAY_TYPE]: Propagate alignment info.
4364 * decl2.c (is_late_template_attribute): Only defer handling of
4365 attribute aligned if the expression is dependent.
4366 (save_template_attributes): If we're deferring any attributes,
4367 make this a naming typedef.
4369 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4371 PR c++/33462 (again)
4372 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4373 va_arg instead of __builtin_va_arg.
4375 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4378 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4379 (pp_cxx_primary_expression): Use it.
4380 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4381 * error.c (dump_expr): Use it.
4383 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4386 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4387 out case TYPEID_EXPR to...
4388 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4389 and pp_cxx_right_paren.
4390 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4391 * error.c (dump_expr): Use it.
4393 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4396 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4397 (pp_cxx_primary_expression): Use it.
4398 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4399 * error.c (dump_expr): Use it.
4401 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4404 * init.c (build_new): Remove warning for zero-element
4407 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4410 * call.c (maybe_handle_implicit_object): Set this_p, clear
4411 rvaluedness_matches_p.
4412 (compare_ics): Do not compare rvaluedness matching when one of the
4413 operands is an implicit object.
4415 2007-09-14 Jason Merrill <jason@redhat.com>
4417 PR c++/17743, c++/19163
4418 * decl2.c (is_late_template_attribute): New fn.
4419 (splice_template_attributes, save_template_attributes): New fns.
4420 (cplus_decl_attributes): Call save_template_attributes.
4421 * pt.c (apply_late_template_attributes): New fn.
4422 (instantiate_class_template, tsubst_decl): Use it.
4423 * cp-tree.h: Declare is_late_template_attribute.
4425 2007-09-13 Tom Tromey <tromey@redhat.com>
4427 * parser.c (cp_lexer_new_main): Don't use
4428 c_lex_return_raw_strings.
4429 (cp_lexer_get_preprocessor_token): Update. Add special case when
4432 2007-09-11 Jan Hubicka <jh@suse.cz>
4434 * method.c (use_thunk): Use tree_rest_of_compilation
4435 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4436 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4437 * cp-tree.h (expand_body): Kill.
4438 (emit_associated_thunks): Declare.
4439 * semantics.c (emit_associated_thunks): Export.
4440 (expand_body): Kill.
4442 2007-09-09 David Daney <ddaney@avtrex.com>
4445 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4446 to calculate cookie_ptr.
4448 2007-09-08 Jason Merrill <jason@redhat.com>
4451 * pt.c (most_specialized_class): Set processing_template_decl
4452 while tsubsting partial spec args.
4454 2007-09-06 Jason Merrill <jason@redhat.com>
4456 * decl2.c (get_guard): Copy visibility from the guarded variable.
4458 2007-09-06 Jan Hubicka <jh@suse.cz>
4460 * semantics.c (expand_body): Do not mark arguments of clones used.
4462 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4465 * decl.c (cp_finish_decl): When processing_template_decl,
4466 deal correctly with init as TREE_LIST.
4468 2007-09-06 Tom Tromey <tromey@redhat.com>
4470 * decl.c (finish_function): Put return's location on line zero of
4473 2007-09-05 Jason Merrill <jason@redhat.com>
4476 * except.c (prepare_eh_type): Use type_decays_to.
4479 * init.c (build_delete): Use build_headof to get the address of the
4480 complete object if we aren't using the deleting destructor.
4481 * rtti.c (build_headof): No longer static.
4482 * cp-tree.h: Declare it.
4484 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4486 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4487 decl if a prototype for XX is provided with throw().
4490 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4491 on __*_chk non-__builtin_* decls.
4493 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4496 * semantics.c (finish_id_expression): Use context_for_name_lookup
4497 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4498 * class.c (finish_struct_anon): Deal correctly with anonymous
4499 structs (vs unions, as GNU extension) in error messages.
4501 2007-09-05 Jan Hubicka <jh@suse.cz>
4503 * sematics.c (expand_body): Remove unnecesary import_export_decl
4504 call, DECL_EXTERNAL checks and current_function_decl saving.
4506 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4508 PR c++/29731 (again)
4509 * parser.c (cp_parser_primary_expression): Return error_mark_node
4510 when a statement-expression is found in a template-argument list.
4512 2007-09-04 Jason Merrill <jason@redhat.com>
4514 * except.c (initialize_handler_parm): Use
4515 fold_build_cleanup_point_expr.
4518 * call.c (reference_binding): Don't look for user-defined conversions
4522 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4523 the MUST_NOT_THROW_EXPR.
4525 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4527 * decl.c (cp_finish_decl): Call determine_visibility before
4528 make_rtl_for_nonlocal_decl.
4530 2007-09-04 Jason Merrill <jason@redhat.com>
4533 * pt.c (most_specialized_class): Substitute outer template
4534 arguments into the arguments of a member template partial
4536 (strip_innermost_template_args): New fn.
4538 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4540 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4542 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4544 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4545 * decl.c (cp_make_fname_decl): Likewise,
4546 * parser.c (cp_parser_string_literal): Likewise,
4547 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4548 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4551 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4554 * typeck.c (build_unary_op): Fix error message for
4555 Boolean expression as operand to operator--.
4557 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4559 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4560 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4563 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4566 * init.c (build_default_init): Make extern.
4567 * cp-tree.h (build_default_init): Declare here.
4568 * pt.c (tsubst_expr): When the instantiation of the initializer of
4569 a variable results in an empty list, default-initialize the
4571 (tsubst_copy_and_build): When the instantiation of the initializer
4572 in a new expression results in an empty initializer list,
4573 default-initialize it.
4575 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4577 * mangle.c (write_type): Change mangling of rvalue reference from
4580 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4582 * decl.c (duplicate_decls): Remove duplicated line.
4584 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4587 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4588 BOUND_TEMPLATE_TEMPLATE_PARM.
4590 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4593 * search.c (lookup_member): Check the name argument for
4596 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4599 * parser.c (cp_parser_trait_expr): Check rerurn value of
4602 2007-08-30 Ollie Wild <aaw@google.com>
4604 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4605 convert_ptrmem for pointer to member conversions.
4606 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4607 (ocp_convert): Update cp_convert_to_pointer call.
4608 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4610 (build_static_cast_1): Check can_convert for conversions in either
4612 (get_delta_difference_1): New function.
4613 (get_delta_difference): Refactor to call get_delta_difference_1.
4615 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4617 * decl.c (start_preparsed_function): Set
4618 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4620 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4623 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4624 BOUND_TEMPLATE_TEMPLATE_PARM.
4626 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4630 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4631 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4633 2007-08-27 Jason Merrill <jason@redhat.com>
4636 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4637 Look inside STMT_EXPR.
4638 * semantics.c (stmt_expr_value_expr): New fn.
4639 * cp-tree.h: Declare it.
4642 * decl.c (groktypename): Ignore attributes applied to class type.
4644 2007-08-28 Richard Guenther <rguenther@suse.de>
4646 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4648 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4650 * error.c (dump_expr): Handle COMPLEX_CST.
4651 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4652 (pp_cxx_expression): Likewise.
4654 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4656 * decl.c (GNU_INLINE_P): New.
4657 (duplicate_decls): Handle gnu_inline. Merge attributes and
4658 some flags in overriding definitions.
4659 (redeclaration_error_message): Handle gnu_inline.
4660 (start_preparsed_function): Likewise.
4662 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4664 * call.c (sufficient_parms_p): Constify.
4665 * class.c (same_signature_p): Likewise.
4666 * cp-gimplify.c (is_invisiref_parm,
4667 cxx_omp_privatize_by_reference): Likewise.
4668 * cp-objcp-common.c (has_c_linkage): Likewise.
4669 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4670 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4671 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4672 num_artificial_parms_for, comp_template_parms,
4673 template_parameter_pack_p, any_dependent_template_arguments_p,
4674 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4675 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4676 zero_init_p, member_p, cp_lvalue_kind,
4677 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4678 varargs_function_p, is_dummy_object, special_function_kind,
4679 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4680 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4681 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4682 cp_has_mutable_p, at_least_as_qualified_p,
4683 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4684 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4685 * except.c (nothrow_libfn_p): Likewise.
4686 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4688 * pt.c (comp_template_parms, template_parameter_pack_p,
4689 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4690 any_dependent_template_arguments_p): Likewise.
4691 * repo.c (repo_export_class_p): Likewise.
4692 * semantics.c (anon_aggr_type_p): Likewise.
4693 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4694 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4695 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4696 zero_init_p, special_function_p): Likewise.
4697 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4698 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4699 compparms, invalid_nonstatic_memfn_p,
4700 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4701 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4702 cp_has_mutable_p, lvalue_or_else): Likewise.
4704 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4706 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4707 * cp-objcp-common.c (cp_tree_size): Ditto.
4708 * tree.c (cp_walk_subtrees): Ditto
4709 * cp-tree.def (TINST_LEVEL): Go away.
4710 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4711 move together with other non-tree structs.
4712 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4713 (union lang_tree_node): Eliminate tinst_level field.
4714 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4715 (current_instantiation, outermost_tinst_level): Return
4716 a "struct tinst_level *".
4718 * error.c (print_instantiation_partial_context): Change second
4719 parameter to a "struct tinst_level *". Replace accessor macros
4721 (print_instantiation_full_context): Likewise.
4722 * lex.c (in_main_input_context): Likewise.
4724 * pt.c (struct pending_templates): New.
4725 (pending_templates, last_pending_template): Use it as a type.
4726 (current_tinst_level): Change typo to "struct tinst_level *"
4727 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4728 (add_pending_template): Construct a "struct pending_template".
4729 Replace TINST_LEVEL accessor macros with field access.
4730 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4731 (pop_tinst_level): Likewise.
4732 (instantiate_pending_templates): Likewise. Factor common code used
4733 when an instantiation has been done.
4734 (outermost_tinst_level): Replace tree_last with loop.
4735 (current_instantiation): Return a "struct tinst_level *".
4737 2007-08-24 Ollie Wild <aaw@google.com>
4739 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4740 * name-lookup.h (cp_binding_level): Remove vtables member.
4742 2007-08-24 Richard Guenther <rguenther@suse.de>
4744 * tree.c (cp_cannot_inline_tree_fn): Remove.
4745 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4746 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4749 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4752 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4753 error_mark_node right away if build_expr_type_conversion
4757 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4758 is error_mark_node rather than NULL_TREE.
4759 * pt.c (check_explicit_specialization): Likewise.
4762 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4763 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4765 2007-08-22 Jason Merrill <jason@redhat.com>
4768 * pt.c (outermost_tinst_level): New function.
4769 * lex.c (in_main_input_context): New function.
4770 * cp-tree.h: Declare it.
4771 * decl2.c (constrain_class_visibility): Use it to avoid warning
4772 about uses of the anonymous namespace in the main input file.
4774 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4776 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4778 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4781 * class.c (finish_struct_1): Warn when a class has virtual
4782 functions and accessible non-virtual destructor.
4784 2007-08-20 Richard Guenther <rguenther@suse.de>
4788 * call.c (build_new_method_call): Convert initializer to
4790 * init.c (build_aggr_init): Do not fiddle with types.
4791 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4792 * except.c (build_throw): Do not drop qualifiers for the
4794 * typeck.c (get_member_function_from_ptrfunc): Do not
4795 fiddle with types, instead convert.
4796 (build_ptrmemfunc1): Convert to the target type for
4798 (gfc_trans_allocate): Convert result to target type.
4799 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4800 pointer-to-member structures shall have alias set zero as well.
4802 2007-08-20 Richard Guenther <rguenther@suse.de>
4804 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4806 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4807 (nonstatic_local_decl_p): Likewise.
4808 * tree.c (cp_auto_var_in_fn_p): Remove.
4809 * decl.c (nonstatic_local_decl_p): Remove.
4811 2007-08-20 Richard Guenther <rguenther@suse.de>
4813 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4815 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4816 cp_walk_subtrees lh parameter.
4817 (cp_walk_tree_without_duplicates): New define to
4818 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4819 * tree.c (count_trees): Call
4820 cp_walk_tree_without_duplicates.
4821 (verify_stmt_tree): Call cp_walk_tree.
4822 (break_out_target_exprs): Likewise.
4823 (WALK_SUBTREE): Likewise.
4824 * cp-gimplify.c (cp_genericize): Likewise.
4825 * cp-pt.c (find_parameter_packs_r): Likewise.
4826 (uses_parameter_packs): Likewise.
4827 (make_pack_expansion): Likewise.
4828 (check_for_bare_parameter_packs): Likewise.
4829 (for_each_template_parm): Likewise.
4830 * decl.c (check_default_argument): Call
4831 cp_walk_tree_without_duplicates.
4832 * except.c (build_throw): Likewise.
4833 * decl2.c (type_visibility): Likewise.
4834 * semantics.c (expand_or_defer_fn): Likewise.
4835 (finalize_nrv): Call cp_walk_tree.
4837 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4840 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4841 Initialize it with save_expr rather than get_temp_regvar.
4843 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4846 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4849 2007-08-17 Ollie Wild <aaw@google.com>
4852 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4853 declarations into appropriate slots for comparison. Fix type
4856 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4859 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4860 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4862 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4865 * parser.c (cp_parser_class_head): Improve error message.
4867 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4869 * pt.c (instantiate_decl): Set input_location
4870 for the function end.
4872 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4874 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4876 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4877 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4878 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4879 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4880 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4881 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4882 * typeck.c (cp_type_quals): Likewise.
4883 * typeck2.c (cxx_incomplete_type_diagnostic,
4884 cxx_incomplete_type_error): Likewise.
4886 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4889 * pt.c (tsubst_friend_function): When check_classfn
4890 returns error_mark_node likewise return it.
4892 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4895 * typeck.c (check_return_expr): Don't NRV optimize vars in
4897 * decl.c (finish_function): Comment fix.
4899 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4902 * pt.c (push_template_decl_real): Depending on TYPE_P
4903 use either TYPE_CONTEXT or DECL_CONTEXT.
4905 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4907 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4908 constructors and destructors return this.
4910 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4913 * decl2.c (check_classfn): Return error_mark_node in case of error;
4914 in that case, do not call add_method.
4915 * decl.c (start_decl): Deal with check_classfn returning
4917 (grokfndecl): Likewise.
4918 * pt.c (tsubst_friend_function): Likewise.
4920 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4923 * typeck.c (build_binary_op): Disallow vector float types with
4924 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4926 2007-08-11 Ian Lance Taylor <iant@google.com>
4928 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4930 * cp-tree.h (cxx_get_alias_set): Update declaration.
4932 2007-08-10 Ollie Wild <aaw@google.com>
4934 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4936 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4938 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4939 (lookup_using_namespace): Fix ambiguous_decl call.
4940 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4942 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4944 * call.c (name_as_c_string): Use CONST_CAST.
4945 * decl.c (build_decl): Likewise.
4946 * parser.c (cp_parser_string_literal): Likewise.
4948 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4951 * error.c (dump_expr): Consistently use the *_cxx_*
4952 variants of the pretty-print functions.
4954 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4957 * decl.c (check_special_function_return_type): Just error
4958 on return type specified for conversion operator.
4960 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4962 * typeck2.c (readonly_error): Handle general expressions.
4963 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4965 2007-08-06 Dan Hipschman <dsh@google.com>
4967 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4968 access function name.
4970 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4973 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4974 * g++spec.c (lang_specific_driver): Check them.
4976 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4979 * pt.c (inline_needs_template_parms): Fix comment; change return type
4982 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4985 2007-03-26 Dirk Mueller <dmueller@suse.de>
4987 * parser.c (cp_parser_member_declaration): Pedwarn
4988 about stray semicolons after member declarations.
4990 2007-08-02 Lee Millward <lee.millward@gmail.com>
4995 * parser.c (cp_parser_asm_definition): Detect and discard asm
4996 statements with invalid inputs or outputs.
4997 (cp_parser_asm_operand_list): Return error mark node if any
4998 of the operands are invalid. Adjust documentation.
5000 2007-08-02 Nick Clifton <nickc@redhat.com>
5002 * typeck.c: Change copyright header to refer to version 3 of the
5003 GNU General Public License and to point readers at the COPYING3
5004 file and the FSF's license web page.
5005 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5006 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5007 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5008 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5009 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5010 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5011 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5012 name-lookup.h, parser.c: Likewise.
5014 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5017 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5019 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5022 * semantics.c (finish_label_stmt): Reject the __label__
5023 extension outside function scopes.
5025 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5027 * parser.c (eof_token): Un-constify.
5028 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5029 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5032 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5034 * pt.c, tree.c, typeck2.c: Fix comment typos.
5036 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5037 Mark Mitchell <mark@codesourcery.com>
5040 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5041 hidden due to friend declarations in local classes.
5043 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5045 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5046 * cp-tree.def (DECLTYPE_TYPE): New.
5047 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5048 (dump_type_prefix): Ditto.
5049 (dump_type_suffix): Ditto.
5050 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5051 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5052 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5054 (DECLTYPE_TYPE_EXPR): New.
5055 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5056 (finish_declared_type): Declare.
5057 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5058 DECLTYPE_TYPE nodes.
5059 (pp_cxx_type_id): Ditto.
5060 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5061 (tsubst): Substitute into a DECLTYPE_TYPE node.
5062 (tsubst_copy): Ditto.
5063 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5065 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5066 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5067 structural equality (because we can't hash the expressions).
5068 (finish_declared_type): New.
5069 * lex.c (reswords): Add "decltype" keyword.
5070 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5071 (cp_parser_postfix_expression): Add member_access_only_p to
5072 restrict postfix expression to member access expressions.
5073 (cp_parser_unary_expression): Update call to
5074 cp_parser_postfix_expression to reflect new parameter.
5075 (cp_parser_declared_type): New.
5076 (cp_parser_simple_type_specifier): Parse decltype types.
5078 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5081 * call.c (convert_for_arg_passing): Only widen bitfields to their
5082 declared types if necessary.
5084 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5086 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5089 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5091 * decl.c (typename_hash, typename_compare): Constify.
5092 * mangle.c (hash_type, compare_type): Likewise.
5093 * pt.c (eq_local_specializations, hash_local_specialization):
5095 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5096 list_hash): Likewise.
5097 * typeck2.c (pat_compare): Likewise.
5099 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5101 * method.c (implicitly_declare_fn): Increase alignment if member
5102 function pointer format requires it.
5104 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5107 * typeck.c (check_return_expr): Do not pass a null argument
5110 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5113 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5116 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5119 * typeck.c (convert_arguments): Only use default args if we have
5123 * typeck.c (structural_comptypes): No need to check
5124 resolve_typename_type return value here.
5125 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5126 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5127 original type rather than error_mark_node in case of failure.
5128 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5129 resolve_typename_type result check.
5130 (cp_parser_direct_declarator, cp_parser_head,
5131 cp_parser_constructor_declarator_p): Likewise.
5133 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5135 * pt.c (template_parms_variadic_p): Remove.
5136 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5138 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5141 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5142 argument to dump_aggr_init_expr_args instead of false.
5144 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5146 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5147 canonical types; otherwise, fall back to structural type
5148 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5149 internal compiler error if the canonical types are wrong.
5151 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5154 * parser.c (cp_parser_make_indirect_declarator): When the
5155 the code argument is ERROR_MARK return cp_error_declarator.
5157 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5160 * decl.c (cxx_init_decl_processing): Don't set
5161 force_align_functions_log.
5162 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5163 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5164 FUNCTION_DECL, return its alignment.
5166 2007-07-09 Richard Guenther <rguenther@suse.de>
5168 * decl.c (start_preparsed_function): Do not promote return type.
5170 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5173 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5175 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5178 * pt.c (resolve_overloaded_unification): Robustify. Return a
5180 (type_unification_real): Adjust accordingly.
5182 2007-07-06 Richard Guenther <rguenther@suse.de>
5184 * init.c (build_new_1): Use the correct pointer type.
5185 * typeck2.c (build_m_component_ref): Likewise.
5187 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5190 * init.c (build_zero_init): Always build an initializer for
5192 * typeck2.c (build_functional_cast): Use build_zero_init.
5195 * init.c (build_new_1): Always pass the allocation function to
5196 build_op_delete_call.
5197 * call.c (build_op_delete_call): Handle operator delete with a
5198 variable-argument list. Do not issue an error when no matching
5199 deallocation function is available for a new operator.
5202 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5203 * decl.c (value_dependent_init_p): New function.
5204 (cp_finish_decl): Use it.
5205 * pt.c (value_dependent_expression_p): Use
5206 any_value_dependent_elements_p.
5207 * parser.c (cp_parser_primary_expression): Add comment about
5208 treating dependent qualified names as integral
5209 constant-expressions.
5211 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5213 * decl.c (build_ptrmemfunc_type): Always use structural equality
5214 tests when comparing pointer-to-member-function types, because the
5215 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5218 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5220 * init.c (build_new): Tweak comment.
5222 2007-06-29 Dave Brolley <brolley@redhat.com>
5225 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5226 type to its base type and number of elements here.
5227 * init.c (build_new): Call complete_type_or_else to ensure that the
5228 type is complete and to issue a diagnostic if it is not.
5229 (build_new_1): Don't call complete_type_or_else here.
5231 2007-07-03 Richard Guenther <rguenther@suse.de>
5234 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5237 2007-07-02 Simon Baldwin <simonb@google.com>
5239 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5240 for inner-style nested forward declarations that don't declare
5243 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5246 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5247 DECL_P in not a variable and appears more than once error messages.
5249 2007-07-01 Ollie Wild <aaw@google.com>
5251 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5252 (select_decl): Remove function.
5253 (unqualified_namespace_lookup): Populate binding by calling
5254 ambiguous_decl. Remove select_decl call.
5255 (lookup_qualified_name): Remove select_decl call.
5256 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5257 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5258 generation when name lookup is ambiguous.
5260 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5263 * init.c (build_new_1): Use structural equality on the copy of the
5266 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5268 * decl2.c (determine_visibility): Implement
5269 flag_visibility_ms_compat effect on type info.
5270 * decl.c (cxx_init_decl_processing): Implement
5271 global effect of flag_visibility_ms_compat.
5273 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5275 * decl2.c (start_objects): Mark constructor-running function
5278 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5281 * decl.c (grokdeclarator): Reset friendp for member functions declared
5282 friend of their own class.
5284 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5286 * decl2.c (determine_visibility): Don't look for dllexport here.
5287 (determine_visibility_from_class): Tidy.
5289 2007-06-18 Simon Baldwin <simonb@google.com>
5292 * parser.c (cp_parser_single_declaration): Added check for storage
5293 class other than sc_none in parsed declaration, and a flag to indicate
5294 if the call is part of an explicit template specialization parse.
5295 * (cp_parser_explicit_specialization): Specialization check flag added
5296 to call to cp_parser_single_declaration(), set true.
5297 * (cp_parser_template_declaration_after_export): Specialization check
5298 flag added to call to cp_parser_single_declaration(), set false.
5299 * pt.c (check_explicit_specialization): Added code to copy visiblity
5300 and linkage from the templated function to the explicit specialization.
5302 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5304 * typeck.c (build_binary_op): For templates build the
5305 expression in pieces to avoid the assert in build2_stat.
5306 (get_member_function_from_ptrfunc):
5307 Change over to using POINTER_PLUS_EXPR and convert
5308 the second operand to sizetype.
5309 * typeck2.c (build_m_component_ref): Likewise.
5310 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5311 instead of PLUS_EXPR for pointers.
5312 (build_new_1): Likewise.
5313 (build_vec_delete_1): Likewise.
5314 (build_vec_delete): Likewise.
5315 * class.c (build_base_path): Likewise.
5316 (build_base_path): Likewise.
5317 (convert_to_base_statically): Likewise.
5318 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5319 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5320 instead of PLUS_EXPR.
5321 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5322 instead of PLUS_EXPR for pointers.
5323 * call.c (build_special_member_call): Likewise.
5324 * rtti.c (build_headof): Likewise.
5325 Use sizetype instead of ptrdiff_type_node.
5326 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5327 instead of PLUS_EXPR for pointers.
5328 * except.c (expand_start_catch_block): Do a
5329 NEGATIVE and then a POINTER_PLUS_EXPR instead
5331 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5332 PLUS_EXPR on pointer types over to use
5333 POINTER_PLUS_EXPR and remove the conversion
5334 to the pointer types.
5335 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5336 adding to a pointer type. Use size_int instead of
5337 ssize_int. Convert the index to sizetype before
5338 adding it to the pointer.
5340 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5342 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5343 (DECL_ANON_UNION_VAR_P): New macro.
5344 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5345 than DECL_VAR_MARKED_P, to keep track of which variables we have
5347 * decl.c (redeclaration_error_message): Complain about redeclaring
5348 anonymous union members at namespace scope.
5349 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5351 2007-06-14 Geoff Keating <geoffk@apple.com>
5353 * decl2.c (determine_visibility): Ensure that functions with
5354 hidden types as parameters are hidden.
5357 * decl2.c (determine_visibility): Remove duplicate code for
5360 2007-06-12 Ian Lance Taylor <iant@google.com>
5363 * init.c (avoid_placement_new_aliasing): New static function.
5364 (build_new_1): Call it.
5366 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5368 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5369 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5371 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5374 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5375 on init, the non-decl cond operand and increment value.
5377 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5380 * decl.c (check_initializer): Report an error when a brace enclosed
5381 initializer is used for a non-aggregate type in C++98.
5382 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5384 (grokdeclarator): Likewise.
5385 (move_fn_p): Likewise.
5386 * typeck.c (check_return_expr): Likewise.
5387 * call.c (reference_binding): Likewise.
5388 * error.c (cp_cpp_error): Likewise.
5389 * pt.c (check_default_tmpl_args): Likewise.
5391 * lex.c (init_reswords): Likewise.
5392 * parser.c (p_parser_primary_expression): Likewise.
5393 (TOKEN_PRECEDENCE): Likewise.
5394 (cp_parser_init_declarator): Likewise.
5395 (cp_parser_ptr_operator): Likewise.
5396 (cp_parser_parameter_declaration): Likewise.
5397 (cp_parser_enclosed_template_argument_list): Likewise.
5398 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5399 (cp_parser_next_token_ends_template_argument_p): Likewise.
5401 2007-06-04 Simon Baldwin <simonb@google.com>
5403 * decl.c (grokdeclarator): Readability change. Moved case labels
5404 into direct switch statement scope.
5406 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5408 * call.c (convert_like_real): Remove pointless code.
5410 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5412 * decl.c (get_atexit_fn_ptr_type): New function.
5413 (get_atexit_node): Use it.
5414 (start_cleanup_fn): Likewise.
5415 (register_dtor_fn): Use the object's destructor, instead of a
5416 separate cleanup function, where possible.
5417 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5418 (atexit_fn_ptr_type_node): New macro.
5419 * decl2.c (build_cleanup): Use build_address.
5421 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5423 * typeck.c (build_binary_op): Include types in error.
5425 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5428 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5429 needs runtime initialization.
5431 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5434 * semantics.c (finish_trait_expr): Complete the types.
5436 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5437 Douglas Gregor <doug.gregor@gmail.com>
5438 Pedro Lamarao <pedro.lamarao@mndfck.org>
5439 Howard Hinnant <howard.hinnant@gmail.com>
5443 * typeck.c (comptypes): Don't consider rvalue and lvalue
5444 reference types to be equivalent.
5445 (check_return_expr): Move from certain lvalues when returning
5447 * decl.c (grokdeclarator): Implement reference collapsing.
5448 (copy_fn_p): Don't consider constructors taking rvalue references
5449 to be copy constructors.
5451 * call.c (conversion): New "rvaluedness_matches_p" member.
5452 (convert_class_to_reference): Require reference type as first
5453 parameter instead of base type.
5454 (reference_binding): Add logic to handle rvalue references.
5455 (implicit_conversion): Update inaccurate comment.
5456 (convert_like_real): Disable creation of temporaries that are
5457 impossible to initialize for types with move constructors.
5458 (build_over_call): Elide move constructors when possible.
5459 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5460 (maybe_handle_ref_bind): Return conversion instead of type node.
5461 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5462 determine preferred conversion sequences.
5463 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5464 (LOOKUP_PREFER_RVALUE): New.
5465 (DECL_MOVE_CONSTRUCTOR_P): New.
5466 (struct cp_declarator): Add "reference" member for reference
5467 types, with new "rvalue_ref" flag.
5468 (cp_build_reference_type): Declare.
5469 (move_fn_p): Declare.
5470 * error.c (dump_type_prefix): Format rvalue reference types
5471 correctly in error messages.
5472 * except.c (build_throw): Move from certain lvalues when
5474 * mangle.c (write_type): Mangle rvalue references differently
5475 than regular references.
5476 * parser.c (make_reference_declarator): Add boolean parameter for
5478 (cp_parser_make_indirect_declarator): New.
5479 (cp_parser_new_declarator_opt): Call
5480 cp_parser_make_indirect_declarator.
5481 (cp_parser_conversion_declarator_opt): Ditto.
5482 (cp_parser_declarator): Ditto.
5483 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5485 * pt.c (tsubst): Implement reference collapsing.
5486 (maybe_adjust_types_for_deduction): Implement special template
5487 parameter deduction rule for rvalue references.
5488 (type_unification_real): Update calls to
5489 maybe_adjust_types_for_deduction.
5490 (try_one_overload): Ditto.
5491 (unify_pack_expansion): Ditto.
5492 * tree.c (lvalue_p_1): Handle rvalue reference types.
5493 (cp_build_reference_type): New.
5495 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5498 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5499 variables that need runtime initialization.
5501 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5504 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5505 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5506 case POSTDECREMENT_EXPR>): Return the error_mark_node
5507 if either the real or imaginary parts would an
5510 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5511 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5514 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5515 token is a closing brace, false if there are no tokens left.
5516 (cp_parser_namespace_alias_definition): Only consume the next token if
5517 it is a closing brace.
5519 * parser.c (cp_parser_class_specifier): Likewise.
5521 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5523 * semantics.c (finish_member_declaration): Fix a typo in the
5526 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5538 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5539 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5540 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5541 whether everything was okay. Fix indentation.
5542 (push_template_decl_real): Check for bare parameter packs in
5543 function parameters; where errors occur, mark the parameter types
5544 with ERROR_MARK_NODEs to avert ICEs.
5545 (coerce_template_parameter_pack): New.
5546 (coerce_template_parms): Moved parameter pack coercion into
5547 coerce_template_parameter_pack, and permit it anywhere in the
5548 template parameter list (not just at the end). Parameter and
5549 argument indices can vary (somewhat) separately now, so add
5550 PARM_IDX and ARG_IDX.
5551 (fn_type_unification): Don't set an argument pack as incomplete if
5552 no argument pack was deduced.
5553 (type_unification_real): If a type parameter is a parameter pack
5554 and has not otherwise been deduced, it will be deduced to an empty
5556 (more_specialized_fn): Use the actual lengths of the argument
5557 lists when comparing against expansions.
5558 * semantics.c (finish_member_declaration): If a field's type has
5559 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5561 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5564 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5566 2007-05-22 Ollie Wild <aaw@google.com>
5568 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5569 (unqualified_namespace_lookup): Adds check for hidden types.
5571 2007-05-22 Ollie Wild <aaw@google.com>
5573 * decl.c (duplicate_decls): Verify namespace names are unique.
5575 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5577 * decl.c (cxx_maybe_build_cleanup): Handle
5578 __attribute__((cleanup)).
5580 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5582 * cvt.c (cp_convert_and_check): Don't check warnings if the
5585 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5587 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5589 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5592 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5593 type only if is a class type (5.2.8/4).
5595 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5597 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5598 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5599 c_common_unsigned_type.
5601 2007-05-11 Silvius Rus <rus@google.com>
5603 * typeck.c (build_indirect_ref): Add call to
5604 strict_aliasing_warning.
5605 (build_reinterpret_cast_1): Condition call to
5606 strict_aliasing_warning.
5608 2007-05-11 Jan Hubicka <jh@suse.cz>
5610 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5611 * decl2.c (start_objects): ctors and dtors are no longer public.
5612 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5614 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5616 * typeck.c (build_unary_op): Remove code that used to
5617 handle non lvalue increments/decrements.
5619 2007-05-07 Mike Stump <mrs@apple.com>
5621 * parser.c (check_empty_body): Add.
5622 (cp_parser_iteration_statement): Add call to check_empty_body.
5624 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5627 * mangle.c (write_mangled_name): Mangle static variable names.
5628 (write_unqualified_name): Use local-source-name for
5629 namespace-scope static variables.
5631 2007-05-04 Dirk Mueller <dmueller@suse.de>
5633 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5636 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5639 * decl2.c (constrain_class_visibility):
5640 Use strip_pointer_or_array_types instead of strip_array_types.
5642 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5645 * decl.c (reshape_init_r): Don't reshape the first element if it
5646 is a pointer to member function.
5648 2007-04-27 Simon Baldwin <simonb@google.com>
5650 * decl.c (grokparms): Changed message format from %qD to %qE.
5652 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5654 * error.c (maybe_warn_variadic_templates): Variadic templates are
5655 now in C++0x, so only warn about them in C++98 mode.
5657 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5660 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5661 integeral types from vectors types.
5663 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5666 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5667 for type dependent OMP_CLAUSE_DECLs.
5669 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5672 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5673 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5674 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5675 * init.c (build_zero_init): Adjust, as
5676 COMPLEX_TYPE is now a SCALAR_TYPE.
5677 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5678 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5680 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5682 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5683 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5684 (trait_expr_value): Adjust.
5686 2007-04-23 Simon Baldwin <simonb@google.com>
5688 * decl.c (grokparms): Added new error for duplicate function
5689 parameters names in function prototypes, to match gcc behavior.
5691 2007-04-23 Jan Hubicka <jh@suse.cz>
5693 * decl2.c (finish_objects): Do not call target constructor/destructor
5696 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5698 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5699 instead of checking GIMPLE_STMT_P in chain_next.
5701 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5704 * call.c (convert_for_arg_passing): Convert bitfields to their
5707 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5710 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5712 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5715 * decl2.c (constrain_class_visibility):
5716 Do not warn about the use of anonymous namespace in the main input file.
5718 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5720 * cp-tree.h (current_template_parms): Fix typo in comment.
5722 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5724 * cp-tree.h, error.c: Fix comment typos.
5726 2007-04-13 Jason Merrill <jason@redhat.com>
5729 * call.c (reference_binding): Add c_cast_p parm. If true,
5730 add quals to TO as needed to make it reference-compatible.
5732 2007-04-11 Jan Hubicka <jh@suse.cz>
5734 * class.c (convert_to_base_statically): Fold produced tree; verify
5735 that we are not processing template_decl.
5737 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5740 * class.c (build_base_path): Ensure that the converted pointer has
5741 the same cv-qualification as the input.
5743 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5745 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5747 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5749 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5751 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5752 * tree.c (cp_add_pending_fn_decls): Remove.
5753 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5755 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5757 Revert change removing staticp.
5759 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5761 * cp-objcp-common.c (cxx_staticp): Remove.
5762 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5763 * cp-tree.h (cxx_staticp):
5765 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5767 * class.c (check_for_override): Don't remove dllmport attribute
5770 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5773 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5774 type issue error and return early.
5776 2007-03-30 Jason Merrill <jason@redhat.com>
5779 * typeck.c (cp_type_readonly): New fn.
5780 * cp-tree.h: Declare it.
5781 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5782 (cp_finish_decl): Not here.
5784 2007-03-31 Richard Guenther <rguenther@suse.de>
5786 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5789 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5794 * parser.c (declarator_can_be_parameter_pack): New.
5795 (cp_parser_template_parameter): Only parse the `...' if the
5796 declarator can be a parameter pack.
5797 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5799 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5800 types (they could be used as array bounds).
5801 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5802 (tsubst_pack_expansion): Handle failure to expand parameter
5805 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5808 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5809 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5810 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5811 (CLASS_TYPE_NON_UNION_P): Add.
5812 (struct lang_type_class): Add has_complex_dflt.
5813 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5814 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5815 * cp-tree.def: Add TRAIT_EXPR.
5816 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5817 * lex.c (struct resword): Add __has_nothrow_assign,
5818 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5819 __has_trivial_constructor, __has_trivial_copy,
5820 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5821 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5822 __is_pod, __is_polymorphic, __is_union.
5823 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5824 (cp_parser_trait_expr): New.
5825 * semantics.c (finish_trait_expr, trait_expr_value
5826 classtype_has_nothrow_copy_or_assign_p): New.
5827 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5829 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5830 * class.c (check_bases, check_field_decl, check_bases_and_members):
5831 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5832 * pt.c (uses_template_parms, tsubst_copy_and_build,
5833 value_dependent_expression_p, type_dependent_expression_p): Deal with
5835 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5837 2007-03-29 Richard Guenther <rguenther@suse.de>
5839 * tree.c (cp_walk_subtrees): Do not set input_location.
5841 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5844 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5847 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5849 * parser.c (struct cp_parser): Update comment for
5850 greater_than_is_operator_p.
5851 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5852 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5853 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5854 !GREATER_THAN_IS_OPERATOR_P.
5855 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5856 `>>' operators that will become two `>' tokens in C++0x.
5857 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5858 mode, allowing it to terminate default arguments.
5859 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5860 `>>' like two consecutive `>' tokens.
5861 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5862 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5863 ends a template argument.
5865 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5867 * decl.c (redeclaration_error_message): Complain when redeclaring
5868 a friend function with default template arguments (C++0x mode only).
5869 * cp-tree.h (check_default_tmpl_args): Declare.
5870 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5871 template arguments in function templates. Add support for checking
5872 the default template arguments of friend templates.
5873 (push_template_decl_real): Fix call to check_default_tmpl_args.
5874 (type_unification_real): If a template parameter has not been
5875 deduced but provides a default template argument, substitute into
5876 that default template argument.
5877 * parser.c (cp_parser_init_declarator): When declaring (but not
5878 defining!) a function template in C++0x mode, check for default
5881 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5884 * decl.c (grokdeclarator): Deal with cv-qualified function type
5885 typedefs in the same way for member and non-member functions.
5887 2007-03-26 Dirk Mueller <dmueller@suse.de>
5889 * parser.c (cp_parser_member_declaration): Pedwarn
5890 about stray semicolons after member declarations.
5892 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5895 * pt.c (instantiate_decl): Set in_system_header.
5897 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5899 * cp-tree.h (current_tempalte_parms): Improve documentation.
5900 * pt.c (current_template_args): Likewise.
5903 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5904 not consume tokens when failing.
5906 2007-03-22 Jim Wilson <wilson@specifix.com>
5907 Mark Mitchell <mark@codesourcery.com>
5910 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5911 consistent with FROM.
5913 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5915 * error.c (dump_expr): Handle dependent names that designate types.
5916 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5918 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5920 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5922 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5924 * cvt.c (cp_convert_and_check) : Define.
5925 * cp-tree.h (cp_convert_and_check): Declare.
5926 * call.c (convert_conversion_warnings): Rename to
5927 conversion_null_warnings. The warning for floating-point to
5928 integer is handled by convert_and_check in convert_like_real.
5929 (convert_like_real): convert_conversion_warnings was renamed as
5930 conversion_null_warnings.
5931 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5932 overflow and changes of value during conversion.
5934 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5937 * parser.c (cp_parser_statement): If 'namespace' is found, this
5938 only can be a namespace alias definition, so parse it now.
5939 (cp_parser_namespace_alias_definition): if we find an open brace
5940 instead of '=', then this is actually a misplaced namespace
5943 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5946 * decl.c (cxx_init_decl_processing): Move command-line options
5947 processing to c-opts.c.
5949 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5951 * ptree.c (cxx_print_type): Use formatting markup for integers
5952 when printing template parameter index/level/orig level.
5953 (cxx_print_xnode): Ditto.
5954 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5955 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5956 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5958 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5959 rather than a HOST_WIDE_INT.
5960 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5961 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5963 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5964 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5965 IN_BASE_INITIALIZER bool bitfields.
5966 (struct cp_declarator): Make KIND a 4-bit field. Make
5967 PARAMETER_PACK_P a bool bitfield just after KIND.
5968 * pt.c (uses_parameter_packs): Destroy the pointer set.
5969 (make_pack_expansion): Ditto.
5970 (check_for_bare_parameter_packs): Ditto.
5971 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5973 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5976 * call.c (convert_default_arg): Instead of copying the node,
5979 2007-03-15 Dirk Mueller <dmueller@suse.de>
5982 * call.c (convert_conversion_warnings): New..
5983 (convert_like_real): .. factored out from here.
5984 (convert_conversion_warnings): Add warning about
5985 false being converted to NULL in argument passing.
5987 2007-03-14 Dirk Mueller <dmueller@suse.de>
5989 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5990 (finish_do_body): Warn about empty body in do/while statement.
5992 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5994 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5996 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5999 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6002 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6004 * repo.c (init_repo): Initialize random_seed saved options.
6005 (finish_repo): Adjust.
6007 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6010 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6013 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6015 * decl.c (compute_array_index_type): New warning flag warn_vla.
6017 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6020 * call.c (convert_default_arg): Copy non-constant arguments.
6022 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6025 * parser.c (cp_parser_postfix_expression): Disallow compound
6026 literals in constant expressions.
6029 * semantics.c (finish_typeof): Use unlowered_expr_type.
6031 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6034 * cp-tree.h (unlowered_expr_type): New function.
6035 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6036 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6037 (unlowered_expr_type): New function.
6038 (build_unary_op): Disallow predecrements of bool bitfields.
6039 * call.c (build_conditional_expr): Use unlowered_expr_type.
6040 * pt.c (type_unification_real): Likewise.
6042 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6045 * typeck.c (check_return_expr): Check for bare parameter packs.
6046 (comptypes): Compare template parameter packs and
6047 type pack expansions.
6048 * decl.c (grokdeclarator): Deal with the declaration of function
6050 (grokparms): Verify that the (optional) function parameter pack is
6051 at the end of the parameter list.
6052 (xref_basetypes): Handle pack expansions in the base class.
6053 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6054 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6055 (NONTYPE_ARGUMENT_PACK): New.
6056 (TYPE_PACK_EXPANSION): New.
6057 (EXPR_PACK_EXPANSION): New.
6058 (ARGUMENT_PACK_SELECT): New.
6059 * cp-objcp-common.c (cp_tree_size): Compute size of
6060 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6061 ARGUMENT_PACK_SELECT.
6062 * error.c (dump_template_argument): Print template argument packs.
6063 (dump_template_argument_list): Ditto.
6064 (dump_template_parameter): Dump `...' for template type parameter
6066 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6067 (dump_parameters): Print function parameter packs.
6068 (dump_template_parms): Print template argument packs.
6069 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6070 (maybe_warn_variadic_templates): New.
6071 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6072 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6073 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6075 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6076 (write_template_arg): Write argument packs as separate arguments.
6077 * cp-tree.h (struct template_parm_index_s): Add flag that
6078 indicates that the template parameter is actually a parameter
6080 (struct tree_argument_pack_select): New.
6081 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6082 (union lang_tree_node): Add argument_pack_select.
6083 (FUNCTION_PARAMETER_PACK_P): New.
6084 (PACK_EXPANSION_P): New.
6085 (PACK_EXPANSION_PATTERN): New.
6086 (SET_PACK_EXPANSION_PATTERN): New.
6087 (PACK_EXPANSION_PARAMETER_PACKS): New.
6088 (ARGUMENT_PACK_P): New.
6089 (ARGUMENT_PACK_ARGS): New.
6090 (SET_ARGUMENT_PACK_ARGS): New.
6091 (ARGUMENT_PACK_INCOMPLETE_P): New.
6092 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6093 (TEMPLATE_PARM_PARAMETER_PACK): New.
6094 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6095 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6096 (ARGUMENT_PACK_SELECT_INDEX): New.
6097 (ARGUMENT_PACK_SELECT_ARG): New.
6098 (struct cp_declarator): Add parameter_pack_p flag.
6099 (maybe_warn_variadic_templates): Declare.
6100 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6101 indicate a template parameter pack.
6102 (uses_parameter_packs): Declare.
6103 (template_parameter_pack_p): Declare.
6104 (template_parms_variadic_p): Declare.
6105 (make_pack_expansion): Declare.
6106 (check_for_bare_parameter_packs): Declare.
6107 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6108 sizeof... expressions.
6109 (pp_cxx_expression): Print pack expansions and non-type argument
6111 (pp_cxx_exception_specification): Print pack expansions.
6112 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6113 (pp_cxx_ctor_initializer): Print pack expansions.
6114 (pp_cxx_type_id): Print pack expansions.
6115 (pp_cxx_template_argument_list): Print argument packs.
6116 (pp_cxx_template_parameter): Print ellipsis for template parameter
6118 * pt.c (comp_template_parms): Compare template parameter packs.
6119 (template_parameter_pack_p): New.
6120 (template_parms_variadic_p): New.
6121 (template_args_variadic_p): New.
6122 (make_ith_pack_parameter_name): New.
6123 (struct find_parameter_pack_data): New.
6124 (find_parameter_packs_r): New.
6125 (uses_parameter_packs): New.
6126 (make_pack_expansion): New.
6127 (check_for_bare_parameter_packs): New.
6128 (expand_template_argument_pack): New.
6129 (reduce_template_parm_level): Propagate parameter pack flag.
6130 (process_template_parm): Add is_parameter_pack parameter to state
6131 when the parameter is actually a parameter pack. Create template
6132 parameter packs when is_parameter_pack is true.
6133 (current_template_args): The argument for a template parameter
6134 pack is an argument pack containing a single pack expansion.
6135 (process_partial_specialization): When checking that non-type
6136 argument expressions do not involve template parameters, loop over
6137 the arguments in argument packs separately.
6138 (push_template_decl_real): Check that the type of the declaration
6139 does not have any bare parameter packs. Check that primary
6140 templates have no more than one parameter pack, and that it comes
6141 at the end of the template parameter list.
6142 (convert_template_argument): Handle coercions for pack expansion
6143 expressions by coercing the pattern then rebuilding the expansion.
6144 (coerce_template_parms): When coercing the arguments for a
6145 variadic template, pack "extra" arguments into an argument pack.
6146 (coerce_template_template_parms): Cannot coerce between parameter
6147 packs and non-pack parameters.
6148 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6149 (comp_template_args): Expand all template arguments packs before
6150 comparing template argument lists.
6151 (mangle_class_name_for_template): Make argument packs as separate
6153 (for_each_template_parm_r): No need to handle BASELINK.
6154 (instantiate_class_template): Handle pack expansions in the base
6156 (tsubst_pack_expansion): New.
6157 (tsubst_template_args): Handle substitutions of argument packs and
6158 pack expansion into template argument lists.
6159 (tsubst_decl): Expand function parameter packs into separate
6160 function parameters.
6161 (tsubst_arg_types): Expand a type pack expansion into separate
6163 (tsubst_exception_specification): Handle pack expansions in
6164 exception specifiers.
6165 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6166 replacing a template parameter with its argument. If we encounter
6167 a substitution for an argument pack, just return the parameter
6169 (tsubst_copy): sizeof(X...) returns the number of elements in
6170 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6171 PARM_DECL is a parameter pack.
6172 (tsubst_expr): Expression pack expansions and argument packs
6173 cannot show up here; they will all be handled through function
6174 calls, sizeof, and template argument lists.
6175 (tsubst_copy_and_build): sizeof(X...) returns the number of
6176 elements in parameter pack X. Handle pack expansions in TREE_LIST
6177 and CONSTRUCTOR nodes.
6178 (fn_type_unification): Handle "incomplete" explicit template
6179 argument lists that specify some of the arguments for a template
6181 (type_unification_real): Unify arguments against pack expansions.
6182 (template_parm_level_and_index): New, helper function.
6183 (unify_pack_expansion): New.
6184 (unify): Unify argument packs on an argument-by-argument basis,
6185 handling variadic argument packs as well.
6186 (more_specialized_fn): Handle unification of function parameter
6187 packs. All things being equal, prefer non-variadic function
6188 templates to variadic function templates.
6189 (more_specialized_class): Prefer the variadic class template
6190 partial specialization that binds fewer arguments to a parameter
6192 (regenerate_decl_from_template): Expand function parameter packs
6193 into separate parameters.
6194 (instantiate_decl): Ditto.
6195 (tsubst_initializer_list): Handle pack expansions for base-class
6197 (dependent_type_p_r): Determine dependent types in argument packs
6198 and pack expansions.
6199 (value_dependent_expression_p): Determine value-dependence of
6200 non-type argument packs.
6201 (dependent_template_arg_p): Handle argument packs.
6202 * semantics.c (finish_cond): Check for bare parameter packs.
6203 (finish_expr_stmt): Ditto.
6204 (finish_for_expr): Ditto.
6205 (finish_switch_cond): Ditto.
6206 (finish_mem_initializers): Ditto.
6207 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6209 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6210 * parser.c (make_declarator): Declarator is not an expansion.
6211 (make_pointer_declarator): Transfer parameter pack flag to outer
6213 (make_reference_declarator): Ditto.
6214 (make_ptrmem_declarator): Ditto.
6215 (make_call_declarator): Ditto.
6216 (make_array_declarator): Ditto.
6217 (cp_parser_postfix_expression): Allow pack expansion expressions
6218 in the argument list for a call expression.
6219 (cp_parser_parenthesized_expression_list): Add new parameter
6220 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6221 into separate arguments."
6222 (cp_parser_new_placement): Allow pack expansion expressions.
6223 (cp_parser_new_initializer): Ditto.
6224 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6225 base-class initializer expansion.
6226 (cp_parser_mem_initializer): Ditto.
6227 (cp_parser_template_parameter_list): Keep track of whether the
6228 template parameter is a template parameter pack.
6229 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6230 template parameter pack.
6231 (cp_parser_type_parameter): Ditto.
6232 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6234 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6235 this declarator is a parameter pack.
6236 (cp_parser_parameter_declaration): The ellipsis does not end the
6237 parameter declaration, because it might be a parameter pack. Parse
6238 the ellipsis to indicate a parameter pack.
6239 (cp_parser_initializer): Allow pack expansions.
6240 (cp_parser_initializer_list): Allow ellipsis to create an
6241 initializer expansion.
6242 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6244 (cp_parser_type_id_list): Allow ellipsis to create an exception
6245 specifier expansion.
6246 (cp_parser_attribute_list): Don't allow pack expansions.
6247 (cp_parser_functional_cast): Allow pack expansions.
6248 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6249 compute the length of a parameter pack.
6250 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6251 end a template argument.
6252 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6253 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6256 2007-03-09 Dirk Mueller <dmueller@suse.de>
6258 * call.c (build_new_op): Call warn_logical_operator.
6260 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6263 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6266 * pt.c (any_template_arguments_need_structural_equality_p):
6269 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6271 * decl.c (grokdeclarator): Disable warnings for anonymous
6274 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6276 * typeck2.c (readonly_error): Always emit a hard error.
6277 Remove last argument.
6278 * cp-tree.h (readonly_error): Adjust prototype.
6279 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6280 * typeck.c (build_unary_op): Likewise.
6281 (build_modify_expr): Likewise.
6283 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6286 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6288 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6291 * parser.c (struct cp_parser): New IN_IF_STMT.
6292 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6293 returning if parsing the body of an 'if' statement or issuing an
6294 error and continuing.
6295 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6297 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6299 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6302 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6305 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6307 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6308 Objective-C++. Don't exit early if -shared-libgcc needs to be
6311 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6313 * typeck.c (common_base_type): Delete unused function.
6315 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6317 * Make-lang.in: Add dummy lang.install-pdf target.
6319 2007-03-01 Simon Baldwin <simonb@google.com>
6322 * decl.c (check_tag_decl): Added new warning for typedef ignored
6323 when it precedes an otherwise valid non-typedef declaration.
6325 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6327 * typeck.c (build_function_call): Store converted arguments
6328 in a stack-allocated array instead of building a list.
6329 (convert_arguments): Store arguments in the array passed in as an
6330 argument, and return the actual number of arguments.
6331 * call.c (build_call): Delete, and replace with...
6332 (build_call_n, build_call_a): New.
6333 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6334 (build_over_call): Store converted arguments in a stack-allocated
6335 array instead of building a list.
6336 (build_cxx_call): Pass arguments in an array instead of as a list.
6337 (build_java_interface_fn_ref): Rewrite to avoid constructing
6339 * tree.h: Update declarations to reflect above changes.
6340 * method.c (use_thunk): Use a stack-allocated array to hold
6341 the arguments instead of a list.
6342 * rtti.c (throw_bad_cast): Update call to cxx_call.
6343 (throw_bad_typeid): Likewise.
6344 (build_dynamic_cast_1): Likewise.
6345 * init.c (build_builtin_delete_call): Use build_call_n.
6346 * decl.c (expand_static_init): Likewise.
6347 * except.c (cp_protect_cleanup_actions): Likewise.
6348 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6349 (gimplify_must_not_throw_expr): Likewise.
6350 (cxx_omp_apply_fn): Use build_call_a.
6352 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6354 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6355 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6357 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6359 * cp-tree.h (static_ctors): Remove.
6360 * cp-tree.h (static_dtors): Likewise.
6361 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6362 refactoring of tree_map hierarchy.
6363 (decl_shadowed_for_var_insert): Likewise.
6364 * semantics.c (expand_body): Use c_expand_body.
6365 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6366 * decl2.c (static_ctors): Remove.
6367 (static_dtors): Likewise.
6368 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6369 objc_generate_static_init_call. Do not call static_[cd]tors.
6370 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6372 (cp_write_global_declarations): Likewise.
6374 2007-02-23 Richard Guenther <rguenther@suse.de>
6376 * class.c (note_name_declared_in_class): Make declaration
6377 changes meaning a pedwarn.
6379 2007-02-22 Michael Matz <matz@suse.de>
6382 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6383 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6384 dump_function_decl): Guard emitting outer scopes by new flag.
6385 * cp-lang.c (cxx_dwarf_name): New function.
6386 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6387 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6389 (push_template_decl_real, lookup_template_class): Remove calls
6392 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6394 * call.c (build_new_method_call): Ensure that explicit calls of
6395 destructors have type "void".
6397 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6399 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6400 and -Walways-true with -Waddress.
6401 * cvt.c (convert_to_void): Replace unconditional warning with
6404 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6406 * decl.c, tree.c: Fix comment typos.
6408 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6411 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6412 statement expression if we had an error mark node.
6414 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6415 Brooks Moses <brooks.moses@codesourcery.com>
6416 Lee Millward <lee.millward@codesourcery.com>
6418 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6419 Change class to tcc_vl_exp.
6421 * call.c (build_call): Use build_call_list instead
6423 (build_over_call): Likewise.
6424 (build_new_method_call): Use build_min_non_dep_call_list
6425 instead of build_min_non_dep.
6427 * error.c (dump_call_expr_args): New function.
6428 (dump_aggr_init_expr_args): New function.
6429 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6430 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6432 * cvt.c (convert_to_void): Use build_call_array instead
6433 of build3; use new AGGR_INIT_EXPR accessor macros.
6435 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6436 instead of TREE_CODE_LENGTH.
6438 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6439 AGGR_INIT_EXPR accessor macros.
6441 * cp-gimplify.c (cp_gimplify_init_expr): Use
6442 AGGR_INIT_EXPR_SLOT to set the slot operand.
6444 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6445 (AGGR_INIT_EXPR_SLOT): New macro.
6446 (AGGR_INIT_EXPR_ARG): New macro.
6447 (aggr_init_expr_nargs): New macro.
6448 (AGGR_INIT_EXPR_ARGP): New macro.
6449 (aggr_init_expr_arg_iterator): New.
6450 (init_aggr_init_expr_arg_iterator): New.
6451 (next_aggr_init_expr_arg): New.
6452 (first_aggr_init_expr_arg): New.
6453 (more_aggr_init_expr_args_p): New.
6454 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6455 (stabilize_aggr_init): New declaration.
6456 (build_min_non_dep_call_list): Likewise.
6458 * tree.c (process_aggr_init_operands): New function.
6459 (build_aggr_init_array) New function.
6460 (build_cplus_new): Update to use new CALL_EXPR and
6461 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6462 build_aggr_init_array.
6463 (build_min_non_dep_call_list) New function.
6464 (build_min_nt): Assert input code parameter is not a variable
6465 length expression class.
6466 (build_min, build_min_non_dep): Likewise.
6467 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6468 to check for equality instead of recursing. Handle tcc_vl_exp
6470 (stabilize_call): Update to only handle CALL_EXPRs, not
6471 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6472 (stabilize_aggr_init): New function.
6473 (stabilize_init): Use it.
6475 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6476 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6477 AGGR_INIT_EXPR accessor macros and argument iterators.
6479 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6480 build_vl_exp. Iterate through the operands, recursively
6481 processing each one.
6482 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6483 CALL_EXPR accessor macros.
6484 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6485 tree code classes. Use TREE_OPERAND_LENGTH instead of
6488 * semantics.c (finish_call_expr): Use build_nt_call_list
6489 instead of build_nt.
6490 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6491 accessor macros. Use build_call_array to construct the
6492 CALL_EXPR node instead of build3
6494 * decl2.c (build_offset_ref_call_from_tree): Use
6495 build_nt_call_list and build_min_non_dep_call_list instead
6496 of build_min_nt and build_min_non_dep.
6498 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6499 Use build_nt_call_list instead of build_min_nt.
6501 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6504 * call.c (build_conditional_expr): Improve error message.
6506 2007-02-13 Dirk Mueller <dmueller@suse.de>
6508 * friend.c (do_friend): Annotate warning about friend
6509 declarations in templates with OPT_Wnon_template_friend.
6510 Convert informal message from warning() to inform().
6512 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6513 Mark Mitchell <mark@codesourcery.com>
6516 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6517 instantiations for variables.
6519 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6522 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6523 Check warn_unused_value just once.
6525 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6528 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6529 (fn_type_unificiation): Likewise.
6530 (get_bindings): Likewise.
6532 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6535 * decl.c (finish_function): Use DECL_REPLACEABLE.
6536 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6538 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6540 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6542 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6544 * decl.c (grokvardecl): Don't error if !have_tls.
6545 (grokdeclarator): Likewise.
6546 * parser.c (cp_parser_omp_threadprivate): Likewise.
6548 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6551 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6552 parameters and result decls in omp clauses.
6553 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6556 2007-02-05 Dirk Mueller <dmueller@suse.de>
6559 * parser.c (cp_parser_class_specifier): Always initialize bases.
6561 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6563 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6564 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6565 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6567 * semantics.c (finish_omp_atomic): Store a whole expression node
6568 in operand 1, and integer_zero_node in operand 0, for dependent
6569 OMP_ATOMIC. Rewrite to make flow easier to understand.
6571 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6573 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6575 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6577 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6578 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6580 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6582 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6583 keyword warning to -Wc++0x-compat.
6585 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6587 * decl.c (grokdeclarator): Update documentation.
6589 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6592 * decl.c (grokdeclarator): If __thread is used together with
6593 a storage class other than extern and static, clear thread_p
6594 after issuing diagnostics and fall through to checking the
6597 2007-01-30 Roger Sayle <roger@eyesopen.com>
6599 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6600 calculating the size of an array (to avoid recursive errors).
6602 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6605 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6607 * call.c (convert_like_real): Don't warn when converting to
6610 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6612 * decl.c (pop_label): Replace warning with call to
6613 warn_for_unused_label.
6615 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6618 * semantics.c (finish_pseudo_destructor_expr): Check the
6619 destrutor name by calling check_dtor_name.
6621 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6623 * lex.c (D_CPP0X): Rename.
6625 (reswords): D_CPP0X -> D_CXX0X.
6626 (init_reswords): Ditto.
6627 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6628 of C++0x keywords as identifiers.
6630 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6633 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6636 2007-01-23 Ian Lance Taylor <iant@google.com>
6638 * typeck.c (convert_for_assignment): Only warn about a = b = c
6639 when converting to bool.
6641 2007-01-23 Roger Sayle <roger@eyesopen.com>
6643 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6645 * typeck.c (ignore_overflows): Remove the remaining uses of
6646 TREE_CONSTANT_OVERFLOW.
6648 2007-01-20 Jan Hubicka <jh@suse.cz>
6650 * decl2.c (start_objects, start_static_storage_duration_function):
6651 Do not make the functions uninlinable.
6653 2007-01-17 Ian Lance Taylor <iant@google.com>
6655 * class.c (add_method): Call VEC_reserve_exact rather than passing
6656 a negative size to VEC_reserve.
6658 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6661 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6663 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6666 * decl.c (make_typename_type): If the qualified name is not a
6667 type, issue an error.
6668 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6671 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6673 * rtti.c: Include target.h.
6674 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6675 don't emit typeinfo for fundamental types as weak.
6676 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6678 2007-01-08 Richard Guenther <rguenther@suse.de>
6680 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6682 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6684 * call.c (standard_conversion): Pass flag to
6685 vector_types_convertible_p to disallow emission of note.
6686 * typeck.c (convert_for_assignment): Pass flag to
6687 vector_types_convertible_p to allow emission of note.
6688 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6689 to disallow emission of note.
6691 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6694 * typeck.c (build_binary_op): Call overflow_warning if
6695 TREE_OVERFLOW_P is true for the result and not for any of the
6698 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6701 * class.c (add_method): Don't wait until template
6702 instantiation time to complain about duplicate methods.
6704 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6707 * semantics.c (finish_unary_op_expr): Warn only if result
6708 overflowed and operands did not.
6710 2007-01-05 Ian Lance Taylor <iant@google.com>
6712 * typeck.c (build_binary_op): Warn about comparing a non-weak
6715 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6717 * pt.c (tsubst): Propagate the need for structural equality checks
6718 when reducing the level of template parameters.
6720 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6722 * pt.c: Fix a comment typo.
6724 2007-01-02 Ian Lance Taylor <iant@google.com>
6726 * semantics.c (maybe_convert_cond): Optionally warn when using an
6727 assignment as a condition.
6728 * typeck.c (convert_for_assignment): Optionally warn about
6729 assigning the result of an assignment to a bool.
6731 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6733 * pt.c (canonical_template_parms): Correct typo in comment.
6735 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6737 * typeck.c (structural_comptypes): Renamed from "comptypes".
6738 (comptypes): Use canonical type information to perform fast type
6739 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6740 canonical type comparison returns the same results as we would see
6741 from the current, structural check. Support COMPARE_STRUCTURAL
6742 when we need structural checks.
6743 * decl.c (typename_compare): Fix comment.
6744 (build_typename_type): TYPENAME_TYPE nodes require structural
6745 equality checks, because they resolve different based on the
6747 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6748 require structural equality checks (for now).
6749 (build_ptrmemfunc_type): Build the canonical pointer to member
6751 (compute_array_index_type): Whenever we build a new index type
6752 to represent the size of an array in a template, we need to mark
6753 this index type as requiring structural equality. This goes for
6754 arrays with value-dependent sizes with the current ABI, or all
6756 * tree.c (cplus_array_hash): New.
6757 (struct cplus_array_info): New.
6758 (cplus_array_compare): New.
6759 (cplus_array_htab): New.
6760 (build_cplus_array_type_1): Use a hash table to cache the array
6761 types we build. Build the canonical array type for each array
6763 (cp_build_qualified_type_real): When building a cv-qualified array
6764 type, use the hash table of array types and build canonical array
6766 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6767 use structural equality (for now).
6768 * cp-tree.h (COMPARE_STRUCTURAL): New.
6769 * pt.c (canonical_template_parms): New.
6770 (canonical_type_parameter): New.
6771 (process_template_parm): Find the canonical type parameter.
6772 (lookup_template_class): When we have named the primary template
6773 type, set the canonical type for our template class to the primary
6774 template type. If any of the template arguments need structural
6775 equality checks, the template class needs structural equality
6777 (tsubst): When reducing the level of a template template
6778 parameter, we require structural equality tests for the resulting
6779 parameter because its template parameters have not had their types
6780 canonicalized. When reducing a template type parameter, find the
6781 canonical reduced type parameter.
6782 (any_template_arguments_need_structural_equality_p): New.