1 2009-02-03 Jakub Jelinek <jakub@redhat.com>
4 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
7 * typeck2.c (digest_init_r): Don't call process_init_constructor
10 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
13 * pt.c (convert_nontype_argument_function): Expect expr to be an
17 * typeck.c (merge_types): Call resolve_typename_type if only
18 one type is a typename.
20 2009-02-02 Jason Merrill <jason@redhat.com>
23 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
26 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
29 * parser.c (cp_parser_pure_specifier): If there are no tokens left
30 do not call cp_lexer_consume_token.
32 2009-01-30 Jakub Jelinek <jakub@redhat.com>
35 * parser.c (cp_parser_already_scoped_statement): Handle __label__
38 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
41 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
43 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
46 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
48 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
50 * typeck.c (invalid_nonstatic_memfn_p): Use
51 DECL_NONSTATIC_MEMBER_FUNCTION_P.
53 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
56 * call.c (build_over_call): If convert_for_arg_passing returns
57 error_mark_node unconditionally return it.
59 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
61 * class.c (check_field_decls): Also inherit packed for bitfields
62 regardless of their type.
64 2009-01-22 Dodji Seketeli <dodji@redhat.com>
67 * decl2.c (grokfield): Reverting changes of PR c++/26693
68 (save_template_attributes): Likewise.
69 * decl.c (grokdeclarator): Likewise.
70 * name-lookup.c (pushdecl_maybe_friend): Likewise.
71 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
72 (append_type_to_template_for_access_check): Likewise.
73 * semantics.c (check_accessibility_of_qualified_id): Likewise.
74 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
76 (resolve_type_name_type): Likewise.
77 (append_type_to_template_for_access_check): Likewise.
79 2009-01-21 Dodji Seketeli <dodji@redhat.com>
82 * decl2.c (grokfield): when a typedef appears in a
83 class, create the typedef variant type node for it.
84 (save_template_attributes): Creating typedef variant type node
86 * decl.c (grokdeclarator): If the typedef'ed struct/class was
87 anonymous, set the proper type name to all its type variants.
88 * name-lookup.c (pushdecl_maybe_friend): Reuse the
89 set_underlying_type function to install typedef variant types.
90 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
92 (append_type_to_template_for_access_check): New entry points.
93 * semantics.c (check_accessibility_of_qualified_id):
94 When a typedef that is a member of a class appears in a template,
95 add it to the template. It will be ...
96 * pt.c (instantiate_class_template, instantiate_template ): ... access
97 checked at template instantiation time.
98 (tsubst): Handle the case of being called with NULL args.
99 (resolve_type_name_type): The type name should be the name of the
101 (append_type_to_template_for_access_check): New entry point.
103 2009-01-19 Jason Merrill <jason@redhat.com>
106 * parser.c (cp_parser_unqualified_id): In a template,
108 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
110 2009-01-16 Jason Merrill <jason@redhat.com>
113 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
114 * init.c (build_new): Don't call describable_type unless we
118 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
121 * search.c (protected_accessible_p): N doesn't vary.
123 2009-01-15 Jason Merrill <jason@redhat.com>
126 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
127 accept hidden friends.
129 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
132 * decl.c (grokdeclarator): Check for a non namespace/class context.
134 2009-01-15 Jason Merrill <jason@redhat.com>
138 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
139 a function isn't necessarily an lvalue. Take tree, not const_tree.
140 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
141 * typeck.c (lvalue_or_else): Likewise.
142 * cp-tree.h: Adjust prototypes.
144 2009-01-15 Steve Ellcey <sje@cup.hp.com>
147 * pt.c (tsubst): Check for NULL args.
149 2009-01-15 Dodji Seketeli <dodji@redhat.com>
152 * name-lookup.c (pushtag): Don't create members to types that are not
155 2009-01-14 Nick Clifton <nickc@redhat.com>
158 * parser.c: Pass cp_id_kind computed in
159 cp_parser_postfix_dot_deref_expression to
160 cp_parser_primary_expression.
162 2009-01-13 Jakub Jelinek <jakub@redhat.com>
165 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
166 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
169 2009-01-12 Jason Merrill <jason@redhat.com>
170 Steve Ellcey <sje@cup.hp.com>
173 * name-lookup.c (lookup_name_real): Keep looking past a hidden
176 2009-01-12 Dodji Seketeli <dodji@redhat.com>
179 * pt.c (parameter_of_template_p): New function.
180 * cp-tree.h: Declare it.
181 * name-lookup.c (binding_to_template_parms_of_scope_p): New
183 (outer_binding): Take template parameters in account when looking for
186 2009-01-12 Jason Merrill <jason@redhat.com>
189 * tree.c (pod_type_p): Return 1 for structs created by the back end.
191 2009-01-12 Jakub Jelinek <jakub@redhat.com>
194 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
195 offsetof member-designator, handle it as `[0].'.
198 * decl.c (start_function): If grokdeclarator hasn't returned
199 FUNCTION_DECL nor error_mark_node, issue diagnostics.
201 2009-01-11 Jakub Jelinek <jakub@redhat.com>
204 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
205 (gimplify_if_stmt): ... this.
206 (cp_gimplify_expr): Don't handle IF_STMT here.
207 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
209 2009-01-10 Andrew Pinski <pinskia@gmail.com>
212 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
215 * typeck2.c (build_functional_cast): Check for reference type and NULL
218 2009-01-09 Steve Ellcey <sje@cup.hp.com>
220 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
222 2009-01-09 Jakub Jelinek <jakub@redhat.com>
225 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
227 2009-01-09 John F. Carr <jfc@mit.edu>
230 * parser.c (cp_parser_class_specifier): Clear
231 parser->in_unbraced_linkage_specification_p while parsing class
234 2009-01-07 Jakub Jelinek <jakub@redhat.com>
237 * semantics.c (finish_goto_stmt): Convert destination to
240 2009-01-06 Jason Merrill <jason@redhat.com>
247 * pt.c (check_default_tmpl_args): Don't complain about
248 out-of-order parameter packs in the enclosing class
249 or parameter packs after default args.
250 (coerce_template_parms): If we have more than one
251 parameter pack, don't flatten argument packs.
252 (template_args_equal): Handle argument packs.
253 (comp_template_args): Don't flatten argument packs.
254 (check_instantiated_arg): Split out from...
255 (check_instantiated_args): Here. Handle arg packs.
256 (convert_template_argument): Just check that nontype argument
257 packs have the right type.
259 2009-01-05 Dodji Seketeli <dodji@redhat.com>
262 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
264 2009-01-05 Jason Merrill <jason@redhat.com>
267 * typeck2.c (process_init_constructor_union): Handle union with
270 * mangle.c (write_expression): Remove mangling for zero-operand
274 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
278 * class.c (defaultable_fn_p): Only operator== can be a copy
281 2009-01-02 Jason Merrill <jason@redhat.com>
284 * typeck2.c (process_init_constructor_union): Handle excess
286 (process_init_constructor_record): Likewise.
289 * typeck2.c (digest_init_r): Don't use process_init_constructor
290 for non-aggregate classes.
292 2008-12-31 Jakub Jelinek <jakub@redhat.com>
295 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
296 Return error_mark_node if cp_parser_non_integral_constant_expression
300 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
302 2008-12-29 Jakub Jelinek <jakub@redhat.com>
305 * parser.c (cp_parser_condition): Use cp_parser_require
306 instead of cp_lexer_consume_token to consume =.
309 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
311 2008-12-28 Jakub Jelinek <jakub@redhat.com>
314 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
315 around volatile iteration var in condition and/or increment
318 2008-12-27 Jakub Jelinek <jakub@redhat.com>
321 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
324 2008-12-21 Jason Merrill <jason@redhat.com>
327 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
329 2008-12-20 Jakub Jelinek <jakub@redhat.com>
330 Manuel López-Ibáñez <manu@gcc.gnu.org>
333 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
334 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
337 2008-12-19 Jakub Jelinek <jakub@redhat.com>
340 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
343 2008-12-18 Jakub Jelinek <jakub@redhat.com>
346 * init.c (perform_member_init): For value-initialized
347 references call permerror instead of warning and don't emit any
350 2008-12-18 Jason Merrill <jason@redhat.com>
353 * parser.c (cp_parser_token_starts_cast_expression): An EOF
354 can't start a cast-expression.
356 2008-12-17 Jason Merrill <jason@redhat.com>
358 * semantics.c (describable_type): New function.
359 (finish_decltype_type): Use it for dependent exprs.
360 * cp-tree.h: Declare it.
361 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
362 (write_expression): If skip_evaluation, use type stubs.
363 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
364 declarations of a function.
365 * init.c (build_new): Do auto deduction if type is describable.
366 * decl.c (cp_finish_decl): Likewise.
367 * parser.c (cp_parser_omp_for_loop): Likewise.
369 2008-12-10 Jason Merrill <jason@redhat.com>
372 * mangle.c (write_builtin_type): Add mangling for decimal floating
373 point and fixed point types.
374 (write_type): Pass FIXED_POINT_TYPE along.
376 2008-12-09 Mark Mitchell <mark@codesourcery.com>
379 * class.c (resolve_address_of_overloaded_function): Check
380 accessibility of member functions unless FLAGS indicates
382 * call.c (standard_conversion): Adjust flags passed to
384 (convert_default_arg): Do not perform access checks.
385 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
387 2008-12-08 Steve Ellcey <sje@cup.hp.com>
389 * decl2.c (mark_used): Remove assemble_external call.
391 2008-12-08 Dodji Seketeli <dodji@redhat.com>
394 * name-lookup.c (kept_level_p): Don't forget the case of levels
395 having using directives.
397 2008-12-08 Richard Henderson <rth@redhat.com>
400 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
401 * decl.c (record_unknown_type): Likewise.
402 (start_enum, finish_enum): Likewise.
404 2008-12-05 Jakub Jelinek <jakub@redhat.com>
407 * error.c (dump_expr): Handle BIT_FIELD_REF.
409 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
412 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
415 2008-12-04 Jason Merrill <jason@redhat.com>
418 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
420 * class.c (check_bases_and_members): Rather than assuming any
421 user-declared default constructor is complex here.
423 2008-12-04 Richard Guenther <rguenther@suse.de>
426 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
427 pointer access with TREE_NO_WARNING.
429 2008-12-03 Jason Merrill <jason@redhat.com>
432 * init.c (build_value_init): Do initial zero-initialization
433 of a class with an implicitly-defined constructor using
434 build_zero_init rather than in build_value_init.
435 (build_value_init_1): Fold into build_value_init.
438 * parser.c (cp_parser_conversion_type_id): Diagnose
439 'operator auto' here.
440 * decl.c (grokdeclarator): Not here.
443 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
444 on explicit constructors.
445 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
446 CONSTRUCTOR_IS_DIRECT_INIT.
448 2008-12-02 Jason Merrill <jason@redhat.com>
450 PR c++/35782, c++/37860
451 * call.c (build_user_type_conversion_1): Remember
453 (convert_like_real): Likewise.
454 (build_over_call): Don't require the copy constructor
455 for copy-list-initialization.
456 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
459 * decl.c (cp_finish_decl): Handle =default and =delete for
462 2008-12-01 Jakub Jelinek <jakub@redhat.com>
465 * parser.c (cp_parser_omp_for_loop): Handle auto.
466 * pt.c (tsubst_omp_for_iterator): Likewise.
468 2008-11-28 Jason Merrill <jason@redhat.com>
471 * init.c (perform_member_init): Fix value-initialization.
472 (build_value_init_1): Add assert to catch cases that will break
474 (build_default_init): Remove.
475 * cp-tree.h: Remove its prototype.
476 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
477 value-initialization.
480 * parser.c (cp_parser_class_name): Only call
481 maybe_note_name_used_in_class if we actually found a class name.
483 2008-11-25 Jason Merrill <jason@redhat.com>
486 * decl2.c (check_classfn): Error rather than abort on parameter
489 2008-11-20 Jason Merrill <jason@redhat.com>
492 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
495 * call.c (build_over_call): Take the address of the function even
497 (build_new_method_call): Remember the type of the called function
500 2008-11-19 Dodji Seketeli <dodji@redhat.com>
503 * pt.c (coerce_template_template_parm): Use the more robust
504 uses_template_parms instead of dependent_type_p.
506 2008-11-19 Dodji Seketeli <dodji@redhat.com>
509 * pt.c (lookup_template_class): Check pointers before dereferencing
511 * error.c (dump_template_decl): Likewise.
513 2008-11-19 Jason Merrill <jason@redhat.com>
516 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
517 that names a class for linkage purposes.
520 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
521 name is not a declaration.
524 * pt.c (instantiate_decl): Don't require a definition of
525 a template that is explicitly instantiated 'extern'.
527 2008-11-18 Jason Merrill <jason@redhat.com>
528 Jakub Jelinek <jakub@redhat.com>
531 * parser.c (cp_parser_type_id): Complain about auto.
532 * decl.c (grokdeclarator): Complain about parameters and
533 conversion functions declared with auto.
535 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
537 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
539 2008-11-17 Jakub Jelinek <jakub@redhat.com>
542 * init.c (constant_value_1): Handle TREE_LIST init.
544 2008-11-15 Jakub Jelinek <jakub@redhat.com>
547 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
548 argtype instead of result_type.
550 2008-11-14 Jason Merrill <jason@redhat.com>
553 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
554 for a non-dependent call.
557 * call.c (build_aggr_conv): Increment i.
559 2008-11-13 Jason Merrill <jason@redhat.com>
562 * typeck2.c (process_init_constructor_record): Update bitfield
564 (check_narrowing): Update bitfield handling, print source type.
566 2008-11-12 Jakub Jelinek <jakub@redhat.com>
570 2007-05-07 Mike Stump <mrs@apple.com>
571 * parser.c (check_empty_body): Add.
572 (cp_parser_iteration_statement): Add call to check_empty_body.
574 2008-11-12 Jason Merrill <jason@redhat.com>
577 * typeck.c (cp_build_modify_expr): Update bitfield handling.
579 2008-11-12 Jakub Jelinek <jakub@redhat.com>
582 * parser.c (cp_parser_simple_declaration): Don't commit
583 to tentative parse if parse errors were seen.
586 * error.c (dump_expr): Handle COMPLEX_EXPR.
588 2008-11-10 Jakub Jelinek <jakub@redhat.com>
591 * parser.c (cp_parser_enum_specifier): After parsing :,
592 parse definitely. Don't return early if type specifier
595 2008-11-06 David Edelsohn <edelsohn@gnu.org>
598 * g++spec.c (LIBSTDCXX_STATIC): New.
599 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
602 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
605 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
608 2008-11-05 Richard Guenther <rguenther@suse.de>
611 * decl.c (start_preparsed_function): Use the correct type for
612 building the RESULT_DECL.
614 2008-10-31 Jakub Jelinek <jakub@redhat.com>
617 * decl.c (grokdeclarator): Diagnose auto function decl without
618 late return type and late return type function decl where type
622 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
625 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
628 * class.c (check_bitfield_decl): Rename min_precision to
629 tree_int_cst_min_precision.
630 * decl.c (finish_enum): Likewise.
632 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
635 * parser.c (cp_parser_token_starts_cast_expression): New.
636 (cp_parser_cast_expression): Peek the next token to decide whether
637 this could be a parenthesized constructor or is definitely an
640 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
643 * typeck.c (build_x_binary_op): Update call to
644 warn_about_parentheses.
645 * parser.c (cp_parser_binary_expression): Add note about passing
646 the correct code for unary expressions.
648 2008-10-24 Jakub Jelinek <jakub@redhat.com>
650 * Make-lang.in (check-c++-subtargets): New alias for
651 check-g++-subtargets.
652 (lang_checks_parallelized): Add check-g++.
653 (check_g++_parallelize): New variable.
655 2008-10-21 Richard Guenther <rguenther@suse.de>
657 * semantics.c (simplify_aggr_init_exprs_r): Remove.
658 (expand_or_defer_fn): Do not walk the function body to
659 simplify aggr_init_exprs.
661 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
664 * typeck.c (cp_common_type): New. The same as
665 type_after_usual_arithmetic_conversions but without promotions.
666 (type_after_usual_arithmetic_conversions): Do the promotions and
668 (common_type): Make it behave like the C version of this
669 function. Do not handle pointer types.
670 (common_pointer_type): Move handling of pointer types from
672 (cp_build_binary_op): Use common_pointer_type instead of
673 common_type in call to pointer_diff.
674 Use cp_common_type instead of common_type.
675 * cp-tree.h (common_pointer_type): Declare.
677 2008-10-14 Jakub Jelinek <jakub@redhat.com>
680 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
681 arguments if they don't already have COND_EXPR's type.
683 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
686 * pt.c (push_template_decl_real): Check that current_template_parms
688 (process_partial_specialization): Assert current_template_parms not
691 2008-10-13 Doug Evans <dje@google.com>
693 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
695 2008-10-10 Jakub Jelinek <jakub@redhat.com>
698 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
701 2008-10-09 Jakub Jelinek <jakub@redhat.com>
704 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
705 setting it to error_mark_node.
707 2008-10-07 Steve Ellcey <sje@cup.hp.com>
709 * decl.c (start_cleanup_fn): Declare as inline.
711 2008-10-06 Jason Merrill <jason@redhat.com>
713 PR c++/37376, other mangling issues
714 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
715 (write_member_name): Break out from...
716 (write_expression): ...here. Handle dependent COMPONENT_REF.
717 (write_template_arg): Wrap an argument pack in 'I'/'E'.
718 (write_builtin_type): Update char16/32_t mangling.
719 (write_nested_name, write_prefix): Don't forget template args
721 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
724 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
726 * typeck.c (build_x_indirect_ref): Add location argument.
727 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
728 (cp_build_unary_op): Add location argument.
729 (cp_build_modify_expr): Same.
730 * class.c (build_base_path): Pass location to build_indirect_ref.
731 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
734 2008-10-05 Dodji Seketeli <dodji@redhat.com>
737 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
738 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
739 of the innermost containing BLOCK.
741 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
744 * error.c (dump_function_decl): Save the exceptions in case of
745 error about incompatible specifications in a specialization.
747 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
749 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
751 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
754 * parser.c (cp_parser_selection_statement): Fix uninitialized
757 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
761 * decl.c (grokdeclarator): Set the type for typedefs to a
762 nested-name-specifier to error_mark_node.
764 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
766 * parser.c (cp_parser_selection_statement): Implement here the
767 -Wempty-body warning for `if' and `else' statements.
768 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
770 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
773 * name-lookup.c (maybe_process_template_type_declaration): Check
774 return value of push_template_decl_real for error_mark_node.
776 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
778 * semantics.c (finish_fname): Pass location to fname_decl.
780 2008-09-23 Jakub Jelinek <jakub@redhat.com>
783 * semantics.c (finish_omp_for): If processing_template_decl, just build
784 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
786 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
788 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
789 (get_member_function_from_ptrfunc): Same.
790 (build_x_binary_op): Same.
791 (build_binary_op): Same.
792 (cp_build_binary_op): New location argument.
793 (pointer_diff): Pass location to cp_build_binary_op.
794 (cp_truthvalue_conversion): Pass location to build_binary_op.
795 (convert_ptrmem): Pass location to cp_build_binary_op.
796 (cp_build_modify_expr): Same.
797 (build_ptrmemfunc): Same.
798 * init.c (expand_cleanup_for_base): Pass location to
799 c_common_truthvalue_conversion.
800 (build_new_1): Pass location to cp_build_binary_op.
801 (build_vec_delete_1): Pass location to *build_binary_op,
802 c_common_truthvalue_conversion.
803 (build_vec_init): Same.
804 (build_delete): Same.
805 * decl.c (compute_array_index_type): Same.
806 * call.c (build_new_op): Same.
807 * rtti.c (build_dynamic_cast_1): Same.
808 * cp-tree.h: Add argument to cp_build_binary_op.
809 * semantics.c (handle_omp_for_class_iterator): Pass location to
810 *build_binary_op, c_common_truthvalue_conversion.
811 * decl2.c (get_guard_cond): Same.
813 2008-09-17 Richard Guenther <rguenther@suse.de>
816 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
817 result to the correct type.
819 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
822 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
823 parameter for duplicate.
825 2008-09-17 Jason Merrill <jason@redhat.com>
828 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
830 2008-09-17 Jakub Jelinek <jakub@redhat.com>
833 * typeck.c (build_array_ref): Use protected_set_expr_location instead
834 of SET_EXPR_LOCATION when ret might not be an expression.
836 2008-09-17 Jan Hubicka <jh@suse.cz>
839 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
841 2008-09-16 Jakub Jelinek <jakub@redhat.com>
844 * semantics.c (finish_compound_literal): Return error_mark_node if
848 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
851 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
853 * decl.c (duplicate_decls): Call error_at.
854 (grokfndecl): New location argument. Use location if available.
855 (grokdeclarator): Pass declarator location to grokfndecl.
856 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
857 * decl2.c (check_classfn): Use error_at.
858 * parser.c (cp_parser_init_declarator): Set function_start_locus
860 (cp_parser_member_declaration): Set id_loc for function declarators.
862 2008-09-09 Jan Hubicka <jh@suse.cz>
865 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
867 2008-09-09 Jakub Jelinek <jakub@redhat.com>
870 * tree.c (array_type_nelts_top): Add size_one_node instead of
873 2008-09-09 Jason Merrill <jason@redhat.com>
876 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
879 2008-09-09 Jakub Jelinek <jakub@redhat.com>
882 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
883 being error_operand_p. Don't clear value if it was error_mark_node.
885 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
887 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
888 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
889 * semantics.c (anon_aggr_type_p): Remove.
891 2008-09-06 Jason Merrill <jason@redhat.com>
894 * parser.c (cp_parser_parameter_declaration_list): Process the
895 PARM_DECLs as we go and push them. Return a TREE_LIST.
896 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
897 (cp_parser_direct_declarator): Create a binding level and
898 suppress deprecated warnings in the parameter list.
899 (make_call_declarator): PARMS is now a tree.
900 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
901 * decl.h (enum deprecated_states, deprecated_state): Move here.
903 (type_is_deprecated): New fn.
904 (grokparms): PARMLIST is a tree now. Warn about parms that
905 use deprecated types.
906 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
908 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
909 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
911 * name-lookup.c (pushtag): Look through function parameter scopes.
912 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
913 when we're parsing a function declarator.
915 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
918 * tree.c (cp_build_qualified_type_real): Deal with sharing of
919 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
922 2008-09-04 Ian Lance Taylor <iant@google.com>
924 * parser.c (check_no_duplicate_clause): Change code parameter to
925 enum omp_clause_code.
927 2008-09-03 Jakub Jelinek <jakub@redhat.com>
930 * decl.c (cp_finish_decl): Only set
931 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
934 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
936 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
937 deferred_mark_used_calls vector and exit early.
938 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
940 (finish_function): Set defer_mark_used_calls for the duration of the
941 function. Call mark_used on any queued decls.
943 2008-09-02 Jason Merrill <jason@redhat.com>
946 * call.c (build_over_call): Make =delete work with SFINAE.
947 * class.c (resolve_address_of_overloaded_function): Likewise.
949 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
950 threadprivate_or_deleted_p.
951 (CP_DECL_THREADPRIVATE_P): Adjust.
952 (DECL_DELETED_FN): Likewise.
953 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
954 (SD_DELETED): New macro.
955 * parser.c (cp_parser_init_declarator): Use them.
956 * decl.c (start_decl): Use them.
958 * decl2.c (mark_used): Give =deleted error even in sizeof.
960 * typeck2.c (check_narrowing): Downgrade narrowing error to
963 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
965 * typeck.c (build_array_ref): Use new location argument.
966 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
967 * call.c (build_new_op): Same.
968 * decl2.c (grok_array_decl): Same.
969 * cp-tree.h (build_array_ref): Add location argument to prototype.
971 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
973 * typeck.c (build_x_indirect_ref): Add location argument.
974 * class.c (build_base_path): Pass location to build_indirect_ref.
975 * pt.c (tsubst_copy_and_build): Pass location to
976 finish_label_address_expr.
977 * parser.c (cp_parser_unary_expression): Same.
979 2008-08-31 Jason Merrill <jason@redhat.com>
981 Implement late-specified return type using 'auto'.
982 * cp-tree.h (struct cp_declarator): Add late_return_type field to
984 * parser.c (cp_parser_late_return_type_opt): New fn.
985 (cp_parser_direct_declarator): Use it.
986 (make_call_declarator): Put it in the declarator.
987 * decl.c (grokdeclarator): Splice in late-specified return type.
988 * pt.c (splice_late_return_type): New fn.
990 2008-08-29 Michael Meissner <gnu@the-meissners.org>
992 * decl.c (builtin_function_1): Take a bool argument to decide
993 whether to use pushdecl or pushdecl_top_level.
994 (duplicate_decls): Copy function specific target and optimization
995 options on duplicate declarations.
996 (cxx_builtin_function): Update builtin_function_1 call.
997 (cxx_builtin_function_ext_scope): New function, guarantee that the
998 declaration is done at global scope.
1000 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
1001 macro, define builtin function hook for delayed machine specific
1004 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
1006 2008-08-30 Jason Merrill <jason@redhat.com>
1009 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
1011 2008-08-29 Jason Merrill <jason@redhat.com>
1013 Implement C++0x 'auto' semantics.
1014 * decl.c (start_decl_1): Don't complain about auto being incomplete.
1015 (cp_finish_decl): Deduce auto.
1016 * init.c (build_new): Handle 'new auto'.
1017 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
1018 message for auto than for normal template type parms.
1019 * pt.c (type_dependent_expression_p): Handle { }.
1020 (make_auto): New function.
1021 (listify_autos): New function.
1022 (do_auto_deduction): New function.
1023 (is_auto): New function.
1024 (type_uses_auto): New function.
1025 * cp-tree.h: Declare them.
1026 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
1027 treat auto as a declspec.
1028 (cp_parser_simple_type_specifier): It's a type-specifier.
1030 2008-08-29 Mark Mitchell <mark@codesourcery.com>
1032 * mangle.c (write_type): Add target-specific manglings for
1033 non-fundamental types to the substitution table.
1036 2008-08-29 Jakub Jelinek <jakub@redhat.com>
1040 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
1041 Adjust debug_hooks->imported_module_or_decl callers.
1043 2008-08-29 Jan Hubicka <jh@suse.cz>
1045 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
1047 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1050 * decl.c (reshape_init_r): Check init for error_mark_node.
1052 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1055 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
1056 (finish_return_stmt): Likewise.
1057 (finish_switch_condition): Likewise.
1059 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1061 * cp-tree.h: Fix #error directive.
1063 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
1065 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
1066 usual arithmetic conversions on scoped enumeration types.
1067 (common_type): Ditto.
1068 (default_conversion): Don't perform integral promotions on scoped
1070 (build_array_ref): Scoped enumeration types can't be used as
1072 * decl.c (start_enum): If building a C++0x scoped enumeration,
1073 enter its scope. If provided with an underlying type, check that
1074 underlying type and set up the enumeration type accordingly.
1075 (finish_enum): Only compute an underlying type if the underlying
1076 type isn't already fixed, and only convert the enumerator values
1077 now if we've just computed the underlying type. Finish the scope
1078 of C++0x scoped enumerations.
1079 (build_enumerator): For enumerations with a fixed underlying type,
1080 check the enumerator values when the enumerator is defined.
1081 (lookup_enumerator): New.
1082 * call.c (standard_conversion): Don't allow assignment from
1083 integers to scoped enumeration types, even with -fpermissive.
1084 Don't convert from scoped enumerations to bool or any arithmetic
1086 (build_conditional_expr): Don't per the usual arithmetic
1087 conversions for scoped enumeration types.
1088 (convert_like_real): Check complain to see if we should
1090 * error.c (class_key_or_enum_as_string): Print scoped enums.
1091 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1093 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1094 (SCOPED_ENUM_P): New.
1095 (UNSCOPED_ENUM_P): New.
1096 (SET_SCOPED_ENUM_P): New.
1097 (ENUM_UNDERLYING_TYPE): New.
1098 * pt.c (lookup_template_class): Update the instantiation of enum
1099 types to deal with C++0x scoped enumerations and underlying
1101 * name-lookup.c (begin_scope): Deal with scoped enumeration
1103 (lookup_qualified_name): Deal with lookup into enumeration types.
1104 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1105 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1106 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1107 parse a type-name that can be an enumeration type.
1108 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1109 (cp_parser_elaborated_type_specifier): Parse the
1110 optional `struct' or `class' following enum (in C++0x).
1111 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1114 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1116 * typeck.c: Update all calls to pedwarn.
1119 * error.c: Likewise.
1121 * name-lookup.c: Likewise.
1122 * parser.c: Likewise.
1124 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1127 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1130 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1132 * parser.c: Update all calls to inform.
1133 * typeck.c: Likewise.
1135 * class.c: Likewise.
1137 * method.c: Likewise.
1138 * friend.c: Likewise.
1139 * typeck2.c: Likewise.
1141 * name-lookup.c: Likewise.
1144 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1147 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1149 2008-08-18 Tomas Bily <tbily@suse.cz>
1151 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1153 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1155 * typeck.c: Update all callers of permerror.
1157 * class.c: Likewise.
1160 * except.c: Likewise.
1162 * typeck2.c: Likewise.
1164 * semantics.c: Likewise.
1165 * name-lookup.c: Likewise.
1167 * decl2.c: Likewise.
1168 * parser.c: Likewise.
1170 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1173 * pt.c (check_template_shadow): Change to return a bool.
1174 * name-lookup.c (push_class_level_binding): Early return if
1175 check_template_shadow returns false.
1176 * cp-tree.h (check_template_shadow): Adjust declaration.
1178 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1181 * decl.c (grokdeclarator): In case of extern and initializer, return
1182 error_mark_node after the error.
1184 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1187 * decl.c (grokfndecl): Call check_main_parameters_type only if
1190 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1193 * parser.c (cp_parser_class_head): Early return error_mark_node in
1194 case of global qualification of class name or qualified name that
1195 does not name a class.
1197 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1200 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1202 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1205 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1206 Delete forward declarations. Check that toplev.h has not been
1207 included before this file. Include toplev.h and diagnostic.h.
1208 * error.c (cp_cpp_error): Use DK_PEDWARN.
1209 (cxx_incomplete_type_diagnostic): Update declaration.
1210 (cxx_incomplete_type_error): Use DK_ERROR.
1211 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1212 as argument. Use emit_diagnostic.
1213 (cxx_incomplete_type_error): Use DK_ERROR.
1214 (add_exception_specifier): Use diagnostic_t instead of custom
1216 * typeck.c (complete_type_or_else): Update call to
1217 cxx_incomplete_type_diagnostic.
1218 * init.c (build_delete): Likewise.
1219 * call.c (diagnostic_fn_t): Remove unused typedef.
1220 (build_temp): Pass a pointer to diagnostic_t.
1221 (convert_like_real): Use emit_diagnostic.
1222 (joust): Check return value of warning before giving informative
1224 * friend.c (do_friend): Check return value of warning
1225 before giving informative note.
1226 * parser.c (cp_parser_template_id): Likewise.
1228 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1231 * class.c (check_bases_and_members): Warn with -Wuninitialized
1234 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1237 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1238 and make sure it is not a union.
1240 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1242 * semantics.c (finish_decltype_type): Initialize type.
1244 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1246 * semantics.c (finish_decltype_type): Handle calls to function
1247 pointers and references to functions properly.
1249 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1252 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1253 following a type-id is an error when in C++0x mode.
1255 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1258 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1260 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1263 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1265 2008-08-05 Jason Merrill <jason@redhat.com>
1268 * decl.c (build_ptrmemfunc_type): Don't require structural
1269 comparison of PMF types.
1270 * tree.c (cp_build_qualified_type_real): Don't clear
1271 a valid TYPE_PTRMEMFUNC_TYPE.
1272 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1275 2008-08-04 Jason Merrill <jason@redhat.com>
1278 * typeck2.c (check_narrowing): Allow narrowing conversion
1279 from an explicit floating-point constant.
1282 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1285 2008-08-04 Simon Baldwin <simonb@google.com>
1288 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1289 the declaration's id is followed by a semicolon.
1291 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1294 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1295 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1297 2008-07-31 Jason Merrill <jason@redhat.com>
1300 * init.c (build_new_1): Don't convert pointer to the data type
1301 until we're actually going to treat it as that type.
1304 * tree.c (build_aggr_init_expr): Split out...
1305 (build_cplus_new): ...from here.
1306 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1307 * init.c (build_new_1): new T() means value-initialization,
1308 not default-initialization.
1309 (build_vec_init): Likewise.
1310 (build_value_init_1): Use build_aggr_init_expr.
1312 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1315 * decl2.c (fix_temporary_vars_context_r): New function.
1316 (one_static_initialization_or_destruction): Make sure temporary
1317 variables part of the initialiser have their DECL_CONTEXT()
1320 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1323 * typeck.c (build_binary_op): Encapsulate code into
1326 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1329 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1330 TYPE_UID instead of pointers.
1332 2008-07-29 Jan Hubicka <jh@suse.cz>
1334 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1335 * decl.c (duplicate_decls): Likewise.
1336 (grokfndecl): Likewise.
1337 (start_method): Likewise.
1338 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1340 * pt.c (register_specialization, regenerate_decl_from_template):
1342 * decl2.c (grokfield): Likewise.
1344 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1347 * decl.c (duplicate_decls): Merge USED flags.
1349 2008-07-27 Jason Merrill <jason@redhat.com>
1352 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1354 2008-07-28 Richard Guenther <rguenther@suse.de>
1356 Merge from gimple-tuples-branch.
1358 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1360 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1363 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1365 * decl.c (finish_function): Call gimple_body after cp_genericize.
1367 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1369 * optimize.c: Include gimple.h instead of tree-gimple.h.
1370 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1371 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1374 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1376 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1378 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1380 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1382 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1384 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1386 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1387 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1388 (cxx_omp_clause_copy_ctor): Same.
1389 (cxx_omp_clause_assign_op): Same.
1391 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1393 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1394 (cp_gimplify_expr): Adjust caller.
1396 2008-05-11 Doug Kwan <dougkwan@google.com>
1398 * init.c (build_vec_delete): Add type conversion for argument
1399 0 of POINTER_PLUS_EXPR.
1401 2008-04-29 Doug Kwan <dougkwan@google.com>
1403 * decl2 (File): Include "gimple.h"
1404 (cp_write_global_declarations): Use gimple_body instead of
1406 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1408 2008-04-10 Diego Novillo <dnovillo@google.com>
1410 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1412 * optimize.c (maybe_clone_body): Re-enable call to
1414 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1415 code with call to gimple_unreachable.
1416 (cp_genericize): Fix handling of clone bodies.
1418 2008-04-04 Diego Novillo <dnovillo@google.com>
1420 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1422 * optimize.c (maybe_clone_body): Re-enable.
1424 2008-02-19 Diego Novillo <dnovillo@google.com>
1425 Oleg Ryjkov <olegr@google.com>
1427 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1429 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1430 argument to gimple_seq *. Update all users.
1431 (gimplify_must_not_throw_expr): Likewise.
1433 2008-02-04 Oleg Ryjkov <olegr@google.com>
1435 * except.c: Include gimple.h
1436 (cp_protect_cleanup_actions): Convert to tuples.
1437 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1439 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1441 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1442 instead of annotating each block manually.
1444 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1446 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1447 (gimplify_for_stmt): Same.
1448 (gimplify_switch_stmt): Same.
1449 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1451 [WHILE_STMT]: Return GS_OK.
1452 [SWITCH_STMT]: Same.
1453 [CONTINUE_STMT]: Same.
1455 (cp_genericize): Set gimple_body() of cloned functions when needed.
1457 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1459 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1460 (cp_gimplify_init_expr): Convert to tuples.
1461 (gimplify_must_not_throw_expr): Make function return a
1462 gimplify_status and convert to tuples.
1464 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1466 * cp-gimplify.c (genericize_try_block): Enable and do not call
1468 (genericize_catch_block): Same.
1469 (genericize_eh_spec_block): Same.
1470 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1471 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1473 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1475 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1476 * decl.c (finish_function): Use gimple_body instead of
1478 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1479 * cp-gimplify.c (genericize_try_block): Comment out.
1480 (genericize_catch_block): Same.
1481 (genericize_eh_spec_block): Same.
1482 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1483 (gimplify_for_stmt): Comment out.
1484 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1485 (cp_gimplify_omp_for): Same.
1486 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1487 Comment out call to gimplify_stmt and append_to_statement_list.
1488 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1489 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1490 (cp_gimplify_expr): Same.
1491 Comment out calls to genericize_*_block. Comment out call to
1494 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1497 * class.c (type_has_user_provided_default_constructor): Handle
1500 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1502 * decl.c (push_library_fn): Add a parameter for the exceptions that
1503 the function may throw.
1504 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1506 (build_library_fn): Change to static.
1507 * cp-tree.h: Adjust declarations.
1508 * except.c (declare_nothrow_library_fn): New.
1509 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1510 do_allocate_exception): Use the latter, adjust the declarations
1511 (ie, add empty exception-specification), consistently with the
1512 actual implementation in libsupc++.
1514 2008-07-25 Jan Hubicka <jh@suse.cz>
1516 * typeck.c (inline_conversion): Remove.
1517 (cp_build_function_call): Do not use inline_conversion.
1518 * decl.c (duplicate_decls): Do not insist on inline being declared
1520 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1521 from being output. We now remove static functions always.
1522 (finish_function): Do return warning on all static functions.
1523 * call.c (build_over_call): Do not use inline_conversion.
1524 * cp-tree.h (possibly_inlined_p): Declare.
1525 (inline_conversion): Remove.
1526 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1527 * decl2.c (cp_write_global_declarations): Likewise.
1528 (mark_used): Likewise.
1529 (possibly_inlined_p): New functions.
1531 2008-07-25 Jason Merrill <jason@redhat.com>
1533 * class.c (type_has_user_provided_default_constructor): Handle
1536 2008-07-23 Jan Hubicka <jh@suse.cz>
1538 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1539 (grogfndecl): Drop flag_inline_trees code.
1540 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1541 * lex.c (cxx_init): Do not set unit-at-a-time.
1543 2008-07-23 Jason Merrill <jason@redhat.com>
1545 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1546 trying to mangle a decl with no name.
1548 Implement defaulted/deleted functions as per N2346
1549 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1550 (DECL_DELETED_FN): New macro.
1551 (DECL_DEFAULTED_FN): New macro.
1552 * class.c (user_provided_p): New fn.
1553 (defaultable_fn_p): New fn.
1554 (type_has_user_provided_constructor): New fn.
1555 (type_has_user_provided_default_constructor): New fn.
1556 (check_methods): A defaulted fn is still trivial.
1557 (check_bases_and_members): Likewise.
1558 * decl.c (grok_special_member_properties): Likewise.
1559 (duplicate_decls): Complain about redeclaring a function as deleted.
1560 (start_decl): initialized==2 means deleted.
1561 (cp_finish_decl): Handle deleted/defaulted semantics.
1562 * decl2.c (grokfield): Likewise.
1563 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1564 Complain about using a deleted fn.
1565 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1566 (perform_member_init): Check for a user-provided default constructor
1567 even if TYPE_NEEDS_CONSTRUCTING.
1568 (build_new_1): Likewise.
1569 * call.c (build_over_call): Don't call mark_used twice.
1570 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1571 * search.c (check_final_overrider): Check for deleted mismatch.
1572 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1573 (cp_parser_pure_specifier): Handle =default and =delete.
1575 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1577 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1580 * typeck.c: All calls to pedwarn changed.
1581 * decl.c: All calls to pedwarn changed.
1582 * call.c: All calls to pedwarn changed.
1583 * error.c: All calls to pedwarn changed.
1584 * typeck2.c: All calls to pedwarn changed.
1585 * pt.c: All calls to pedwarn changed.
1586 * name-lookup.c: All calls to pedwarn changed.
1587 * parser.c: All calls to pedwarn changed.
1589 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1591 * call.c: Fix comment typos.
1592 * class.c: Likewise.
1593 * cp-tree.h: Likewise.
1594 * cxx-pretty-print.c: Likewise.
1597 * name-lookup.c: Likewise.
1598 * operators.def: Likewise.
1599 * parser.c: Likewise.
1602 * typeck.c: Likewise.
1604 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1608 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1609 copy constructors and copy assignment operators proper.
1611 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1613 * parser.c (cp_token): Remove in_system_header.
1614 (eof_token): Remove in_system_header.
1615 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1616 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1617 (cp_parser_member_declaration): Use in_system_header_at.
1618 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1619 (pop_tinst_level): Don't set in_system_header.
1620 (instantiate_class_template): Don't set in_system_header.
1621 (instantiate_decl): Don't set in_system_header.
1622 (instantiate_pending_templates): Don't set in_system_header.
1624 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1627 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1628 TYPE_NOTHROW_P, not TREE_NOTHROW.
1629 (trait_expr_value): Likewise.
1631 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1634 * call.c (convert_like_real): Don't take the error code path
1635 when a rvalue or base conversion has the bad_p field set.
1637 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1639 * rtti.c (emit_support_tinfos): Add char16_type_node and
1641 * typeck2.c (digest_init): Support char16_t and char32_t.
1643 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1645 * cvt.c (convert_to_void): Avoid C++ keywords.
1646 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1648 * friend.c (is_friend): Likewise.
1649 * init.c (perform_member_init): Likewise.
1650 * mangle.c (write_template_prefix, write_template_template_param):
1652 * name-lookup.c (do_namespace_alias, do_using_directive,
1653 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1654 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1655 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1657 * pt.c (is_specialization_of_friend, lookup_template_class,
1658 push_tinst_level, instantiate_class_template,
1659 tsubst_copy_and_build): Likewise.
1660 * tree.c (add_stmt_to_compound): Likewise.
1661 * typeck.c (finish_class_member_access_expr): Likewise.
1663 2008-07-17 Julian Brown <julian@codesourcery.com>
1664 Mark Mitchell <mark@codesourcery.com>
1666 * decl2.c (determine_visibility): Allow target to override
1667 visibility of class data.
1669 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1672 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1673 semantics to the current WP (N2691).
1675 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1678 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1679 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1680 complies with exception specification constraints.
1682 2008-07-14 Jason Merrill <jason@redhat.com>
1684 * lex.c (init_reswords): Always set D_OBJC.
1686 2008-07-11 Tom Tromey <tromey@redhat.com>
1687 Ian Lance Taylor <iant@google.com>
1689 * lex.c (struct resword, reswords): Don't define.
1690 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1691 (init_reswords): Clarify mask code. Use c_common_reswords rather
1694 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1697 * decl.c (grokdeclarator): Warn about initializing variables
1698 of storage class 'extern' only after the type of the declarator
1699 has been properly computed.
1701 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1704 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1705 carries the location of the primary type.
1706 * parser.c (cp_parser_check_type_definition): Update documentation.
1707 (cp_parser_check_for_definition_in_return_type,
1708 cp_parser_check_for_invalid_template_id,
1709 cp_parser_set_decl_spec_type,
1710 cp_parser_check_for_definition_in_return_type,
1711 cp_parser_diagnose_invalid_type_name,
1712 cp_parser_new_expression, cp_parser_explicit_instantiation,
1713 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1714 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1717 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1721 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1722 Add a location_t parameter so that
1723 error message can have a more accurate location.
1724 * cp-tree.h: Updated prototype
1725 * pt.c (tsubst_qualified_id): Use location in error messages.
1726 * parser.c (cp_parser_postfix_expression,
1727 cp_parser_objc_statement, cp_parser_trait_expr,
1728 cp_parser_token_is_class_key,
1729 cp_parser_uncommitted_to_tentative_parse_p,
1730 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1731 cp_parser_error, cp_parser_name_lookup_error,
1732 cp_parser_simulate_error, cp_parser_check_decl_spec,
1733 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1734 cp_parser_diagnose_invalid_type_name,
1735 cp_parser_parse_and_diagnose_invalid_type_name,
1736 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1737 cp_parser_string_literal, cp_parser_primary_expression,
1738 cp_parser_primary_expression, cp_parser_unqualified_id,
1739 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1740 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1741 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1742 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1743 cp_parser_jump_statement, cp_parser_block_declaration,
1744 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1745 cp_parser_function_specifier_opt, cp_parser_decltype,
1746 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1747 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1748 cp_parser_type_parameter, cp_parser_template_id,
1749 cp_parser_template_name, cp_parser_template_argument): Likewise.
1751 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1754 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1755 on function return type.
1757 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1760 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1761 on function return type in case of system header.
1763 2008-07-09 Raksit Ashok <raksit@google.com>
1765 * parser.c (cp_parser_postfix_expression): New warning based on flag
1766 warn_disallowed_functions.
1768 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1771 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1772 functions declared with a storage class qualifier.
1774 2008-07-03 Richard Guenther <rguenther@suse.de>
1777 * typeck.c (cp_build_function_call): Move code to verify
1778 builtin function arguments ...
1779 * call.c (build_cxx_call): ... here.
1781 2008-07-02 Jason Merrill <jason@redhat.com>
1783 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1785 Implement WG21 N2672, Initializer List proposed wording
1786 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1787 (struct lang_type_class): Add has_list_ctor bitfield.
1788 (TYPE_HAS_LIST_CTOR): New macro.
1789 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1790 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1791 (LOOKUP_NO_NARROWING): New macro.
1792 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1793 * parser.c (cp_parse_braced_list): Split out from...
1794 (cp_parser_initializer_clause): ...here.
1795 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1797 (cp_lexer_next_token_is_not_keyword): New fn.
1798 (cp_parser_parenthesized_expression_list): Handle { }.
1799 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1800 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1801 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1802 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1803 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1804 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1805 (cp_parser_save_member_function_body): Likewise.
1806 * call.c (conversion_kind): Add ck_list, ck_aggr.
1807 (struct conversion): Add check_narrowing bitfield, conversion list.
1808 (build_list_conv): New fn.
1809 (build_aggr_conv): New fn.
1810 (implicit_conversion): Call them.
1811 (standard_conversion): Set check_narrowing if appropriate.
1812 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1813 (build_user_type_conversion_1): When converting from an init list,
1814 we allow additional conversions except when calling a copy ctor.
1815 (convert_like_real): Calling an explicit ctor for an init list is
1816 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1817 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1818 class doesn't have a list ctor, break the {} into a TREE_LIST.
1819 (compare_ics): ck_list is better than other UDCs.
1820 (set_up_extended_ref_temp): Split out from initialize_reference.
1821 (is_std_init_list): New fn.
1822 (is_list_ctor): New fn.
1823 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1824 (reshape_init_array_1): Pass it to build_constructor.
1825 (reshape_init_class): Ditto.
1826 (initialize_artificial_var): Pass the appropriate type.
1827 (build_aggr_init_full_exprs): Split out from...
1828 (check_initializer): ...here. Handle new semantics.
1829 (build_init_list_var_init): New subroutine of check_initializer.
1830 (grokdeclarator): Converting constructors can have more than one parm.
1831 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1832 * init.c (expand_default_init): Only do digest_init for aggregates.
1833 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1834 build_constructor_from_list.
1835 (generic_initializer, ptr_initializer): Ditto.
1836 (ptm_initializer, class_initializer): Ditto.
1837 (get_pseudo_ti_init): Ditto.
1838 * error.c (dump_type): Handle init_list_type_node.
1839 (maybe_warn_cpp0x): New fn.
1840 (maybe_varn_variadic_templates): Call it.
1841 * cvt.c (ocp_convert): Handle conversion from { }.
1842 * tree.c (build_array_of_n_type): New fn.
1843 * typeck2.c (store_init_value): Use init_list_type_node.
1844 (digest_init): Likewise.
1845 (check_narrowing): New fn.
1846 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1847 of vector of constructor elts. Handle non-aggregate types. Make
1848 constant literals static.
1849 * pt.c: (tsubst_copy_and_build): Adjust.
1850 (unify): Handle { }.
1851 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1853 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1855 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1856 (comp_ptr_ttypes_const): Likewise.
1858 2008-07-01 Andrew Haley <aph@redhat.com>
1860 * decl.c (finish_constructor_body): Don't set the return value of
1861 the constructor if the constructor is that of a Java type.
1863 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1866 * decl2.c (is_late_template_attribute): If the first attribute
1867 argument is IDENTIFIER_NODE, don't consider it when checking
1868 if arguments are value or type dependent.
1870 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1873 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1876 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1878 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1880 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1883 * repo.c (repo_emit_p): Put const static data members initialized
1884 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1887 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1890 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1893 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1896 * typeck.c (cp_build_function_call): Show example syntax in
1899 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1901 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1902 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1903 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1904 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1905 pedwarn to permerror.
1906 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1907 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1908 * identify_goto, check_previous_goto_1, check_goto, define_label,
1909 check_tag_decl, start_decl, check_class_member_definition_namespace,
1910 grokfndecl, grokdeclarator): Likewise.
1911 * except.c (check_handlers): Likewise.
1912 * typeck2.c (digest_init): Likewise.
1913 * pt.c (check_specialization_namespace,
1914 check_explicit_instantiation_namespace,
1915 maybe_process_partial_specialization, check_explicit_specialization,
1916 convert_template_argument, do_decl_instantiation,
1917 do_type_instantiation, instantiate_decl): Likewise.
1918 * semantics.c (finish_template_type_parm): Likewise.
1919 * name-lookup.c (pushdecl_maybe_friend,
1920 check_for_out_of_scope_variable): Likewise.
1921 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1922 coerce_new_type): Likewise.
1923 * parser.c (cp_parser_nested_name_specifier_opt,
1924 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1925 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1926 (cp_parser_parameter_declaration): Check flag_permissive instead of
1927 flag_pedantic_errors.
1928 * call.c (joust): Change pedwarn to warning.
1929 * friend.c (make_friend_class): Likewise.
1931 2008-06-16 Jan Hubicka <jh@suse.cz>
1933 * method.c: Include cgraph.h.
1934 (use_thunk): Use cgraph_add_new_function instead of calling backend
1937 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1939 * parser.c: Fix comment typo.
1941 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1944 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1945 grokdeclarator and apply it to the created declaration.
1946 * cp-tree.h (grokbitfield): Update prototype.
1947 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1948 since they are now applied in grokbitfield. Adjusted the call to
1950 (cp_parser_objc_class_ivars): Likewise.
1952 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1955 * class.c (type_requires_array_cookie): Do not consider delete[]
1956 operators with an ellipsis as second argument.
1958 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1961 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1964 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1967 * pt.c (maybe_process_partial_specialization): Check the tree
1968 returned by push_template_decl for error_mark_node.
1969 * parser.c (cp_parser_class_head): Likewise, check the tree
1970 returned by the latter.
1972 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1975 * decl.c (grokdeclarator): In case of wrong return type return
1976 immediately error_mark_node.
1978 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1980 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1981 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1982 finish_omp_taskwait): New prototypes.
1983 (cxx_omp_clause_default_ctor): Add outer argument.
1984 (finish_omp_for): Add new clauses argument.
1985 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1986 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1987 (cxx_omp_clause_default_ctor): Add outer argument.
1988 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1989 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1990 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1991 Add par_clauses argument. If decl is present in parallel's
1992 lastprivate clause, change that clause to shared and add
1993 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1994 Fix wording of error messages. Adjust finish_omp_for caller.
1995 Add clauses argument. Parse loops with random access iterators.
1996 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1998 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1999 cp_parser_omp_for_loop callers.
2000 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
2002 (cp_parser_omp_clause_name): Handle collapse and untied
2004 (cp_parser_omp_clause_schedule): Handle auto schedule.
2005 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
2006 and PRAGMA_OMP_CLAUSE_UNTIED.
2007 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
2008 (OMP_TASK_CLAUSE_MASK): Define.
2009 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
2010 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
2011 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
2012 PRAGMA_OMP_TASKWAIT.
2013 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
2014 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
2015 (tsubst_omp_for_iterator): New function.
2016 (dependent_omp_for_p): New function.
2017 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
2018 loops. Adjust finish_omp_for caller. Handle loops with random
2019 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
2020 (tsubst_expr): Handle OMP_TASK.
2021 * semantics.c (cxx_omp_create_clause_info): New function.
2022 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
2023 OMP_CLAUSE_COLLAPSE.
2024 (cxx_omp_predetermined_sharing): Removed.
2025 * semantics.c (finish_omp_for): Allow pointer iterators. Use
2026 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
2027 collapsed for loops. Adjust c_finish_omp_for caller. Add new
2028 clauses argument. Fix check for type dependent cond or incr.
2029 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
2030 fold_convert to convert incr amount to difference_type. Only
2031 fold if not in template. If decl is mentioned in lastprivate
2032 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
2033 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
2035 (finish_omp_threadprivate): Allow static class members of the
2037 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
2038 finish_omp_taskwait): New functions.
2040 * parser.c (cp_parser_binary_expression): Add prec argument.
2041 (cp_parser_assignment_expression): Adjust caller.
2042 * cp-tree.h (outer_curly_brace_block): New prototype.
2043 * decl.c (outer_curly_brace_block): No longer static.
2045 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2048 * pt.c (push_template_decl_real): Consistently return error_mark_node
2051 2008-06-02 Tomas Bily <tbily@suse.cz>
2053 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
2054 (cp_build_unary_op): Likewise.
2055 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
2056 (maybe_warn_about_returning_address_of_local): Likewise.
2058 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
2061 * pt.c (tsubst_initializer_list): Consistently check the tree
2062 returned by tsubst_pack_expansion for error_mark_node.
2064 2008-05-27 Michael Matz <matz@suse.de>
2067 * call.c (build_new_op): Make warning conditional on
2070 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
2073 * call.c (convert_like_real): Convert bitfield to desired type
2074 before creating temporary.
2076 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2078 * Makefile.in: Adjusted dependencies on c-incpath.o.
2080 2008-05-23 Jakub Jelinek <jakub@redhat.com>
2083 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2084 fold_build_cleanup_point_expr on build_call_a results.
2087 * semantics.c (omp_clause_info_fndecl): New function.
2088 (finish_omp_clauses): Use it.
2090 2008-05-21 Jakub Jelinek <jakub@redhat.com>
2093 * cp-tree.h (check_array_initializer): New prototype.
2094 * decl.c (check_array_initializer): New function.
2095 (check_initializer): Call it.
2096 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2098 2008-05-21 Tom Tromey <tromey@redhat.com>
2100 * mangle.c (save_partially_mangled_name): Remove.
2101 (restore_partially_mangled_name): Likewise.
2102 (write_encoding): Update.
2103 (write_unqualified_name): Likewise.
2104 (start_mangling): Always use name_obstack. Remove 'ident_p'
2106 (get_identifier_nocopy): Remove.
2107 (finish_mangling_internal): Rename from finish_mangling.
2108 (finish_mangling): New function.
2109 (finish_mangling_get_identifier): Likewise.
2110 (partially_mangled_name, partially_mangled_name_len): Remove.
2111 (mangle_decl_string): Change return type. Update.
2112 (mangle_decl, mangle_type_string, mangle_special_for_type,
2113 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2114 mangle_ref_init_variable): Update.
2116 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2119 * semantics.c (begin_class_definition): Extend checks on the first
2122 2008-05-12 Tomas Bily <tbily@suse.cz>
2124 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2125 * call.c (build_over_call): Likewise.
2126 * error.c (dump_expr): Use CASE_CONVERT.
2127 * class.c (fixed_type_or_null): Likewise.
2129 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2131 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2133 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2136 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2138 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2139 DECL_LOOPING_CONST_OR_PURE_P attributes.
2140 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2143 2008-05-02 Simon Baldwin <simonb@google.com>
2146 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2148 2008-05-01 Simon Baldwin <simonb@google.com>
2150 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2152 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2155 * pt.c (more_specialized_fn): Stop the loop even if there are no
2156 arguments before ellipsis.
2158 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2161 * parser.c (cp_parser_lookup_name): Look through single function
2165 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2166 COMPOUND_EXPR if the second argument would be error_mark_node.
2168 2008-04-28 Jason Merrill <jason@redhat.com>
2169 Liu Guanwei <liu_gw@163.com>
2172 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2173 in default arguments.
2175 2008-04-25 Jan Hubicka <jh@suse.cz>
2177 * typeck.c (check_return_expr): Update.
2178 * decl.c (start_preparsed_function): Update.
2179 * method.c (use_thunk): Update.
2181 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2184 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2185 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2186 * decl2.c (is_late_template_attribute): Only make vector_size
2187 late tmpl attribute if argument is type or value dependent.
2188 (cp_reconstruct_complex_type): New function.
2190 2008-04-24 Richard Guenther <rguenther@suse.de>
2192 * typeck.c (cp_build_function_call): Call
2193 check_builtin_function_arguments.
2195 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2197 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2198 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2199 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2200 * class.c (build_base_path): Don't set TREE_INVARIANT.
2201 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2202 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2203 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2204 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2205 (generic_initializer): Don't set TREE_INVARIANT.
2206 (ptr_initializer): Don't set TREE_INVARIANT.
2207 (ptm_initializer): Don't set TREE_INVARIANT.
2208 (class_initializer): Don't set TREE_INVARIANT.
2209 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2210 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2211 (build_template_parm_index): Don't set TREE_INVARIANT.
2212 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2213 (process_template_parm): Don't set TREE_INVARIANT.
2215 2008-04-22 Jason Merrill <jason@redhat.com>
2218 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2219 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2220 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2222 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2225 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2226 expression is errorneous.
2228 2008-04-21 Jason Merrill <jason@redhat.com>
2231 * tree.c (cp_tree_equal): Handle FIXED_CST.
2234 * pt.c (template_template_parm_bindings_ok_p): Set
2235 processing_template_decl while in this function.
2237 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2239 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2240 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2241 char16_t and char32_t.
2242 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2243 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2244 extended builtin type "u8char{16,32}_t".
2245 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2247 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2248 (cp_parser_is_string_literal): Idem.
2249 (cp_parser_string_literal): Idem.
2250 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2252 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2253 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2254 * typeck.c (string_conv_p): Support char16_t and char32_t.
2256 2008-04-17 Jason Merrill <jason@redhat.com>
2259 * call.c (build_user_type_conversion_1): Represent second step of
2260 copy-init with an rvalue conversion.
2261 (convert_like_real) [ck_user]: Don't implicitly add it here.
2263 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2266 * decl.c (layout_var_decl): If extern or static var has variable
2267 size, set TREE_TYPE (decl) to error_mark_node.
2269 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2272 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2275 2008-04-09 Jason Merrill <jason@redhat.com>
2278 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2279 not a pushed variable.
2281 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2283 * call.c (build_op_delete_call): Fix quotation in warning message.
2284 * decl.c (grokdeclarator): Quote keyword in error message.
2285 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2288 * parser.c (cp_parser_check_type_definition): Print error string
2289 directly rather than using "%s".
2290 (cp_parser_postfix_expression): Fix quotation.
2291 (cp_parser_decltype): Likewise.
2292 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2294 * parser.c (cp_parser_non_integral_constant_expression): Build error
2295 message with CONCAT rather than using "%s".
2296 (cp_parser_primary_expression): Fix quotation.
2297 (cp_parser_postfix_expression): Likewise.
2298 (cp_parser_postfix_dot_deref_expression): Likewise.
2299 (cp_parser_unary_expression): Likewise.
2300 (cp_parser_new_expression): Likewise.
2301 (cp_parser_delete_expression): Likewise.
2303 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2304 as `)', not as `('. Fix quotation.
2305 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2306 (cp_parser_primary_expression): Likewise.
2307 (cp_parser_nested_name_specifier_opt): Likewise.
2308 (cp_parser_postfix_expression): Likewise.
2309 (cp_parser_postfix_open_square_expression): Likewise.
2310 (cp_parser_parenthesized_expression_list): Likewise.
2311 (cp_parser_pseudo_destructor_name): Likewise.
2312 (cp_parser_new_expression): Likewise.
2313 (cp_parser_direct_new_declarator): Likewise.
2314 (cp_parser_delete_expression): Likewise.
2315 (cp_parser_cast_expression): Likewise.
2316 (cp_parser_question_colon_clause): Likewise.
2317 (cp_parser_builtin_offsetof): Likewise.
2318 (cp_parser_trait_expr): Likewise.
2319 (cp_parser_label_for_labeled_statement): Likewise.
2320 (cp_parser_compound_statement): Likewise.
2321 (cp_parser_selection_statement): Likewise.
2322 (cp_parser_condition): Likewise.
2323 (cp_parser_iteration_statement): Likewise.
2324 (cp_parser_already_scoped_statement): Likewise.
2325 (cp_parser_simple_declaration): Likewise.
2326 (cp_parser_linkage_specification): Likewise.
2327 (cp_parser_static_assert): Likewise.
2328 (cp_parser_decltype): Likewise.
2329 (cp_parser_conversion_function_id): Likewise.
2330 (cp_parser_operator_function_id): Likewise.
2331 (cp_parser_operator): Likewise.
2332 (cp_parser_type_parameter): Likewise.
2333 (cp_parser_template_id): Likewise.
2334 (cp_parser_explicit_instantiation): Likewise.
2335 (cp_parser_explicit_specialization): Likewise.
2336 (cp_parser_enum_specifier): Likewise.
2337 (cp_parser_namespace_definition): Likewise.
2338 (cp_parser_namespace_alias_definition): Likewise.
2339 (cp_parser_using_declaration): Likewise.
2340 (cp_parser_using_directive): Likewise.
2341 (cp_parser_asm_definition): Likewise.
2342 (cp_parser_direct_declarator): Likewise.
2343 (cp_parser_ptr_operator): Likewise.
2344 (cp_parser_parameter_declaration_clause): Likewise.
2345 (cp_parser_initializer_clause): Likewise.
2346 (cp_parser_class_specifier): Likewise.
2347 (cp_parser_member_specification_opt): Likewise.
2348 (cp_parser_member_declaration): Likewise.
2349 (cp_parser_pure_specifier): Likewise.
2350 (cp_parser_constant_initializer): Likewise.
2351 (cp_parser_base_clause): Likewise.
2352 (cp_parser_exception_specification_opt): Likewise.
2353 (cp_parser_try_block): Likewise.
2354 (cp_parser_function_try_block): Likewise.
2355 (cp_parser_handler): Likewise.
2356 (cp_parser_throw_expression): Likewise.
2357 (cp_parser_asm_operand_list): Likewise.
2358 (cp_parser_attributes_opt): Likewise.
2359 (cp_parser_label_declaration): Likewise.
2360 (cp_parser_constructor_declarator_p): Likewise.
2361 (cp_parser_template_declaration_after_export): Likewise.
2362 (cp_parser_single_declaration): Likewise.
2363 (cp_parser_objc_message_expression): Likewise.
2364 (cp_parser_objc_message_args): Likewise.
2365 (cp_parser_objc_encode_expression): Likewise.
2366 (cp_parser_objc_defs_expression): Likewise.
2367 (cp_parser_objc_protocol_expression): Likewise.
2368 (cp_parser_objc_selector_expression): Likewise.
2369 (cp_parser_objc_protocol_refs_opt): Likewise.
2370 (cp_parser_objc_typename): Likewise.
2371 (cp_parser_objc_method_keyword_params): Likewise.
2372 (cp_parser_objc_superclass_or_category): Likewise.
2373 (cp_parser_objc_try_catch_finally_statement): Likewise.
2374 (cp_parser_objc_synchronized_statement): Likewise.
2375 (cp_parser_objc_throw_statement): Likewise.
2376 (cp_parser_omp_var_list_no_open): Likewise.
2377 (cp_parser_omp_clause_default): Likewise.
2378 (cp_parser_omp_clause_if): Likewise.
2379 (cp_parser_omp_clause_num_threads): Likewise.
2380 (cp_parser_omp_clause_reduction): Likewise.
2381 (cp_parser_omp_clause_schedule): Likewise.
2382 (cp_parser_omp_critical): Likewise.
2383 (cp_parser_omp_for_loop): Likewise.
2384 (cp_parser_omp_sections_scope): Likewise.
2386 * parser.c (cp_parser_template_parameter_list): Simplify.
2388 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2390 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2392 2008-04-07 Jason Merrill <jason@redhat.com>
2395 * class.c (type_has_user_nondefault_constructor): A template
2396 counts as a nondefault constructor.
2398 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2400 * decl.c (cxx_push_function_context): Delete.
2401 (cxx_pop_function_context): Delete.
2402 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2404 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2405 LANG_HOOKS_FUNCTION_FINAL): Delete.
2406 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2407 LANG_HOOKS_MISSING_NORETURN_OK_P.
2408 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2410 * semantics.c (current_stmt_tree): Fix comment.
2412 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2415 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2416 before calling fold_offsetof.
2418 2008-04-03 Tom Tromey <tromey@redhat.com>
2420 * Make-lang.in (c++_OBJS): New variable.
2422 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2424 * optimize.c (clone_body): New, from tree-inline.c.
2426 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2428 * method.c (synthesize_method): Use {push,pop}_function_context.
2429 * name-lookup.c (push_to_top_level): Likewise.
2430 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2432 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2435 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2438 2008-03-27 Tom Tromey <tromey@redhat.com>
2440 * Make-lang.in: Revert automatic dependency patch.
2442 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2445 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2446 (build_compound_expr): New, for compatibility with C
2447 build_compound_expr.
2448 (cp_build_compound_expr): Renamed from build_compound_expr.
2449 (build_c_cast): New, for compatibility with C build_c_cast.
2450 (cp_build_c_cast): Renamed from build_c_cast.
2451 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2452 * decl.c (cxx_maybe_build_cleanup): Ditto.
2453 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2454 (cp_build_compound_expr): Renamed from build_compound_expr.
2455 (build_c_cast): Add C-compatible prototype.
2456 (cp_build_c_cast): Renamed from build_c_cast.
2457 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2458 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2460 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2462 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2463 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2464 ending in a pack expansion, both of which can occur when
2465 substituting into a nested template.
2466 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2467 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2468 * parser.c (cp_parser_template_parameter): Deal with unnamed
2469 non-type template parameter packs identified by pack expansions in
2472 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2475 * pt.c (apply_late_template_attributes): Don't call tsubst on
2476 first attribute argument if it is IDENTIFIER_NODE.
2479 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2480 and LTGT_EXPR to pp_expression.
2482 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2484 * pt.c (coerce_template_template_parm): Moved the body of the loop
2485 of coerce_template_template_parms here, to make iteration over a
2486 template argument pack simpler.
2487 Also, allow matching of a template parameter pack in the template
2488 template parameter to a template parameter in the template
2490 (coerce_template_template_parms): Deal with variadic template
2491 template parameters. Use coerce_template_template_parm.
2492 (unify): Make sure we coerce the template template argument's
2493 template arguments to the template template parameter's template
2494 parameters, not the other way around.
2496 2008-03-25 Tom Tromey <tromey@redhat.com>
2498 * Make-lang.in: Remove .o targets.
2499 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2501 (c++_OBJS): New variable.
2502 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2504 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2506 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2507 (composite_pointer_type): Ditto.
2508 (common_type): Fix call to composite_pointer_type.
2509 (cxx_sizeof_nowarn): New; used to be a macro.
2510 (cxx_sizeof_expr): Add SFINAE support.
2511 (cxx_alignof_expr): Ditto.
2512 (decay_conversion): Fix calls for SFINAE support.
2513 (rationalize_conditional_expr): Add SFINAE support.
2514 (build_class_member_access_expr): Ditto.
2515 (finish_class_member_access_expr): Ditto.
2516 (build_x_indirect_ref): Ditto.
2517 (build_indirect_ref): Original version renamed to
2518 cp_build_indirect_ref; new version provides a bridge from
2520 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2522 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2523 (build_function_call): Original version renamed to
2524 cp_build_function_call; new version provides a bridge from
2526 (cp_build_function_call): Was build_function_call; added SFINAE
2528 (convert_arguments): Add SFINAE support.
2529 (build_x_binary_op): Ditto.
2530 (build_binary_op): Original version renamed to cp_build_binary_op;
2531 new version provides a bridge from c-common.
2532 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2533 (pointer_diff): Fix calls for SFINAE.
2534 (build_x_unary_op): Add SFINAE support.
2535 (condition_conversion): Fix calls for SFINAE.
2536 (build_unary_op): Original version renamed to cp_build_unary_op;
2537 new version provides a bridge from c-common.
2538 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2539 (unary_complex_lvalue): Fix calls for SFINAE.
2540 (build_x_conditional_expr): Add SFINAE support.
2541 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2542 (build_x_compound_expr): Add SFINAE support.
2543 (convert_ptrmem): Fix calls for SFINAE.
2544 (build_static_cast_1): Add SFINAE support.
2545 (build_static_cast): Ditto.
2546 (build_reinterpret_cast_1): Ditto.
2547 (build_reinterpret_cast): Ditto.
2548 (build_const_cast_1): Ditto.
2549 (build_const_cast): Ditto.
2550 (build_c_cast): Ditto.
2551 (build_modify_expr): Original version renamed to
2552 cp_build_modify_expr; new version provides a bridge from c-common.
2553 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2555 (build_x_modify_expr): Add SFINAE support.
2556 (build_ptrmemfunc): Fix calls for SFINAE.
2557 (convert_for_assignment): Add SFINAE support.
2558 (convert_for_initialization): Ditto.
2559 (check_return_expr): Fix calls for SFINAE.
2560 (lvalue_or_else): Add SFINAE support.
2561 * init.c (perform_member_init): Fix calls for SFINAE.
2562 (emit_mem_initializers): Ditto.
2563 (expand_virtual_init): Ditto.
2564 (expand_cleanup_for_base): Ditto.
2565 (build_aggr_init): Add SFINAE support.
2566 (expand_default_init): Ditto.
2567 (expand_aggr_init_1): Fix calls for SFINAE.
2568 (build_offset_ref): Ditto.
2569 (build_new_1): Add SFINAE support.
2571 (build_vec_delete_1): Fix calls for SFINAE.
2572 (get_temp_regvar): Ditto.
2573 (build_vec_init): Add SFINAE support.
2574 (build_dtor_call): Fix calls for SFINAE.
2575 (build_delete): Ditto.
2576 (push_base_cleanups): Ditto.
2577 (build_vec_delete_1): Ditto.
2578 * class.c (build_base_path): Fix calls for SFINAE.
2579 (build_simple_base_path): Ditto.
2580 (convert_to_base_statically): Ditto.
2581 (build_vfn_ref): Ditto.
2582 (resolve_address_of_overloaded_function): Ditto.
2583 * decl.c (check_initializer): Fix calls for SFINAE.
2584 (register_dtor_fn): Ditto.
2585 (compute_array_index_type): Ditto.
2586 (finish_enum): Ditto.
2587 (start_preparsed_function): Ditto.
2588 (cxx_maybe_build_cleanup): Ditto.
2589 * call.c (convert_like): Add COMPLAIN argument.
2590 (convert_like_with_context): Ditto.
2591 (build_this): Fix calls for SFINAE.
2592 (build_user_type_conversion): Ditto.
2593 (resolve_args): Ditto.
2594 (build_new_function_call): Add SFINAE support.
2595 (build_operator_new_call): Fix calls for SFINAE.
2596 (build_object_call): Add SFINAE support.
2597 (build_conditional_expr): Ditto.
2598 (build_new_op): Ditto.
2599 (build_op_delete_call): Fix calls for SFINAE.
2600 (build_temp): Ditto.
2601 (convert_like_real): Add SFINAE support.
2602 (build_x_va_arg): Fix calls for SFINAE.
2603 (convert_default_arg): Ditto.
2604 (build_over_call): Add SFINAE support.
2605 (build_java_interface_fn_ref): Fix calls for SFINAE.
2606 (build_special_member_call): Add SFINAE support.
2607 (build_new_method_call): Ditto.
2608 (perform_implicit_conversion): Ditto.
2609 (perform_direct_initialization_if_possible): Ditto.
2610 (initialize_reference): Fix calls for SFINAE.
2611 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2612 * rtti.c (build_headof): Fix calls for SFINAE.
2613 (get_tinfo_decl_dynamic): Ditto.
2614 (get_typeid): Ditto.
2615 (build_dynamic_cast_1): Add SFINAE support.
2616 (build_dynamic_cast): Ditto.
2617 (tinfo_base_init): Fix calls for SFINAE.
2618 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2619 (do_end_catch): Ditto.
2620 (initialize_handler_parm): Ditto.
2621 (expand_start_catch_block): Ditto.
2622 (do_allocate_exception): Ditto.
2623 (do_free_exception): Ditto.
2624 (build_throw): Ditto.
2625 * cvt.c (build_up_reference): Fix calls for SFINAE.
2626 (convert_to_reference): Ditto.
2627 (ocp_convert): Ditto.
2628 (convert_to_void): Add SFINAE support.
2629 * tree.c (build_dummy_object): Fix calls for SFINAE.
2630 (stabilize_expr): Ditto.
2631 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2633 (build_new_method_call): Ditto.
2634 (build_special_member_call): Ditto.
2635 (build_new_op): Ditto.
2636 (perform_implicit_conversion): Ditto.
2637 (perform_direct_initialization_if_possible): Ditto.
2638 (convert_to_void): Ditto.
2639 (build_aggr_init): Ditto.
2641 (build_vec_init): Ditto.
2642 (build_dynamic_cast): Ditto.
2643 (finish_call_expr): Ditto
2644 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2645 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2646 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2647 (finish_class_member_access_expr): Ditto.
2648 (build_x_indirect_ref): Ditto.
2649 (cp_build_indirect_ref): New.
2650 (cp_build_function_call): Add tsubst_flags_t parameter.
2651 (build_x_unary_op): Ditto.
2652 (cp_build_unary_op): New.
2653 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2654 (build_x_compound_expr): Ditto.
2655 (build_compound_expr): Ditto.
2656 (build_static_cast): Ditto.
2657 (build_reinterpret_cast): Ditto.
2658 (build_const_cast): Ditto.
2659 (build_c_cast): Ditto.
2660 (build_x_modify_expr): Ditto.
2661 (cp_build_modify_expr): New.
2662 (convert_for_initialization): Add tsubst_flags_t parameter.
2663 (cp_build_binary_op): Remove macro; add function declaration.
2664 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2665 (lvalue_or_else): Ditto.
2666 (build_functional_cast): Ditto.
2667 * typeck2.c (digest_init): Fix calls for SFINAE.
2668 (process_init_constructor_array): Ditto.
2669 (process_init_constructor_record): Ditto.
2670 (build_x_arrow): Ditto.
2671 (build_m_component_ref): Ditto.
2672 (build_functional_cast): Add SFINAE support.
2673 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2674 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2675 (finish_expr_stmt): Ditto.
2676 (finish_for_expr): Ditto.
2677 (finish_asm_stmt): Ditto.
2678 (finish_non_static_data_member): Ditto.
2679 (finish_qualified_id_expr): Ditto.
2680 (finish_call_expr): Add SFINAE support.
2681 (finish_increment_expr): Fix calls for SFINAE.
2682 (finish_unary_op_expr): Ditto.
2683 (simplify_aggr_init_expr): Ditto.
2684 (finish_omp_clauses): Ditto.
2685 (finish_omp_for): Ditto.
2686 (finish_omp_barrier): Ditto.
2687 (finish_omo_flush): Ditto.
2688 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2689 (build_anon_union_vars): Ditto.
2690 (get_guard_cond): Ditto.
2692 (one_static_initialization_or_destruction): Ditto.
2693 (do_static_initialization_or_destruction): Ditto.
2694 (generate_ctor_or_dtor_function): Ditto.
2695 (build_offset_ref_call_from_tree): Ditto.
2696 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2697 (cp_parser_postfix_dot_deref_expression): Ditto.
2698 (cp_parser_unary_expression): Ditto.
2699 (cp_parser_new_expression): Ditto.
2700 (cp_parser_cast_expression): Ditto.
2701 (cp_parser_binary_expression): Ditto.
2702 (cp_parser_question_colon_clause): Ditto.
2703 (cp_parser_assignment_expression): Ditto.
2704 (cp_parser_expression): Ditto.
2705 (cp_parser_builtin_offsetof): Ditto.
2706 (cp_parser_template_argument): Ditto.
2707 (cp_parser_functional_cast): Ditto.
2709 2008-03-24 Tom Tromey <tromey@redhat.com>
2711 * lex.c (handle_pragma_interface): Don't copy the filename.
2712 (handle_pragma_implementation): Copy filename using xstrdup.
2714 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2716 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2717 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2718 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2719 (PROMOTES_TO_AGGR_TYPE): Remove.
2720 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2721 * typeck.c (unary_complex_lvalue, build_modify_expr,
2722 convert_for_initialization): Adjust.
2723 * init.c (is_aggr_type): Remove.
2724 (is_class_type): Add.
2725 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2726 build_delete): Adjust.
2727 * lex.c (make_aggr_type): Remove.
2728 (make_class_type): Add.
2729 (cxx_make_type): Adjust.
2730 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2732 * decl.c (build_typename_type, make_typename_type,
2733 make_unbound_class_template, cxx_init_decl_processing,
2734 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2735 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2736 grok_op_properties, xref_tag, check_function_type): Adjust.
2737 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2738 add_builtin_candidate, add_builtin_candidates,
2739 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2740 is_subseq, compare_ics): Adjust.
2741 * method.c (use_thunk): Adjust.
2742 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2743 create_tinfo_types): Adjust.
2744 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2745 build_up_reference, convert_to_reference, convert_from_reference,
2746 ocp_convert, build_expr_type_conversion): Adjust.
2747 * tree.c (bind_template_template_parm, error_type): Adjust.
2748 * dump.c (cp_dump_tree): Adjust.
2749 * search.c (lookup_member): Adjust.
2750 * friend.c (make_friend_class, do_friend): Adjust.
2751 * typeck2.c (store_init_value, process_init_constructor_array,
2752 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2753 build_functional_cast): Adjust.
2754 * pt.c (finish_member_template_decl, process_template_parm,
2755 lookup_template_class, tsubst_function_type, tsubst,
2756 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2758 * semantics.c (begin_class_definition, finish_base_specifier,
2759 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2761 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2762 do_class_using_decl, lookup_qualified_name,
2763 maybe_process_template_type_declaration): Adjust.
2764 * decl2.c (grok_array_decl, check_member_template,
2765 constrain_class_visibility): Adjust.
2766 * parser.c (cp_parser_class_name): Adjust.
2768 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2770 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2772 2008-03-17 Jason Merrill <jason@redhat.com>
2775 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2776 a temp directly to a reference as per DR391.
2778 2008-03-12 Richard Guenther <rguenther@suse.de>
2782 2008-02-04 Richard Guenther <rguenther@suse.de>
2785 * decl.c (record_builtin_java_type): Make jboolean a
2786 integer type again where its mode doesn't match that of bool.
2788 2008-01-25 Richard Guenther <rguenther@suse.de>
2791 * decl.c (record_builtin_java_type): Make __java_boolean
2793 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2794 after TYPE_MAIN_VARIANT check.
2796 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2799 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2803 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2804 DECL_P in not a variable and appears more than once error messages.
2806 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2810 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2814 * typeck.c (structural_comptypes): Call cp_comptypes.
2815 (comptypes): New; called from the C/C++ common bits to perform
2817 (cp_comptypes): Renamed from comptypes, which is already used,
2818 with a different signature, by the C++ front end.
2819 (build_reinterpret_cast_1): Call cp_comptypes.
2820 (ptr_reasonably_similar): Ditto.
2821 * decl.c (decls_match): Ditto.
2822 * cvt.c (convert_to_reference): Ditto.
2823 * cp-tree.h (same_type_p): Ditto.
2824 (same_or_base_type_p): Ditto.
2825 (comptypes): Rename to cp_comptypes.
2826 * pt.c (canonical_type_parameter): Call cp_comptypes.
2828 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2830 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2831 test for equivalence between pointer and references.
2833 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2836 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2837 (check_field_decls): Likewise.
2838 (note_name_declared_in_class): Likewise.
2839 * call.c (build_new_op): Likewise.
2840 (convert_like_real): Likewise.
2841 (build_over_call): Likewise.
2842 * lex.c (unqualified_fn_lookup_error): Likewise.
2843 * parser.c (cp_parser_template_id): Likewise.
2844 * cvt.c (warn_ref_binding): Likewise.
2845 (convert_to_reference): Likewise.
2846 (ocp_convert): Likewise.
2847 (convert_to_void): Use error instead of pedwarn.
2848 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2849 * decl.c (compute_array_index_type): Use constant_expression_error.
2851 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2853 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2854 that auto is either a storage class or a simple type specifier,
2855 depending on the dialect.
2856 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2857 specifier in C++98 mode, error in C++0x mode (since we don't
2858 support auto as a type specifier, yet).
2859 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2860 storage specifier in C++0x mode.
2861 (cp_parser_simple_type_specifier): Parse `auto' as a
2862 simple-type-specifier, but error because we don't support it yet.
2864 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2866 * parser.c (cp_parser_nonclass_name): New.
2867 (cp_parser_pseudo_destructor_name): Use it instead of
2868 cp_parser_type_name.
2869 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2871 2008-02-29 Tom Tromey <tromey@redhat.com>
2873 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2874 (cp_lexer_get_preprocessor_token): Update.
2875 (cp_lexer_set_source_position_from_token): Don't call
2876 restore_input_file_stack.
2877 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2879 2008-02-28 Richard Guenther <rguenther@suse.de>
2882 2008-02-26 Richard Guenther <rguenther@suse.de>
2884 * decl.c (duplicate_decls): Remove decl from global mapping
2885 before ggc_freeing it.
2887 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2890 * rtti.c: Include c-pragma.h.
2891 (push_abi_namespace, pop_abi_namespace): New functions.
2892 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2893 create_tinfo_types, emit_support_tinfos): Use them.
2894 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2896 2008-02-26 Jason Merrill <jason@redhat.com>
2899 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2900 to name the struct for linkage purposes even if it has attributes.
2901 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2903 2008-02-26 Tom Tromey <tromey@redhat.com>
2905 * parser.c (eof_token): Remove old location code.
2906 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2907 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2909 (cp_write_global_declarations): Likewise.
2910 * lex.c (cxx_init): Remove old location code.
2911 (handle_pragma_implementation): Remove test of
2912 USE_MAPPED_LOCATION.
2913 * pt.c (tsubst): Remove old location code.
2914 * error.c (cp_print_error_function): Remove test of
2915 USE_MAPPED_LOCATION.
2916 * decl.c (pop_label): Remove old location code.
2917 (finish_function): Likewise.
2919 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2922 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2924 2008-02-26 Richard Guenther <rguenther@suse.de>
2926 * decl.c (duplicate_decls): Remove decl from global mapping
2927 before ggc_freeing it.
2929 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2932 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2934 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2936 * typeck.c (build_class_member_access_expr): Add appropriate
2937 OPT_W* parameter to warning.
2938 (build_reinterpret_cast_1): Likewise.
2939 * name-lookup.c (push_overloaded_decl): Likewise.
2941 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2944 * error.c (dump_expr): Handle CONJ_EXPR.
2946 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2949 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2950 (dump_expr): Handle FIXED_CST.
2952 2008-02-24 Jason Merrill <jason@redhat.com>
2954 * parser.c (cp_parser_declaration): Handle "inline namespace".
2955 (cp_parser_namespace_definition): Likewise.
2958 * name-lookup.c (arg_assoc_namespace): Look down into inline
2961 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2963 * typeck.c (check_for_casting_away_constness): Use 1 single
2964 argument, the type of cast, to decide what diagnostics generate.
2965 (build_static_cast_1): Remove unused code. Update call to
2966 check_for_casting_away_constness.
2967 (build_reinterpret_cast_1): Update call to
2968 check_for_casting_away_constness.
2969 (build_const_cast_1): Likewise.
2971 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2973 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2974 VEC_NEW_EXPR), forward to pp_expression.
2975 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2977 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2980 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2982 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2985 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2986 template decls' function decl.
2988 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2992 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2995 * pt.c (determine_specialization): In case of function templates,
2996 when the type of DECL does not match FN there is no match.
2998 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3001 * typeck.c (build_binary_op): Warn about floating point
3002 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
3004 2008-02-19 Jason Merrill <jason@redhat.com>
3007 * pt.c (resolve_overloaded_unification): Set processing_template_decl
3008 while we look for possible bindings.
3010 2008-02-19 Jakub Jelinek <jakub@redhat.com>
3013 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
3017 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
3018 vars. Afterwards ensure v is VAR_DECL.
3021 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
3022 call cp_finish_decl.
3023 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
3026 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
3031 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
3032 is error_mark_node, return an error early.
3033 (find_parameter_packs_r): Pass the pointer set along to recursive
3034 calls of cp_walk_subtrees; don't try to manage the pointer set
3036 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
3037 (make_pack_expansion): Ditto.
3038 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
3039 a second pass through the tree with find_parameter_packs_r; that
3040 second pass no longer does anything.
3041 (push_template_decl_real): If we have an erroneous declaration,
3042 set its type to error_mark_node before returning an error.
3044 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
3047 * pt.c (tsubst_initializer_list): Deal with the use of
3048 VOID_TYPE_NODE to indicate value-initialization of the bases.
3050 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3051 Jason Merrill <jason@redhat.com>
3055 * class.c (type_has_user_nondefault_constructor): New fn.
3056 * cp-tree.h: Declare it.
3057 * init.c (emit_mem_initializers): Use it for -W warning about
3058 missing base initializer.
3060 2008-02-14 Paolo Carlini <pcarlini@suse.de>
3063 * pt.c (determine_specialization): In case of function templates,
3064 when the type of DECL does not match FN there is no match.
3066 2008-02-13 Jakub Jelinek <jakub@redhat.com>
3067 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3070 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
3071 are not identifier :: ~, return before calling cp_parser_type_name.
3073 2008-02-13 Jason Merrill <jason@redhat.com>
3075 PR c++/34962, c++/34937, c++/34939
3076 * decl2.c (is_late_template_attribute): Always defer attributes
3077 vector_size and weak.
3080 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3081 of enumerators, too.
3083 2008-02-12 Jason Merrill <jason@redhat.com>
3086 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3087 if we're doing conversions to call a user-defined conversion function.
3089 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
3092 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3095 2008-02-12 Jakub Jelinek <jakub@redhat.com>
3098 * init.c (build_new_1): Don't create placement_expr before
3099 constructing alloc_call. Verify that the pointer is passed by
3100 value to operator new.
3102 2008-02-11 Jason Merrill <jason@redhat.com>
3105 * pt.c (tsubst): Don't look up a template typedef in an explicit
3108 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3111 * tree.c (cp_build_qualified_type_real): When building a
3112 cv-qualified array type, build it as a unique type with
3113 build_cplus_array_type_1 and then adopt the unqualified type's
3116 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3119 * decl.c (groktypename): Check grokdeclarator return.
3121 2008-02-10 Jason Merrill <jason@redhat.com>
3124 * decl2.c (cp_write_global_declarations): Don't write out static
3125 data members with DECL_IN_AGGR_P set.
3127 2008-02-08 Jason Merrill <jason@redhat.com>
3130 * tree.c (build_target_expr_with_type): Handle void initializer.
3131 (bot_manip): Remap slot before recursing.
3133 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3136 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3138 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3141 * tree.c: Include tree-flow.h.
3142 (build_target_expr): Check type compatibility.
3143 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3144 * call.c (convert_like_real): Convert bitfield to expected type.
3146 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3150 * typeck.c (structural_comptypes): Call cp_comptypes.
3151 (comptypes): New; called from the C/C++ common bits to perform
3153 (cp_comptypes): Renamed from comptypes, which is already used,
3154 with a different signature, by the C++ front end.
3155 (build_reinterpret_cast_1): Call cp_comptypes.
3156 (ptr_reasonably_similar): Ditto.
3157 * decl.c (decls_match): Ditto.
3158 * cvt.c (convert_to_reference): Ditto.
3159 * cp-tree.h (same_type_p): Ditto.
3160 (same_or_base_type_p): Ditto.
3161 (comptypes): Rename to cp_comptypes.
3162 * pt.c (canonical_type_parameter): Call cp_comptypes.
3164 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3167 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3168 value dependent expression.
3170 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3173 * decl2.c (save_template_attributes): When we're modifying the
3174 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3175 all of the other variants to add those same attributes. Otherwise,
3176 the main variant will be inconsistent with those other variants.
3178 2008-02-04 Richard Guenther <rguenther@suse.de>
3181 * decl.c (record_builtin_java_type): Make jboolean a
3182 integer type again where its mode doesn't match that of bool.
3184 2008-02-02 Jason Merrill <jason@redhat.com>
3185 Mark Mitchell <mark@codesourcery.com>
3188 * init.c (build_value_init_1): New function.
3189 (build_value_init): New function.
3190 * typeck2.c (build_functional_cast): Call it.
3191 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3193 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3194 TYPE_HAS_CONSTRUCTOR.
3195 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3196 add_implicitly_declared_members): Adjust.
3197 (check_field_decls): Adjust. Remove warnings about reference/const
3198 in class without constructor.
3199 (check_bases_and_members): Adjust. Give those warnings here instead.
3200 * decl.c (fixup_anonymous_aggr): Adjust.
3201 (check_initializer): Adjust, clarify logic slightly.
3202 (grok_special_member_properties): Adjust, only set if user-provided.
3203 * rtti.c (create_tinfo_types): Don't set.
3204 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3205 Use same_type_ignoring_top_level_qualifiers_p.
3206 * pt.c (check_explicit_specialization): Adjust.
3207 (instantiate_class_template): Adjust.
3209 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3210 Jakub Jelinek <jakub@redhat.com>
3214 * typeck.c (structural_comptypes): Handle comparisons of
3215 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3217 * mangle.c (write_builtin_type): Map down to the canonical type,
3218 which will be one of the predefined type nodes.
3220 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3223 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3224 bits to allow for expansion of the number of middle end tree
3227 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3238 * typeck.c (check_return_expr): Tweak call to
3239 check_for_bare_parameter_packs.
3240 * class.c (add_method): Be careful with error_mark_nodes.
3241 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3243 * pt.c (struct find_parameter_pack_data): Remove
3245 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3246 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3247 (make_pack_expansion): Ditto.
3248 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3250 (process_template_parm): Tweak call to
3251 check_for_bare_parameter_packs.
3252 (push_template_decl_real): Tweak calls to
3253 check_for_bare_parameter_packs. If bare parameter packs are found
3254 in the list of exceptions, clear out that list after giving an
3256 * semantics.c (finish_cond): Tweak call to
3257 check_for_bare_parameter_packs.
3258 (finish_expr_stmt): Ditto.
3259 (finish_for_expr): Ditto.
3260 (finish_switch_cond): Ditto.
3261 (finish_mem_initializers): Ditto.
3262 (finish_member_declaration): Ditto.
3263 (finish_static_assert): Check for bare parameter packs in the
3265 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3266 attributes of a declaration.
3267 * parser.c (cp_parser_using_declaration): Tweak call to
3268 check_for_bare_parameter_packs.
3269 (cp_parser_base_clause): Ditto.
3271 2008-01-28 Jason Merrill <jason@redhat.com>
3274 * class.c (build_base_path): Fix !want_pointer case.
3276 2008-01-27 Jason Merrill <jason@redhat.com>
3279 * class.c (build_base_path): Fix previous change.
3281 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3284 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3287 2008-01-26 Richard Guenther <rguenther@suse.de>
3290 * typeck.c (build_binary_op): Remove code to shorten compares.
3292 2008-01-25 Richard Guenther <rguenther@suse.de>
3295 * decl.c (record_builtin_java_type): Make __java_boolean
3297 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3298 after TYPE_MAIN_VARIANT check.
3300 2008-01-25 Jason Merrill <jason@redhat.com>
3303 * class.c (build_base_path): Don't mess with virtual access if
3305 * call.c (standard_conversion): Don't check whether source type
3308 * decl2.c (is_late_template_attribute): Don't defer attribute
3309 visibility just because the type is dependent.
3311 2008-01-25 Jason Merrill <jason@redhat.com>
3312 Mark Mitchell <mark@codesourcery.com>
3315 * call.c (standard_conversion): Allow conversion from integer/real
3317 (compare_ics): Such a conversion is worse than a normal arithmetic
3320 2008-01-25 Richard Guenther <rguenther@suse.de>
3323 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3326 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3329 * pt.c (push_template_decl_real): Return error_mark_node in case
3330 of template definition of non-template.
3332 2008-01-24 Jason Merrill <jason@redhat.com>
3335 * decl2.c (is_late_template_attribute): Defer any attribute with
3336 dependent args. Also defer type attributes if the type is dependent.
3338 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3339 Alexandre Oliva <aoliva@redhat.com>
3342 * call.c (reference_binding): For bitfields use the declared bitfield
3344 (add_builtin_candidates): Likewise.
3345 * class.c (layout_class_type): For bitfields copy over the
3346 original type quals.
3348 2008-01-22 Jason Merrill <jason@redhat.com>
3351 * decl.c (groktypename): Also ignore attributes on dependent
3352 possibly-class types.
3355 * friend.c (do_friend): Check for prior declaration of a friend
3356 function of a local class.
3357 * name-lookup.c (lookup_name_innermost_nonclass_level):
3359 * name-lookup.h: Declare it.
3361 2008-01-22 Tom Tromey <tromey@redhat.com>
3364 * init.c (build_new_1): Only disallow Java aggregates.
3366 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3369 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3370 if decl or init is error_mark_node.
3373 * error.c (dump_expr): Handle VECTOR_CST.
3375 2008-01-21 Jason Merrill <jason@redhat.com>
3378 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3381 * pt.c (retrieve_local_specialization): Robustify.
3382 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3385 * pt.c (tsubst): Only call retrieve_local_specialization if the
3386 original typedef was in a function template.
3389 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3391 2008-01-21 Richard Guenther <rguenther@suse.de>
3394 * error.c (cp_print_error_function): Deal with recursive
3397 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3400 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3402 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3406 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3407 on non-IS_AGGR_TYPE scope.
3408 (constructor_name_p): Assert IS_AGGR_TYPE.
3410 2008-01-18 Ian Lance Taylor <iant@google.com>
3413 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3414 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3415 DECL_IS_OPERATOR_NEW flag.
3417 2008-01-16 Richard Guenther <rguenther@suse.de>
3420 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3421 for conversions to type variants.
3423 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3425 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3426 declaration and code. Update copyright year.
3428 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3431 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3432 know we have a class type.
3434 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3437 * pt.c (coerce_template_parameter_pack): When substituting into
3438 the type of a non-type template parameter pack. use the
3439 deduced/substituted arguments.
3440 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3441 can be a parameter pack with the ellipsis following it. When we
3442 have an erroneous declaration, allow it to be a parameter pack.
3443 (cp_parser_template_parameter): Complain about default
3444 arguments on non-type template parameter packs, and parse them
3445 using the new cp_parser_default_argument.
3446 (cp_parser_parameter_declaration): Complain about parameter packs
3447 with default arguments. Move parsing of default arguments into a
3448 new function, cp_parser_default_argument.
3449 (cp_parser_default_argument): New; extracted from
3450 cp_parser_parameter_declaration.
3452 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3458 * typeck.c (check_return_expr): If there are bare parameter packs
3459 in the return value, set it to error_mark_node.
3460 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3461 * pt.c (find_parameter_packs_r): Look at the type of
3462 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3463 (check_for_bare_parameter_packs): Flip the result: now returns
3464 TRUE when there were bare parameter packs, FALSE otherwise.
3465 (push_template_decl_real): Deal with flipped result of
3466 check_for_bare_parameter_packs.
3467 * semantics.c (finish_cond): If there are bare parameter packs in
3468 the conditional, set it to error_mark_node.
3469 (finish_expr_stmt): If there are bare parameter packs in the
3470 expression, set it to error_mark_node.
3471 (finish_for_expr): Ditto.
3472 (finish_switch_cond): If there are bare parameter packs in
3473 the conditional, set it to error_mark_node.
3474 (finish_mem_initializers): If there are bare parameter packs in
3475 the member initializer, set it to error_mark_node.
3476 (finish_member_declaration): Check the attributes of the
3477 declaration for bare parameter packs, and remove the attributes if
3478 any have bare parameter packs.
3479 * parser.c (cp_parser_using_declaration): Check the using
3480 declaration for bare parameter packs.
3481 (cp_parser_base_clause): If there are bare parameter packs in a
3482 base specifier, don't add it to the chain.
3484 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3487 * error.c (dump_simple_decl): Display ellipsis for template
3488 non-type parameter packs.
3489 (dump_decl): Display ellipsis for template type parameter packs.
3490 (dump_template_decl): Display ellipsis for template template
3492 * pt.c (redeclare_class_template): When redeclaring a class
3493 template, check for collisions between template parameters and
3494 template parameter packs.
3496 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3499 * pt.c (process_partial_specialization): Don't mark template
3500 parameters that occur in non-deduced contexts.
3501 (struct pair_fn_data): Add include_nondeduced_p.
3502 (for_each_template_parm_r): Only visit non-deduced contexts if
3503 include_nondeduced_p is set.
3504 (for_each_template_parm): Added parameter include_nondeduced_p,
3505 which states whether template parameters found in non-deduced
3506 contexts should be visited.
3507 (uses_template_parms): Visit all template parameters, even those
3508 in non-deduced contexts.
3510 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3513 * pt.c (check_default_tmpl_args): Check for parameter packs that
3514 aren't at the end of a primary template.
3515 (push_template_decl_real): Remove check for parameter packs that
3516 aren't at the end of a primary template; that now happens in
3517 check_default_tmpl_args.
3518 * semantics.c (finish_template_template_parm): Use
3519 check_default_tmpl_args to check for errors in the template
3522 2008-01-12 Doug Kwan <dougkwan@google.com>
3524 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3525 instead of OPT_Wreturn_type in warning due to ignored return type
3527 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3528 instead of OPT_Wreturn_type in warning due to ignored return type
3531 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3534 * semantics.c (finish_omp_for): Don't call
3535 fold_build_cleanup_point_expr if processing_template_decl.
3537 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3538 Jakub Jelinek <jakub@redhat.com>
3541 * error.c (dump_template_argument): Deal with TREE_LIST.
3543 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3545 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3546 long" in C++0x mode; change the warning to note that "long long"
3547 is only unsupported in C++98 mode.
3549 2007-12-20 Jason Merrill <jason@redhat.com>
3552 * call.c (standard_conversion): Derived-to-base is considered a
3553 standard conversion.
3555 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3558 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3559 call cp_parser_statement rather than
3560 cp_parser_already_scoped_statement.
3562 2007-12-18 Jason Merrill <jason@redhat.com>
3565 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3567 (dependent_type_p_r): Handle the domain of an array.
3569 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3570 Jakub Jelinek <jakub@redhat.com>
3575 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3576 bindings of template template parameters after all template
3577 arguments have been deduced.
3578 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3580 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3581 (unify): Deal with variadic, bound template template parameters.
3582 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3584 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3587 * decl.c (grokdeclarator): Reject friend sfk_constructor
3590 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3593 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3596 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3599 * cp-lang.c (cp_classify_record): New.
3600 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3602 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3605 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3608 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3609 dynamic_cast in a template.
3611 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3614 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3615 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3617 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3620 * error.c (dump_type_prefix, dump_type_suffix): Handle
3621 TYPE_PACK_EXPANSION.
3624 * error.c (dump_expr): Handle ABS_EXPR.
3626 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3630 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3631 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3632 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3633 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3634 flag_use_repository and repo_emit_p returned 2.
3636 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3639 * tree.c (stabilize_call, stabilize_init): Do nothing if
3640 processing_template_decl.
3642 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3645 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3646 error instead of assertion failure.
3647 * parser.c (cp_parser_decltype): If closing paren is not found,
3648 return error_mark_node.
3650 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3653 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3655 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3656 since arg_assoc_template_arg will deal with them (better).
3658 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3661 * pt.c (tsubst_exception_specification): Handle substitutions into
3662 member templates, where tsubst_pack_expansion returns a
3663 TYPE_PACK_EXPANSION.
3665 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3668 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3669 bindings for the template parameter pack, don't try to keep the
3670 empty deduced arguments.
3671 (unify): If a parameter is a template-id whose template argument
3672 list contains a pack expansion that is not at the end, then we
3673 cannot unify against that template-id.
3675 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3678 * pt.c (current_template_args): Use error_operand_p.
3680 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3683 * error.c (dump_decl): Handle TREE_BINFO.
3685 2007-12-01 Ollie Wild <aaw@google.com>
3688 * typeck.c (build_binary_op): Add conversion of pointers to function
3689 members appearing as operands to the equality operators.
3691 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3694 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3696 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3699 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3701 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3706 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3708 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3711 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3713 PR tree-optimization/34181
3714 * method.c (use_thunk): Don't inline the call in the thunk.
3717 * tree.c (decl_linkage): Static data members and static member
3718 functions in anonymous ns classes are lk_external.
3720 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3723 * decl.c (start_preparsed_function): Pass
3724 processing_template_decl for the new allocate_struct_function
3727 2007-11-25 Richard Guenther <rguenther@suse.de>
3729 * decl.c (poplevel): Use BLOCK_CHAIN.
3731 2007-11-24 Ollie Wild <aaw@google.com>
3733 * typeck.c (delta_from_ptrmemfunc): New function.
3734 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3735 (build_binary_op): Call delta_from_ptrmemfunc.
3737 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3741 * decl.c (cp_finish_decl): Disallow variable or field
3742 definitions if extern "Java" aggregates.
3743 (grokparms): Disallow parameters with extern "Java"
3745 (check_function_type): Disallow function return values
3746 with extern "Java" aggregates.
3747 * init.c (build_new_1): Disallow placement new with
3748 extern "Java" aggregates.
3750 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3751 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3754 * call.c (convert_like_real): Build a zero constant when __null is
3755 converted to an integer type.
3757 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3760 * decl2.c (cp_write_global_declarations): Issue error about static
3761 data members in anonymous namespace which are declared and used,
3764 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3767 * parser.c (cp_parser_class_head): Reject function template ids.
3770 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3771 when processing_template_decl to build_array_type.
3774 * pt.c (more_specialized_fn): Don't segfault if one or
3775 both argument list end with ellipsis.
3777 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3780 * semantics.c (finish_call_expr): Set
3781 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3782 or OVERLOAD with all noreturn functions.
3784 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3787 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3790 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3797 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3798 set to error_mark_node the outermost POINTER_TYPE to the pack if
3799 it is seen in a POINTER_TYPE.
3800 (push_template_decl_real): If check_for_bare_parameter_packs
3801 fails for function return type, set the return type to
3802 integer_type_node. If check_for_bare_parameter_packs failed
3803 for non-function, return error_mark_node.
3806 * call.c (build_new_op): Call resolve_args before calling
3809 2007-11-11 Tom Tromey <tromey@redhat.com>
3812 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3814 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3817 * pt.c (redeclare_class_template): Update error message. Use a
3818 note to show the previous declaration.
3819 (tsubst_friend_class): Use the location of the friend template as
3820 the input location before calling redeclare_class_template.
3822 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3825 * semantics.c (finish_pseudo_destructor_expr): Handle
3826 object == error_mark_node.
3828 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3831 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3832 is not scalar type, let finish_class_member_access_expr handle
3833 diagnostics. Pass BIT_NOT_EXPR argument to
3834 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3836 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3839 * decl.c (cp_complete_array_type): If any of the initializer
3840 elements are pack expansions, don't compute the array size yet.
3842 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3845 * tree.c (decl_linkage): Fields have no linkage.
3847 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3849 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3851 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3856 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3857 Be careful with ERROR_MARK_NODEs.
3858 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3861 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3864 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3867 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3871 * tree.c (c_build_qualified_type): Define bridge to
3872 cp_build_qualified_type.
3874 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3885 * typeck.c (check_return_expr): Pass address of retval to
3886 check_for_bare_parameter_packs.
3887 * class.c (build_base_field): Tolerate bases that have no layout
3889 (end_of_base): Ditto.
3890 * tree.c (canonical_type_variant): Be careful with
3892 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3894 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3895 which states whether parameter packs should be replaced with
3897 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3898 possible. If set_packs_to_error is set true, replace the parameter
3899 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3900 (uses_parameter_packs): Don't set parameter packs to
3902 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3903 which may be modified (if it is a parameter pack). Instructs
3904 find_parameter_packs_r to replace parameter packs with
3905 ERROR_MARK_NODE (so that they won't cause errors later on).
3906 (process_template_parm): Pass pointer to
3907 check_for_bare_parameter_packs.
3908 (process_partial_specialization): Replace pack expansions before
3909 the end of the template argument list with ERROR_MARK_NODE.
3910 (push_template_decl_real): Pass pointer to
3911 check_for_bare_parameter_packs. Replace parameter packs not at the
3912 end of the template parameter list with ERROR_MARK_NODE.
3913 (convert_template_argument): Be more careful about using DECL_NAME
3914 on only declarations.
3915 (unify): Can't unify against ERROR_MARK_NODE.
3916 * semantics.c (finish_cond): Pass pointer to
3917 check_for_bare_parameter_packs.
3918 (finish_expr_stmt): Ditto.
3919 (finish_for_expr): Ditto.
3920 (finish_switch_cond): Pass pointer to
3921 check_for_bare_parameter_packs, and call it before we put the
3922 condition into the statement.
3923 (finish_mem_initializers): Pass pointer to
3924 check_for_bare_parameter_packs.
3925 (finish_member_declaration): Ditto.
3926 * parser.c (cp_parser_base_clause): Ditto.
3928 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3931 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3932 with the final TREE_READONLY flag in place. processing_template_decl
3933 is known to be 0 in this part of function.
3936 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3937 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3938 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3939 * semantics.c (finish_omp_atomic): Revert most of the
3940 2007-02-05 changes, just keep the new representation of
3941 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3943 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3946 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3949 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3954 * typeck.c (merge_types): Don't lose rvalue references when
3956 * call.c (build_over_call): Don't elide move constructors just
3957 because the copy constructor is trivial (!).
3958 (compare_ics): If comparing cv-qualifiers fails, we can still order
3959 based on binding lvalues vs. rvalues.
3961 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3964 * pt.c (unify_pack_expansion): bring handling of function call
3965 arguments into line with type_unification_real.
3967 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3969 * typeck.c (build_binary_op): Use pedwarn instead of error for
3972 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3975 * parser.c (cp_parser_unary_expression): For &&label call
3976 cp_parser_non_integral_constant_expression and return error_mark_node
3977 if it returned true.
3980 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3981 is neither FUNCTION_TYPE nor METHOD_TYPE.
3983 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3986 * parser.c (cp_parser_nested_name_specifier_opt): Use
3987 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3988 typedef of currently open class.
3990 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3993 * error.c (dump_expr): Deal specially with statements.
3995 2007-11-01 Jason Merrill <jason@redhat.com>
3998 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
4000 (lookup_template_class): Use it to get the outer template args
4001 for instantiating one.
4004 * pt.c (reduce_template_parm_level): tsubst the parameters
4005 of a template template parm.
4007 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
4010 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
4012 2007-11-01 Jakub Jelinek <jakub@redhat.com>
4015 * parser.c (cp_parser_postfix_dot_deref_expression): If
4016 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
4017 first and if that succeeds and type is SCALAR_TYPE_P, create
4021 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
4022 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
4023 as for std::type_info.
4025 2007-10-31 Paolo Carlini <pcarlini@suse.de>
4028 * cxx-pretty-print.c (pp_cxx_typeid_expression,
4029 pp_cxx_delete_expression): Change to static linkage.
4030 * cxx-pretty-print.h: Adjust declarations.
4031 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
4032 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
4033 MODOP_EXPR): Forward to pp_expression.
4035 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
4038 2007-10-31 Christian Bruel <christian.bruel@st.com>
4039 Mark Mitchell <mark@codesourcery.com>
4042 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
4043 if retval is volatile.
4045 2007-10-30 Jakub Jelinek <jakub@redhat.com>
4048 * decl2.c (build_offset_ref_call_from_tree): Call
4049 build_non_dependent_expr on object prior to building ADDR_EXPR from it
4050 if FN is DOTSTAR_EXPR.
4052 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
4056 * pt.c (find_parameter_packs_r): Fix typo in comment.
4057 (convert_template_argument): Look at the pattern of a pack
4058 expansion to determine what kind of entity we're converting.
4059 (coerce_template_parameter_pack): When we have coerced a non-type
4060 template parameter pack, substitute into the type of that pack.
4061 (tsubst_pack_expansion): When our substitution of a parameter pack
4062 is a "trivial" substitution of itself, just substitute into the
4063 pack expansion rather than actually expanding.
4065 2007-10-29 Jakub Jelinek <jakub@redhat.com>
4068 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
4069 for non-integral type bitfields. Return true if bitfield is correct, false
4070 error has been diagnosed.
4071 (check_field_decls): If check_bitfield_decl returned false, call also
4074 2007-10-28 Paolo Carlini <pcarlini@suse.de>
4075 Mark Mitchell <mark@codesourcery.com>
4078 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4079 class member error out and return.
4081 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4083 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4084 to current_function_decl rather than 0.
4087 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4089 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4091 2007-10-27 Jason Merrill <jason@redhat.com>
4094 * call.c (convert_default_arg): Detect recursion.
4096 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4099 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4100 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4102 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4104 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4106 2007-10-26 Jason Merrill <jason@redhat.com>
4109 * pt.c (get_template_info): New fn.
4110 (template_class_depth): Use it.
4111 (push_template_decl_real): Check that the template args of the
4112 definition match the args of the previous declaration.
4114 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4117 * decl2.c (coerce_new_type): Do not allow a default argument for
4118 the first parameter.
4120 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4123 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4124 don't see the leading '('. Only lookup names if we get an
4127 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4130 * parser.c (cp_parser_parenthesized_expression_list): Set
4131 greater_than_is_operator_p to true in between the parens.
4133 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4136 * decl.c (grokdeclarator): In case of conflicting specifiers
4137 just return error_mark_node.
4139 2007-10-26 Ollie Wild <aaw@google.com>
4141 * expr.c (cxx_expand_expr): Removed.
4142 * cp-tree.h (exx_expand_expr): Removed.
4143 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4146 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4149 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4151 2007-10-23 Jason Merrill <jason@redhat.com>
4153 PR c++/25950 (DR 391)
4154 * call.c (struct conversion): Remove check_copy_constructor_p.
4155 (reference_binding): Always bind a reference directly to a
4156 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4158 (check_constructor_callable): Remove.
4159 (convert_like_real): Don't call it.
4160 (initialize_reference): Don't call check_constructor_callable.
4161 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4162 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4163 conversions if LOOKUP_NO_TEMP_BIND.
4164 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4165 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4167 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4169 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4172 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4173 before checking if its type is integral.
4175 2007-10-22 Jason Merrill <jason@redhat.com>
4178 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4179 * pt.c (apply_late_template_attributes): Splice out dependent
4180 attributes from DECL_ATTRIBUTES.
4182 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4184 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4186 * typeck.c (build_binary_op) : Use appropriate warning option
4187 instead of unnamed warning.
4189 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4192 * pt.c (current_template_args): Do not change TREE_LIST elements
4193 with a TREE_VALUE of error_mark_node.
4195 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4197 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4198 * decl.c (start_decl): Tidy.
4199 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4201 (grokdeclarator): Clarify comment.
4203 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4206 * decl.c (grokfndecl): Return NULL after the "definition of
4207 implicitly-declared" error happened.
4209 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4212 * call.c (build_user_type_conversion_1): Do not consider conversion
4213 functions to convert a (possibly cv-qualified) object to the (possibly
4214 cv-qualified) same object type (or a reference to it), to a (possibly
4215 cv-qualified) base class of that type (or a reference to it).
4217 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4219 * pt.c (tsubst): Use template_parm_level_and_index.
4221 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4224 * parser.c (cp_parser_compound_statement): Handle label-declarations
4225 at the beginning of the compound statement.
4226 (cp_parser_block_declaration): Issue diagnostics about __label__
4227 not at the beginning of a block.
4229 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4232 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4233 to convert_template_argument.
4234 (coerce_template_parms): Return error_mark_node after fixed-length
4236 (tsubst_decl): Check for error_mark_node the return value of the
4237 first tsubst in 'case VAR_DECL'.
4239 2007-10-08 Ollie Wild <aaw@google.com>
4241 * typeck2.c (digest_init): Call cplus_expand_constant after
4242 convert_for_initialization.
4243 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4244 * expr.c (cplus_expand_constant): Updated function description.
4246 2007-10-04 Jason Merrill <jason@redhat.com>
4249 * call.c (initialize_reference): Handle local static reference
4252 2007-10-03 Jason Merrill <jason@redhat.com>
4255 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4256 (push_namespace): Here.
4257 (handle_namespace_attrs): New fn for the attr code.
4258 (leave_scope): Don't pop_visibility.
4259 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4260 * parser.c (cp_parser_namespace_definition): Call
4261 handle_namespace_attrs and pop_visibility as appropriate.
4264 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4266 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4268 * decl.c (duplicate_decls): Preserve linkage flags for mere
4269 redeclarations of gnu_inline definitions.
4271 2007-10-03 Jason Merrill <jason@redhat.com>
4274 * decl.c (wrap_cleanups_r): New fn.
4275 (wrap_temporary_cleanups): New fn.
4276 (initialize_local_var): Call it.
4278 2007-09-29 Jason Merrill <jason@redhat.com>
4281 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4282 constant to not have DECL_EXTERNAL if it's file-local.
4284 2007-09-28 Ollie Wild <aaw@google.com>
4287 2007-09-27 Ollie Wild <aaw@google.com>
4289 * typeck2.c (digest_init): Call cplus_expand_constant after
4290 convert_for_initialization.
4291 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4292 * expr.c (cplus_expand_constant): Updated function description.
4294 2007-09-28 Jason Merrill <jason@redhat.com>
4297 * class.c (layout_empty_base): Take rli parameter, update
4298 rli->record_align if empty base has user-specified alignment.
4299 (build_base_field): Pass rli to it.
4301 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4304 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4306 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4309 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4310 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4311 (dump_parameters): Just call dump_type for argument packs too.
4313 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4316 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4317 qualification by creating qualified PACK_EXPANSION_PATTERN and
4318 then calling make_pack_expansion on it.
4320 2007-09-27 Ollie Wild <aaw@google.com>
4322 * typeck2.c (digest_init): Call cplus_expand_constant after
4323 convert_for_initialization.
4324 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4325 * expr.c (cplus_expand_constant): Updated function description.
4327 2007-09-27 Jason Merrill <jason@redhat.com>
4330 * decl2.c (is_late_template_attribute): Don't crash on unknown
4333 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4336 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4337 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4338 spaces in the formatting.
4339 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4341 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4343 * error.c (cxx_print_error_function): Add third argument, pass
4344 it over to lhd_print_error_function.
4345 (cp_print_error_function): If diagnostic->abstract_origin, print
4347 * cp-tree.h (struct diagnostic_info): New forward decl.
4348 (cxx_print_error_function): Add third argument.
4350 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4353 * name-lookup.c (pushtag): Do not create an implicit typedef before
4354 the associated type declaration is known to be valid.
4356 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4358 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4359 rather than pointers.
4361 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4364 * search.c (check_final_overrider): Fail if
4365 targetm.comp_type_attributes returns 0.
4367 2007-09-24 Jason Merrill <jason@redhat.com>
4370 * pt.c (resolve_typename_type): Don't look things up in the original
4371 template if it would mean losing template arguments.
4373 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4376 * cp-tree.h (cxx_type_hash_eq): New prototype.
4377 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4378 * tree.c (cxx_type_hash_eq): New function.
4380 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4383 * tree.c (cp_build_qualified_type_real): Build a canonical
4384 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4386 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4390 * tree.c (cplus_array_compare): Compare pointers, not types.
4391 (build_cplus_array_type_1): Store new array type into the hash
4392 table before building the canonical type; build the canonical type
4394 (cp_build_qualified_type_real): Put all of the array types with
4395 cv-qualified element types into the C++ array hash table, built as
4396 variants of the unqualified versions.
4398 2007-09-23 Jason Merrill <jason@redhat.com>
4401 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4402 for deprecation warnings.
4404 2007-09-22 Jason Merrill <jason@redhat.com>
4407 * call.c (build_over_call): Warn about deprecated virtuals.
4410 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4411 (MAYBE_TAGGED_TYPE_P): Remove.
4412 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4413 instead of calling is_late_template_attribute again.
4414 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4415 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4416 Don't crash on typedefs from non-template classes.
4417 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4418 (is_late_template_attribute): All attributes applied to template
4419 parms or typename types are dependent. Static.
4420 (splice_template_attributes): Pass decl through.
4421 (save_template_attributes): Likewise.
4423 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4426 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4427 returned from tsubst_pack_expansion.
4428 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4429 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4431 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4434 * semantics.c (finish_id_expression): Use consistently
4435 context_for_name_lookup.
4436 * decl.c (fixup_anonymous_aggr): Fix error message for
4437 anonymous struct (vs union).
4439 2007-09-19 Jason Merrill <jason@redhat.com>
4442 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4443 (retrieve_specialization): Only tagged types use
4444 DECL_TEMPLATE_INSTANTIATIONS.
4445 (instantiate_class_template): Push nested classes too.
4446 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4448 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4449 * init.c (is_aggr_type): Remove redundant tests.
4450 * class.c (push_nested_class): Use CLASS_TYPE_P.
4452 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4455 * init.c (build_zero_init): If, recursively, build_zero_init
4456 returns a NULL_TREE, do not append it to the VEC of constructors.
4458 2007-09-18 Jason Merrill <jason@redhat.com>
4461 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4462 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4463 ATTR_FLAG_TYPE_IN_PLACE.
4464 (tsubst): Do unqualified lookup to find typedefs from current class.
4465 [ARRAY_TYPE]: Propagate alignment info.
4466 * decl2.c (is_late_template_attribute): Only defer handling of
4467 attribute aligned if the expression is dependent.
4468 (save_template_attributes): If we're deferring any attributes,
4469 make this a naming typedef.
4471 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4473 PR c++/33462 (again)
4474 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4475 va_arg instead of __builtin_va_arg.
4477 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4480 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4481 (pp_cxx_primary_expression): Use it.
4482 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4483 * error.c (dump_expr): Use it.
4485 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4488 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4489 out case TYPEID_EXPR to...
4490 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4491 and pp_cxx_right_paren.
4492 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4493 * error.c (dump_expr): Use it.
4495 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4498 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4499 (pp_cxx_primary_expression): Use it.
4500 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4501 * error.c (dump_expr): Use it.
4503 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4506 * init.c (build_new): Remove warning for zero-element
4509 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4512 * call.c (maybe_handle_implicit_object): Set this_p, clear
4513 rvaluedness_matches_p.
4514 (compare_ics): Do not compare rvaluedness matching when one of the
4515 operands is an implicit object.
4517 2007-09-14 Jason Merrill <jason@redhat.com>
4519 PR c++/17743, c++/19163
4520 * decl2.c (is_late_template_attribute): New fn.
4521 (splice_template_attributes, save_template_attributes): New fns.
4522 (cplus_decl_attributes): Call save_template_attributes.
4523 * pt.c (apply_late_template_attributes): New fn.
4524 (instantiate_class_template, tsubst_decl): Use it.
4525 * cp-tree.h: Declare is_late_template_attribute.
4527 2007-09-13 Tom Tromey <tromey@redhat.com>
4529 * parser.c (cp_lexer_new_main): Don't use
4530 c_lex_return_raw_strings.
4531 (cp_lexer_get_preprocessor_token): Update. Add special case when
4534 2007-09-11 Jan Hubicka <jh@suse.cz>
4536 * method.c (use_thunk): Use tree_rest_of_compilation
4537 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4538 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4539 * cp-tree.h (expand_body): Kill.
4540 (emit_associated_thunks): Declare.
4541 * semantics.c (emit_associated_thunks): Export.
4542 (expand_body): Kill.
4544 2007-09-09 David Daney <ddaney@avtrex.com>
4547 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4548 to calculate cookie_ptr.
4550 2007-09-08 Jason Merrill <jason@redhat.com>
4553 * pt.c (most_specialized_class): Set processing_template_decl
4554 while tsubsting partial spec args.
4556 2007-09-06 Jason Merrill <jason@redhat.com>
4558 * decl2.c (get_guard): Copy visibility from the guarded variable.
4560 2007-09-06 Jan Hubicka <jh@suse.cz>
4562 * semantics.c (expand_body): Do not mark arguments of clones used.
4564 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4567 * decl.c (cp_finish_decl): When processing_template_decl,
4568 deal correctly with init as TREE_LIST.
4570 2007-09-06 Tom Tromey <tromey@redhat.com>
4572 * decl.c (finish_function): Put return's location on line zero of
4575 2007-09-05 Jason Merrill <jason@redhat.com>
4578 * except.c (prepare_eh_type): Use type_decays_to.
4581 * init.c (build_delete): Use build_headof to get the address of the
4582 complete object if we aren't using the deleting destructor.
4583 * rtti.c (build_headof): No longer static.
4584 * cp-tree.h: Declare it.
4586 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4588 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4589 decl if a prototype for XX is provided with throw().
4592 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4593 on __*_chk non-__builtin_* decls.
4595 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4598 * semantics.c (finish_id_expression): Use context_for_name_lookup
4599 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4600 * class.c (finish_struct_anon): Deal correctly with anonymous
4601 structs (vs unions, as GNU extension) in error messages.
4603 2007-09-05 Jan Hubicka <jh@suse.cz>
4605 * sematics.c (expand_body): Remove unnecesary import_export_decl
4606 call, DECL_EXTERNAL checks and current_function_decl saving.
4608 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4610 PR c++/29731 (again)
4611 * parser.c (cp_parser_primary_expression): Return error_mark_node
4612 when a statement-expression is found in a template-argument list.
4614 2007-09-04 Jason Merrill <jason@redhat.com>
4616 * except.c (initialize_handler_parm): Use
4617 fold_build_cleanup_point_expr.
4620 * call.c (reference_binding): Don't look for user-defined conversions
4624 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4625 the MUST_NOT_THROW_EXPR.
4627 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4629 * decl.c (cp_finish_decl): Call determine_visibility before
4630 make_rtl_for_nonlocal_decl.
4632 2007-09-04 Jason Merrill <jason@redhat.com>
4635 * pt.c (most_specialized_class): Substitute outer template
4636 arguments into the arguments of a member template partial
4638 (strip_innermost_template_args): New fn.
4640 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4642 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4644 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4646 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4647 * decl.c (cp_make_fname_decl): Likewise,
4648 * parser.c (cp_parser_string_literal): Likewise,
4649 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4650 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4653 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4656 * typeck.c (build_unary_op): Fix error message for
4657 Boolean expression as operand to operator--.
4659 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4661 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4662 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4665 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4668 * init.c (build_default_init): Make extern.
4669 * cp-tree.h (build_default_init): Declare here.
4670 * pt.c (tsubst_expr): When the instantiation of the initializer of
4671 a variable results in an empty list, default-initialize the
4673 (tsubst_copy_and_build): When the instantiation of the initializer
4674 in a new expression results in an empty initializer list,
4675 default-initialize it.
4677 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4679 * mangle.c (write_type): Change mangling of rvalue reference from
4682 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4684 * decl.c (duplicate_decls): Remove duplicated line.
4686 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4689 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4690 BOUND_TEMPLATE_TEMPLATE_PARM.
4692 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4695 * search.c (lookup_member): Check the name argument for
4698 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4701 * parser.c (cp_parser_trait_expr): Check rerurn value of
4704 2007-08-30 Ollie Wild <aaw@google.com>
4706 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4707 convert_ptrmem for pointer to member conversions.
4708 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4709 (ocp_convert): Update cp_convert_to_pointer call.
4710 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4712 (build_static_cast_1): Check can_convert for conversions in either
4714 (get_delta_difference_1): New function.
4715 (get_delta_difference): Refactor to call get_delta_difference_1.
4717 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4719 * decl.c (start_preparsed_function): Set
4720 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4722 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4725 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4726 BOUND_TEMPLATE_TEMPLATE_PARM.
4728 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4732 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4733 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4735 2007-08-27 Jason Merrill <jason@redhat.com>
4738 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4739 Look inside STMT_EXPR.
4740 * semantics.c (stmt_expr_value_expr): New fn.
4741 * cp-tree.h: Declare it.
4744 * decl.c (groktypename): Ignore attributes applied to class type.
4746 2007-08-28 Richard Guenther <rguenther@suse.de>
4748 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4750 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4752 * error.c (dump_expr): Handle COMPLEX_CST.
4753 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4754 (pp_cxx_expression): Likewise.
4756 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4758 * decl.c (GNU_INLINE_P): New.
4759 (duplicate_decls): Handle gnu_inline. Merge attributes and
4760 some flags in overriding definitions.
4761 (redeclaration_error_message): Handle gnu_inline.
4762 (start_preparsed_function): Likewise.
4764 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4766 * call.c (sufficient_parms_p): Constify.
4767 * class.c (same_signature_p): Likewise.
4768 * cp-gimplify.c (is_invisiref_parm,
4769 cxx_omp_privatize_by_reference): Likewise.
4770 * cp-objcp-common.c (has_c_linkage): Likewise.
4771 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4772 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4773 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4774 num_artificial_parms_for, comp_template_parms,
4775 template_parameter_pack_p, any_dependent_template_arguments_p,
4776 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4777 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4778 zero_init_p, member_p, cp_lvalue_kind,
4779 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4780 varargs_function_p, is_dummy_object, special_function_kind,
4781 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4782 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4783 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4784 cp_has_mutable_p, at_least_as_qualified_p,
4785 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4786 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4787 * except.c (nothrow_libfn_p): Likewise.
4788 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4790 * pt.c (comp_template_parms, template_parameter_pack_p,
4791 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4792 any_dependent_template_arguments_p): Likewise.
4793 * repo.c (repo_export_class_p): Likewise.
4794 * semantics.c (anon_aggr_type_p): Likewise.
4795 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4796 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4797 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4798 zero_init_p, special_function_p): Likewise.
4799 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4800 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4801 compparms, invalid_nonstatic_memfn_p,
4802 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4803 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4804 cp_has_mutable_p, lvalue_or_else): Likewise.
4806 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4808 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4809 * cp-objcp-common.c (cp_tree_size): Ditto.
4810 * tree.c (cp_walk_subtrees): Ditto
4811 * cp-tree.def (TINST_LEVEL): Go away.
4812 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4813 move together with other non-tree structs.
4814 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4815 (union lang_tree_node): Eliminate tinst_level field.
4816 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4817 (current_instantiation, outermost_tinst_level): Return
4818 a "struct tinst_level *".
4820 * error.c (print_instantiation_partial_context): Change second
4821 parameter to a "struct tinst_level *". Replace accessor macros
4823 (print_instantiation_full_context): Likewise.
4824 * lex.c (in_main_input_context): Likewise.
4826 * pt.c (struct pending_templates): New.
4827 (pending_templates, last_pending_template): Use it as a type.
4828 (current_tinst_level): Change typo to "struct tinst_level *"
4829 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4830 (add_pending_template): Construct a "struct pending_template".
4831 Replace TINST_LEVEL accessor macros with field access.
4832 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4833 (pop_tinst_level): Likewise.
4834 (instantiate_pending_templates): Likewise. Factor common code used
4835 when an instantiation has been done.
4836 (outermost_tinst_level): Replace tree_last with loop.
4837 (current_instantiation): Return a "struct tinst_level *".
4839 2007-08-24 Ollie Wild <aaw@google.com>
4841 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4842 * name-lookup.h (cp_binding_level): Remove vtables member.
4844 2007-08-24 Richard Guenther <rguenther@suse.de>
4846 * tree.c (cp_cannot_inline_tree_fn): Remove.
4847 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4848 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4851 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4854 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4855 error_mark_node right away if build_expr_type_conversion
4859 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4860 is error_mark_node rather than NULL_TREE.
4861 * pt.c (check_explicit_specialization): Likewise.
4864 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4865 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4867 2007-08-22 Jason Merrill <jason@redhat.com>
4870 * pt.c (outermost_tinst_level): New function.
4871 * lex.c (in_main_input_context): New function.
4872 * cp-tree.h: Declare it.
4873 * decl2.c (constrain_class_visibility): Use it to avoid warning
4874 about uses of the anonymous namespace in the main input file.
4876 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4878 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4880 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4883 * class.c (finish_struct_1): Warn when a class has virtual
4884 functions and accessible non-virtual destructor.
4886 2007-08-20 Richard Guenther <rguenther@suse.de>
4890 * call.c (build_new_method_call): Convert initializer to
4892 * init.c (build_aggr_init): Do not fiddle with types.
4893 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4894 * except.c (build_throw): Do not drop qualifiers for the
4896 * typeck.c (get_member_function_from_ptrfunc): Do not
4897 fiddle with types, instead convert.
4898 (build_ptrmemfunc1): Convert to the target type for
4900 (gfc_trans_allocate): Convert result to target type.
4901 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4902 pointer-to-member structures shall have alias set zero as well.
4904 2007-08-20 Richard Guenther <rguenther@suse.de>
4906 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4908 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4909 (nonstatic_local_decl_p): Likewise.
4910 * tree.c (cp_auto_var_in_fn_p): Remove.
4911 * decl.c (nonstatic_local_decl_p): Remove.
4913 2007-08-20 Richard Guenther <rguenther@suse.de>
4915 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4917 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4918 cp_walk_subtrees lh parameter.
4919 (cp_walk_tree_without_duplicates): New define to
4920 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4921 * tree.c (count_trees): Call
4922 cp_walk_tree_without_duplicates.
4923 (verify_stmt_tree): Call cp_walk_tree.
4924 (break_out_target_exprs): Likewise.
4925 (WALK_SUBTREE): Likewise.
4926 * cp-gimplify.c (cp_genericize): Likewise.
4927 * cp-pt.c (find_parameter_packs_r): Likewise.
4928 (uses_parameter_packs): Likewise.
4929 (make_pack_expansion): Likewise.
4930 (check_for_bare_parameter_packs): Likewise.
4931 (for_each_template_parm): Likewise.
4932 * decl.c (check_default_argument): Call
4933 cp_walk_tree_without_duplicates.
4934 * except.c (build_throw): Likewise.
4935 * decl2.c (type_visibility): Likewise.
4936 * semantics.c (expand_or_defer_fn): Likewise.
4937 (finalize_nrv): Call cp_walk_tree.
4939 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4942 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4943 Initialize it with save_expr rather than get_temp_regvar.
4945 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4948 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4951 2007-08-17 Ollie Wild <aaw@google.com>
4954 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4955 declarations into appropriate slots for comparison. Fix type
4958 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4961 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4962 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4964 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4967 * parser.c (cp_parser_class_head): Improve error message.
4969 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4971 * pt.c (instantiate_decl): Set input_location
4972 for the function end.
4974 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4976 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4978 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4979 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4980 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4981 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4982 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4983 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4984 * typeck.c (cp_type_quals): Likewise.
4985 * typeck2.c (cxx_incomplete_type_diagnostic,
4986 cxx_incomplete_type_error): Likewise.
4988 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4991 * pt.c (tsubst_friend_function): When check_classfn
4992 returns error_mark_node likewise return it.
4994 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4997 * typeck.c (check_return_expr): Don't NRV optimize vars in
4999 * decl.c (finish_function): Comment fix.
5001 2007-08-15 Paolo Carlini <pcarlini@suse.de>
5004 * pt.c (push_template_decl_real): Depending on TYPE_P
5005 use either TYPE_CONTEXT or DECL_CONTEXT.
5007 2007-08-14 Mark Mitchell <mark@codesourcery.com>
5009 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
5010 constructors and destructors return this.
5012 2007-08-14 Paolo Carlini <pcarlini@suse.de>
5015 * decl2.c (check_classfn): Return error_mark_node in case of error;
5016 in that case, do not call add_method.
5017 * decl.c (start_decl): Deal with check_classfn returning
5019 (grokfndecl): Likewise.
5020 * pt.c (tsubst_friend_function): Likewise.
5022 2007-08-14 Andrew Pinski <pinskia@gmail.com>
5025 * typeck.c (build_binary_op): Disallow vector float types with
5026 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
5028 2007-08-11 Ian Lance Taylor <iant@google.com>
5030 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
5032 * cp-tree.h (cxx_get_alias_set): Update declaration.
5034 2007-08-10 Ollie Wild <aaw@google.com>
5036 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
5038 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
5040 (unqualified_namespace_lookup): Fix ambiguous_decl call.
5041 (lookup_using_namespace): Fix ambiguous_decl call.
5042 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
5044 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5046 * call.c (name_as_c_string): Use CONST_CAST.
5047 * decl.c (build_decl): Likewise.
5048 * parser.c (cp_parser_string_literal): Likewise.
5050 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5053 * error.c (dump_expr): Consistently use the *_cxx_*
5054 variants of the pretty-print functions.
5056 2007-08-10 Paolo Carlini <pcarlini@suse.de>
5059 * decl.c (check_special_function_return_type): Just error
5060 on return type specified for conversion operator.
5062 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
5064 * typeck2.c (readonly_error): Handle general expressions.
5065 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
5067 2007-08-06 Dan Hipschman <dsh@google.com>
5069 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
5070 access function name.
5072 2007-08-04 Alfred Minarik <a.minarik@aon.at>
5075 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
5076 * g++spec.c (lang_specific_driver): Check them.
5078 2007-08-06 Paolo Carlini <pcarlini@suse.de>
5081 * pt.c (inline_needs_template_parms): Fix comment; change return type
5084 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
5087 2007-03-26 Dirk Mueller <dmueller@suse.de>
5089 * parser.c (cp_parser_member_declaration): Pedwarn
5090 about stray semicolons after member declarations.
5092 2007-08-02 Lee Millward <lee.millward@gmail.com>
5097 * parser.c (cp_parser_asm_definition): Detect and discard asm
5098 statements with invalid inputs or outputs.
5099 (cp_parser_asm_operand_list): Return error mark node if any
5100 of the operands are invalid. Adjust documentation.
5102 2007-08-02 Nick Clifton <nickc@redhat.com>
5104 * typeck.c: Change copyright header to refer to version 3 of the
5105 GNU General Public License and to point readers at the COPYING3
5106 file and the FSF's license web page.
5107 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5108 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5109 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5110 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5111 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5112 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5113 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5114 name-lookup.h, parser.c: Likewise.
5116 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5119 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5121 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5124 * semantics.c (finish_label_stmt): Reject the __label__
5125 extension outside function scopes.
5127 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5129 * parser.c (eof_token): Un-constify.
5130 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5131 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5134 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5136 * pt.c, tree.c, typeck2.c: Fix comment typos.
5138 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5139 Mark Mitchell <mark@codesourcery.com>
5142 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5143 hidden due to friend declarations in local classes.
5145 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5147 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5148 * cp-tree.def (DECLTYPE_TYPE): New.
5149 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5150 (dump_type_prefix): Ditto.
5151 (dump_type_suffix): Ditto.
5152 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5153 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5154 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5156 (DECLTYPE_TYPE_EXPR): New.
5157 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5158 (finish_declared_type): Declare.
5159 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5160 DECLTYPE_TYPE nodes.
5161 (pp_cxx_type_id): Ditto.
5162 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5163 (tsubst): Substitute into a DECLTYPE_TYPE node.
5164 (tsubst_copy): Ditto.
5165 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5167 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5168 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5169 structural equality (because we can't hash the expressions).
5170 (finish_declared_type): New.
5171 * lex.c (reswords): Add "decltype" keyword.
5172 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5173 (cp_parser_postfix_expression): Add member_access_only_p to
5174 restrict postfix expression to member access expressions.
5175 (cp_parser_unary_expression): Update call to
5176 cp_parser_postfix_expression to reflect new parameter.
5177 (cp_parser_declared_type): New.
5178 (cp_parser_simple_type_specifier): Parse decltype types.
5180 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5183 * call.c (convert_for_arg_passing): Only widen bitfields to their
5184 declared types if necessary.
5186 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5188 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5191 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5193 * decl.c (typename_hash, typename_compare): Constify.
5194 * mangle.c (hash_type, compare_type): Likewise.
5195 * pt.c (eq_local_specializations, hash_local_specialization):
5197 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5198 list_hash): Likewise.
5199 * typeck2.c (pat_compare): Likewise.
5201 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5203 * method.c (implicitly_declare_fn): Increase alignment if member
5204 function pointer format requires it.
5206 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5209 * typeck.c (check_return_expr): Do not pass a null argument
5212 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5215 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5218 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5221 * typeck.c (convert_arguments): Only use default args if we have
5225 * typeck.c (structural_comptypes): No need to check
5226 resolve_typename_type return value here.
5227 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5228 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5229 original type rather than error_mark_node in case of failure.
5230 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5231 resolve_typename_type result check.
5232 (cp_parser_direct_declarator, cp_parser_head,
5233 cp_parser_constructor_declarator_p): Likewise.
5235 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5237 * pt.c (template_parms_variadic_p): Remove.
5238 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5240 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5243 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5244 argument to dump_aggr_init_expr_args instead of false.
5246 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5248 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5249 canonical types; otherwise, fall back to structural type
5250 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5251 internal compiler error if the canonical types are wrong.
5253 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5256 * parser.c (cp_parser_make_indirect_declarator): When the
5257 the code argument is ERROR_MARK return cp_error_declarator.
5259 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5262 * decl.c (cxx_init_decl_processing): Don't set
5263 force_align_functions_log.
5264 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5265 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5266 FUNCTION_DECL, return its alignment.
5268 2007-07-09 Richard Guenther <rguenther@suse.de>
5270 * decl.c (start_preparsed_function): Do not promote return type.
5272 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5275 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5277 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5280 * pt.c (resolve_overloaded_unification): Robustify. Return a
5282 (type_unification_real): Adjust accordingly.
5284 2007-07-06 Richard Guenther <rguenther@suse.de>
5286 * init.c (build_new_1): Use the correct pointer type.
5287 * typeck2.c (build_m_component_ref): Likewise.
5289 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5292 * init.c (build_zero_init): Always build an initializer for
5294 * typeck2.c (build_functional_cast): Use build_zero_init.
5297 * init.c (build_new_1): Always pass the allocation function to
5298 build_op_delete_call.
5299 * call.c (build_op_delete_call): Handle operator delete with a
5300 variable-argument list. Do not issue an error when no matching
5301 deallocation function is available for a new operator.
5304 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5305 * decl.c (value_dependent_init_p): New function.
5306 (cp_finish_decl): Use it.
5307 * pt.c (value_dependent_expression_p): Use
5308 any_value_dependent_elements_p.
5309 * parser.c (cp_parser_primary_expression): Add comment about
5310 treating dependent qualified names as integral
5311 constant-expressions.
5313 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5315 * decl.c (build_ptrmemfunc_type): Always use structural equality
5316 tests when comparing pointer-to-member-function types, because the
5317 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5320 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5322 * init.c (build_new): Tweak comment.
5324 2007-06-29 Dave Brolley <brolley@redhat.com>
5327 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5328 type to its base type and number of elements here.
5329 * init.c (build_new): Call complete_type_or_else to ensure that the
5330 type is complete and to issue a diagnostic if it is not.
5331 (build_new_1): Don't call complete_type_or_else here.
5333 2007-07-03 Richard Guenther <rguenther@suse.de>
5336 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5339 2007-07-02 Simon Baldwin <simonb@google.com>
5341 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5342 for inner-style nested forward declarations that don't declare
5345 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5348 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5349 DECL_P in not a variable and appears more than once error messages.
5351 2007-07-01 Ollie Wild <aaw@google.com>
5353 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5354 (select_decl): Remove function.
5355 (unqualified_namespace_lookup): Populate binding by calling
5356 ambiguous_decl. Remove select_decl call.
5357 (lookup_qualified_name): Remove select_decl call.
5358 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5359 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5360 generation when name lookup is ambiguous.
5362 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5365 * init.c (build_new_1): Use structural equality on the copy of the
5368 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5370 * decl2.c (determine_visibility): Implement
5371 flag_visibility_ms_compat effect on type info.
5372 * decl.c (cxx_init_decl_processing): Implement
5373 global effect of flag_visibility_ms_compat.
5375 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5377 * decl2.c (start_objects): Mark constructor-running function
5380 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5383 * decl.c (grokdeclarator): Reset friendp for member functions declared
5384 friend of their own class.
5386 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5388 * decl2.c (determine_visibility): Don't look for dllexport here.
5389 (determine_visibility_from_class): Tidy.
5391 2007-06-18 Simon Baldwin <simonb@google.com>
5394 * parser.c (cp_parser_single_declaration): Added check for storage
5395 class other than sc_none in parsed declaration, and a flag to indicate
5396 if the call is part of an explicit template specialization parse.
5397 * (cp_parser_explicit_specialization): Specialization check flag added
5398 to call to cp_parser_single_declaration(), set true.
5399 * (cp_parser_template_declaration_after_export): Specialization check
5400 flag added to call to cp_parser_single_declaration(), set false.
5401 * pt.c (check_explicit_specialization): Added code to copy visiblity
5402 and linkage from the templated function to the explicit specialization.
5404 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5406 * typeck.c (build_binary_op): For templates build the
5407 expression in pieces to avoid the assert in build2_stat.
5408 (get_member_function_from_ptrfunc):
5409 Change over to using POINTER_PLUS_EXPR and convert
5410 the second operand to sizetype.
5411 * typeck2.c (build_m_component_ref): Likewise.
5412 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5413 instead of PLUS_EXPR for pointers.
5414 (build_new_1): Likewise.
5415 (build_vec_delete_1): Likewise.
5416 (build_vec_delete): Likewise.
5417 * class.c (build_base_path): Likewise.
5418 (build_base_path): Likewise.
5419 (convert_to_base_statically): Likewise.
5420 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5421 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5422 instead of PLUS_EXPR.
5423 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5424 instead of PLUS_EXPR for pointers.
5425 * call.c (build_special_member_call): Likewise.
5426 * rtti.c (build_headof): Likewise.
5427 Use sizetype instead of ptrdiff_type_node.
5428 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5429 instead of PLUS_EXPR for pointers.
5430 * except.c (expand_start_catch_block): Do a
5431 NEGATIVE and then a POINTER_PLUS_EXPR instead
5433 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5434 PLUS_EXPR on pointer types over to use
5435 POINTER_PLUS_EXPR and remove the conversion
5436 to the pointer types.
5437 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5438 adding to a pointer type. Use size_int instead of
5439 ssize_int. Convert the index to sizetype before
5440 adding it to the pointer.
5442 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5444 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5445 (DECL_ANON_UNION_VAR_P): New macro.
5446 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5447 than DECL_VAR_MARKED_P, to keep track of which variables we have
5449 * decl.c (redeclaration_error_message): Complain about redeclaring
5450 anonymous union members at namespace scope.
5451 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5453 2007-06-14 Geoff Keating <geoffk@apple.com>
5455 * decl2.c (determine_visibility): Ensure that functions with
5456 hidden types as parameters are hidden.
5459 * decl2.c (determine_visibility): Remove duplicate code for
5462 2007-06-12 Ian Lance Taylor <iant@google.com>
5465 * init.c (avoid_placement_new_aliasing): New static function.
5466 (build_new_1): Call it.
5468 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5470 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5471 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5473 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5476 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5477 on init, the non-decl cond operand and increment value.
5479 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5482 * decl.c (check_initializer): Report an error when a brace enclosed
5483 initializer is used for a non-aggregate type in C++98.
5484 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5486 (grokdeclarator): Likewise.
5487 (move_fn_p): Likewise.
5488 * typeck.c (check_return_expr): Likewise.
5489 * call.c (reference_binding): Likewise.
5490 * error.c (cp_cpp_error): Likewise.
5491 * pt.c (check_default_tmpl_args): Likewise.
5493 * lex.c (init_reswords): Likewise.
5494 * parser.c (p_parser_primary_expression): Likewise.
5495 (TOKEN_PRECEDENCE): Likewise.
5496 (cp_parser_init_declarator): Likewise.
5497 (cp_parser_ptr_operator): Likewise.
5498 (cp_parser_parameter_declaration): Likewise.
5499 (cp_parser_enclosed_template_argument_list): Likewise.
5500 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5501 (cp_parser_next_token_ends_template_argument_p): Likewise.
5503 2007-06-04 Simon Baldwin <simonb@google.com>
5505 * decl.c (grokdeclarator): Readability change. Moved case labels
5506 into direct switch statement scope.
5508 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5510 * call.c (convert_like_real): Remove pointless code.
5512 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5514 * decl.c (get_atexit_fn_ptr_type): New function.
5515 (get_atexit_node): Use it.
5516 (start_cleanup_fn): Likewise.
5517 (register_dtor_fn): Use the object's destructor, instead of a
5518 separate cleanup function, where possible.
5519 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5520 (atexit_fn_ptr_type_node): New macro.
5521 * decl2.c (build_cleanup): Use build_address.
5523 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5525 * typeck.c (build_binary_op): Include types in error.
5527 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5530 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5531 needs runtime initialization.
5533 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5536 * semantics.c (finish_trait_expr): Complete the types.
5538 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5539 Douglas Gregor <doug.gregor@gmail.com>
5540 Pedro Lamarao <pedro.lamarao@mndfck.org>
5541 Howard Hinnant <howard.hinnant@gmail.com>
5545 * typeck.c (comptypes): Don't consider rvalue and lvalue
5546 reference types to be equivalent.
5547 (check_return_expr): Move from certain lvalues when returning
5549 * decl.c (grokdeclarator): Implement reference collapsing.
5550 (copy_fn_p): Don't consider constructors taking rvalue references
5551 to be copy constructors.
5553 * call.c (conversion): New "rvaluedness_matches_p" member.
5554 (convert_class_to_reference): Require reference type as first
5555 parameter instead of base type.
5556 (reference_binding): Add logic to handle rvalue references.
5557 (implicit_conversion): Update inaccurate comment.
5558 (convert_like_real): Disable creation of temporaries that are
5559 impossible to initialize for types with move constructors.
5560 (build_over_call): Elide move constructors when possible.
5561 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5562 (maybe_handle_ref_bind): Return conversion instead of type node.
5563 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5564 determine preferred conversion sequences.
5565 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5566 (LOOKUP_PREFER_RVALUE): New.
5567 (DECL_MOVE_CONSTRUCTOR_P): New.
5568 (struct cp_declarator): Add "reference" member for reference
5569 types, with new "rvalue_ref" flag.
5570 (cp_build_reference_type): Declare.
5571 (move_fn_p): Declare.
5572 * error.c (dump_type_prefix): Format rvalue reference types
5573 correctly in error messages.
5574 * except.c (build_throw): Move from certain lvalues when
5576 * mangle.c (write_type): Mangle rvalue references differently
5577 than regular references.
5578 * parser.c (make_reference_declarator): Add boolean parameter for
5580 (cp_parser_make_indirect_declarator): New.
5581 (cp_parser_new_declarator_opt): Call
5582 cp_parser_make_indirect_declarator.
5583 (cp_parser_conversion_declarator_opt): Ditto.
5584 (cp_parser_declarator): Ditto.
5585 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5587 * pt.c (tsubst): Implement reference collapsing.
5588 (maybe_adjust_types_for_deduction): Implement special template
5589 parameter deduction rule for rvalue references.
5590 (type_unification_real): Update calls to
5591 maybe_adjust_types_for_deduction.
5592 (try_one_overload): Ditto.
5593 (unify_pack_expansion): Ditto.
5594 * tree.c (lvalue_p_1): Handle rvalue reference types.
5595 (cp_build_reference_type): New.
5597 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5600 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5601 variables that need runtime initialization.
5603 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5606 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5607 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5608 case POSTDECREMENT_EXPR>): Return the error_mark_node
5609 if either the real or imaginary parts would an
5612 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5613 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5616 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5617 token is a closing brace, false if there are no tokens left.
5618 (cp_parser_namespace_alias_definition): Only consume the next token if
5619 it is a closing brace.
5621 * parser.c (cp_parser_class_specifier): Likewise.
5623 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5625 * semantics.c (finish_member_declaration): Fix a typo in the
5628 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5640 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5641 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5642 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5643 whether everything was okay. Fix indentation.
5644 (push_template_decl_real): Check for bare parameter packs in
5645 function parameters; where errors occur, mark the parameter types
5646 with ERROR_MARK_NODEs to avert ICEs.
5647 (coerce_template_parameter_pack): New.
5648 (coerce_template_parms): Moved parameter pack coercion into
5649 coerce_template_parameter_pack, and permit it anywhere in the
5650 template parameter list (not just at the end). Parameter and
5651 argument indices can vary (somewhat) separately now, so add
5652 PARM_IDX and ARG_IDX.
5653 (fn_type_unification): Don't set an argument pack as incomplete if
5654 no argument pack was deduced.
5655 (type_unification_real): If a type parameter is a parameter pack
5656 and has not otherwise been deduced, it will be deduced to an empty
5658 (more_specialized_fn): Use the actual lengths of the argument
5659 lists when comparing against expansions.
5660 * semantics.c (finish_member_declaration): If a field's type has
5661 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5663 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5666 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5668 2007-05-22 Ollie Wild <aaw@google.com>
5670 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5671 (unqualified_namespace_lookup): Adds check for hidden types.
5673 2007-05-22 Ollie Wild <aaw@google.com>
5675 * decl.c (duplicate_decls): Verify namespace names are unique.
5677 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5679 * decl.c (cxx_maybe_build_cleanup): Handle
5680 __attribute__((cleanup)).
5682 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5684 * cvt.c (cp_convert_and_check): Don't check warnings if the
5687 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5689 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5691 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5694 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5695 type only if is a class type (5.2.8/4).
5697 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5699 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5700 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5701 c_common_unsigned_type.
5703 2007-05-11 Silvius Rus <rus@google.com>
5705 * typeck.c (build_indirect_ref): Add call to
5706 strict_aliasing_warning.
5707 (build_reinterpret_cast_1): Condition call to
5708 strict_aliasing_warning.
5710 2007-05-11 Jan Hubicka <jh@suse.cz>
5712 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5713 * decl2.c (start_objects): ctors and dtors are no longer public.
5714 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5716 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5718 * typeck.c (build_unary_op): Remove code that used to
5719 handle non lvalue increments/decrements.
5721 2007-05-07 Mike Stump <mrs@apple.com>
5723 * parser.c (check_empty_body): Add.
5724 (cp_parser_iteration_statement): Add call to check_empty_body.
5726 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5729 * mangle.c (write_mangled_name): Mangle static variable names.
5730 (write_unqualified_name): Use local-source-name for
5731 namespace-scope static variables.
5733 2007-05-04 Dirk Mueller <dmueller@suse.de>
5735 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5738 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5741 * decl2.c (constrain_class_visibility):
5742 Use strip_pointer_or_array_types instead of strip_array_types.
5744 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5747 * decl.c (reshape_init_r): Don't reshape the first element if it
5748 is a pointer to member function.
5750 2007-04-27 Simon Baldwin <simonb@google.com>
5752 * decl.c (grokparms): Changed message format from %qD to %qE.
5754 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5756 * error.c (maybe_warn_variadic_templates): Variadic templates are
5757 now in C++0x, so only warn about them in C++98 mode.
5759 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5762 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5763 integeral types from vectors types.
5765 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5768 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5769 for type dependent OMP_CLAUSE_DECLs.
5771 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5774 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5775 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5776 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5777 * init.c (build_zero_init): Adjust, as
5778 COMPLEX_TYPE is now a SCALAR_TYPE.
5779 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5780 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5782 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5784 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5785 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5786 (trait_expr_value): Adjust.
5788 2007-04-23 Simon Baldwin <simonb@google.com>
5790 * decl.c (grokparms): Added new error for duplicate function
5791 parameters names in function prototypes, to match gcc behavior.
5793 2007-04-23 Jan Hubicka <jh@suse.cz>
5795 * decl2.c (finish_objects): Do not call target constructor/destructor
5798 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5800 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5801 instead of checking GIMPLE_STMT_P in chain_next.
5803 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5806 * call.c (convert_for_arg_passing): Convert bitfields to their
5809 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5812 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5814 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5817 * decl2.c (constrain_class_visibility):
5818 Do not warn about the use of anonymous namespace in the main input file.
5820 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5822 * cp-tree.h (current_template_parms): Fix typo in comment.
5824 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5826 * cp-tree.h, error.c: Fix comment typos.
5828 2007-04-13 Jason Merrill <jason@redhat.com>
5831 * call.c (reference_binding): Add c_cast_p parm. If true,
5832 add quals to TO as needed to make it reference-compatible.
5834 2007-04-11 Jan Hubicka <jh@suse.cz>
5836 * class.c (convert_to_base_statically): Fold produced tree; verify
5837 that we are not processing template_decl.
5839 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5842 * class.c (build_base_path): Ensure that the converted pointer has
5843 the same cv-qualification as the input.
5845 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5847 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5849 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5851 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5853 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5854 * tree.c (cp_add_pending_fn_decls): Remove.
5855 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5857 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5859 Revert change removing staticp.
5861 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5863 * cp-objcp-common.c (cxx_staticp): Remove.
5864 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5865 * cp-tree.h (cxx_staticp):
5867 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5869 * class.c (check_for_override): Don't remove dllmport attribute
5872 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5875 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5876 type issue error and return early.
5878 2007-03-30 Jason Merrill <jason@redhat.com>
5881 * typeck.c (cp_type_readonly): New fn.
5882 * cp-tree.h: Declare it.
5883 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5884 (cp_finish_decl): Not here.
5886 2007-03-31 Richard Guenther <rguenther@suse.de>
5888 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5891 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5896 * parser.c (declarator_can_be_parameter_pack): New.
5897 (cp_parser_template_parameter): Only parse the `...' if the
5898 declarator can be a parameter pack.
5899 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5901 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5902 types (they could be used as array bounds).
5903 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5904 (tsubst_pack_expansion): Handle failure to expand parameter
5907 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5910 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5911 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5912 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5913 (CLASS_TYPE_NON_UNION_P): Add.
5914 (struct lang_type_class): Add has_complex_dflt.
5915 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5916 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5917 * cp-tree.def: Add TRAIT_EXPR.
5918 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5919 * lex.c (struct resword): Add __has_nothrow_assign,
5920 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5921 __has_trivial_constructor, __has_trivial_copy,
5922 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5923 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5924 __is_pod, __is_polymorphic, __is_union.
5925 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5926 (cp_parser_trait_expr): New.
5927 * semantics.c (finish_trait_expr, trait_expr_value
5928 classtype_has_nothrow_copy_or_assign_p): New.
5929 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5931 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5932 * class.c (check_bases, check_field_decl, check_bases_and_members):
5933 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5934 * pt.c (uses_template_parms, tsubst_copy_and_build,
5935 value_dependent_expression_p, type_dependent_expression_p): Deal with
5937 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5939 2007-03-29 Richard Guenther <rguenther@suse.de>
5941 * tree.c (cp_walk_subtrees): Do not set input_location.
5943 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5946 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5949 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5951 * parser.c (struct cp_parser): Update comment for
5952 greater_than_is_operator_p.
5953 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5954 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5955 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5956 !GREATER_THAN_IS_OPERATOR_P.
5957 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5958 `>>' operators that will become two `>' tokens in C++0x.
5959 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5960 mode, allowing it to terminate default arguments.
5961 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5962 `>>' like two consecutive `>' tokens.
5963 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5964 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5965 ends a template argument.
5967 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5969 * decl.c (redeclaration_error_message): Complain when redeclaring
5970 a friend function with default template arguments (C++0x mode only).
5971 * cp-tree.h (check_default_tmpl_args): Declare.
5972 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5973 template arguments in function templates. Add support for checking
5974 the default template arguments of friend templates.
5975 (push_template_decl_real): Fix call to check_default_tmpl_args.
5976 (type_unification_real): If a template parameter has not been
5977 deduced but provides a default template argument, substitute into
5978 that default template argument.
5979 * parser.c (cp_parser_init_declarator): When declaring (but not
5980 defining!) a function template in C++0x mode, check for default
5983 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5986 * decl.c (grokdeclarator): Deal with cv-qualified function type
5987 typedefs in the same way for member and non-member functions.
5989 2007-03-26 Dirk Mueller <dmueller@suse.de>
5991 * parser.c (cp_parser_member_declaration): Pedwarn
5992 about stray semicolons after member declarations.
5994 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5997 * pt.c (instantiate_decl): Set in_system_header.
5999 2007-03-22 Mark Mitchell <mark@codesourcery.com>
6001 * cp-tree.h (current_tempalte_parms): Improve documentation.
6002 * pt.c (current_template_args): Likewise.
6005 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
6006 not consume tokens when failing.
6008 2007-03-22 Jim Wilson <wilson@specifix.com>
6009 Mark Mitchell <mark@codesourcery.com>
6012 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
6013 consistent with FROM.
6015 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6017 * error.c (dump_expr): Handle dependent names that designate types.
6018 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
6020 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
6022 * cp-tree.def, parser.c, pt.c: Fix comment typos.
6024 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6026 * cvt.c (cp_convert_and_check) : Define.
6027 * cp-tree.h (cp_convert_and_check): Declare.
6028 * call.c (convert_conversion_warnings): Rename to
6029 conversion_null_warnings. The warning for floating-point to
6030 integer is handled by convert_and_check in convert_like_real.
6031 (convert_like_real): convert_conversion_warnings was renamed as
6032 conversion_null_warnings.
6033 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
6034 overflow and changes of value during conversion.
6036 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6039 * parser.c (cp_parser_statement): If 'namespace' is found, this
6040 only can be a namespace alias definition, so parse it now.
6041 (cp_parser_namespace_alias_definition): if we find an open brace
6042 instead of '=', then this is actually a misplaced namespace
6045 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6048 * decl.c (cxx_init_decl_processing): Move command-line options
6049 processing to c-opts.c.
6051 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
6053 * ptree.c (cxx_print_type): Use formatting markup for integers
6054 when printing template parameter index/level/orig level.
6055 (cxx_print_xnode): Ditto.
6056 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
6057 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
6058 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
6060 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
6061 rather than a HOST_WIDE_INT.
6062 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
6063 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
6065 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
6066 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
6067 IN_BASE_INITIALIZER bool bitfields.
6068 (struct cp_declarator): Make KIND a 4-bit field. Make
6069 PARAMETER_PACK_P a bool bitfield just after KIND.
6070 * pt.c (uses_parameter_packs): Destroy the pointer set.
6071 (make_pack_expansion): Ditto.
6072 (check_for_bare_parameter_packs): Ditto.
6073 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
6075 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
6078 * call.c (convert_default_arg): Instead of copying the node,
6081 2007-03-15 Dirk Mueller <dmueller@suse.de>
6084 * call.c (convert_conversion_warnings): New..
6085 (convert_like_real): .. factored out from here.
6086 (convert_conversion_warnings): Add warning about
6087 false being converted to NULL in argument passing.
6089 2007-03-14 Dirk Mueller <dmueller@suse.de>
6091 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6092 (finish_do_body): Warn about empty body in do/while statement.
6094 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6096 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6098 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6101 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6104 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6106 * repo.c (init_repo): Initialize random_seed saved options.
6107 (finish_repo): Adjust.
6109 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6112 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6115 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6117 * decl.c (compute_array_index_type): New warning flag warn_vla.
6119 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6122 * call.c (convert_default_arg): Copy non-constant arguments.
6124 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6127 * parser.c (cp_parser_postfix_expression): Disallow compound
6128 literals in constant expressions.
6131 * semantics.c (finish_typeof): Use unlowered_expr_type.
6133 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6136 * cp-tree.h (unlowered_expr_type): New function.
6137 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6138 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6139 (unlowered_expr_type): New function.
6140 (build_unary_op): Disallow predecrements of bool bitfields.
6141 * call.c (build_conditional_expr): Use unlowered_expr_type.
6142 * pt.c (type_unification_real): Likewise.
6144 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6147 * typeck.c (check_return_expr): Check for bare parameter packs.
6148 (comptypes): Compare template parameter packs and
6149 type pack expansions.
6150 * decl.c (grokdeclarator): Deal with the declaration of function
6152 (grokparms): Verify that the (optional) function parameter pack is
6153 at the end of the parameter list.
6154 (xref_basetypes): Handle pack expansions in the base class.
6155 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6156 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6157 (NONTYPE_ARGUMENT_PACK): New.
6158 (TYPE_PACK_EXPANSION): New.
6159 (EXPR_PACK_EXPANSION): New.
6160 (ARGUMENT_PACK_SELECT): New.
6161 * cp-objcp-common.c (cp_tree_size): Compute size of
6162 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6163 ARGUMENT_PACK_SELECT.
6164 * error.c (dump_template_argument): Print template argument packs.
6165 (dump_template_argument_list): Ditto.
6166 (dump_template_parameter): Dump `...' for template type parameter
6168 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6169 (dump_parameters): Print function parameter packs.
6170 (dump_template_parms): Print template argument packs.
6171 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6172 (maybe_warn_variadic_templates): New.
6173 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6174 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6175 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6177 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6178 (write_template_arg): Write argument packs as separate arguments.
6179 * cp-tree.h (struct template_parm_index_s): Add flag that
6180 indicates that the template parameter is actually a parameter
6182 (struct tree_argument_pack_select): New.
6183 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6184 (union lang_tree_node): Add argument_pack_select.
6185 (FUNCTION_PARAMETER_PACK_P): New.
6186 (PACK_EXPANSION_P): New.
6187 (PACK_EXPANSION_PATTERN): New.
6188 (SET_PACK_EXPANSION_PATTERN): New.
6189 (PACK_EXPANSION_PARAMETER_PACKS): New.
6190 (ARGUMENT_PACK_P): New.
6191 (ARGUMENT_PACK_ARGS): New.
6192 (SET_ARGUMENT_PACK_ARGS): New.
6193 (ARGUMENT_PACK_INCOMPLETE_P): New.
6194 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6195 (TEMPLATE_PARM_PARAMETER_PACK): New.
6196 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6197 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6198 (ARGUMENT_PACK_SELECT_INDEX): New.
6199 (ARGUMENT_PACK_SELECT_ARG): New.
6200 (struct cp_declarator): Add parameter_pack_p flag.
6201 (maybe_warn_variadic_templates): Declare.
6202 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6203 indicate a template parameter pack.
6204 (uses_parameter_packs): Declare.
6205 (template_parameter_pack_p): Declare.
6206 (template_parms_variadic_p): Declare.
6207 (make_pack_expansion): Declare.
6208 (check_for_bare_parameter_packs): Declare.
6209 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6210 sizeof... expressions.
6211 (pp_cxx_expression): Print pack expansions and non-type argument
6213 (pp_cxx_exception_specification): Print pack expansions.
6214 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6215 (pp_cxx_ctor_initializer): Print pack expansions.
6216 (pp_cxx_type_id): Print pack expansions.
6217 (pp_cxx_template_argument_list): Print argument packs.
6218 (pp_cxx_template_parameter): Print ellipsis for template parameter
6220 * pt.c (comp_template_parms): Compare template parameter packs.
6221 (template_parameter_pack_p): New.
6222 (template_parms_variadic_p): New.
6223 (template_args_variadic_p): New.
6224 (make_ith_pack_parameter_name): New.
6225 (struct find_parameter_pack_data): New.
6226 (find_parameter_packs_r): New.
6227 (uses_parameter_packs): New.
6228 (make_pack_expansion): New.
6229 (check_for_bare_parameter_packs): New.
6230 (expand_template_argument_pack): New.
6231 (reduce_template_parm_level): Propagate parameter pack flag.
6232 (process_template_parm): Add is_parameter_pack parameter to state
6233 when the parameter is actually a parameter pack. Create template
6234 parameter packs when is_parameter_pack is true.
6235 (current_template_args): The argument for a template parameter
6236 pack is an argument pack containing a single pack expansion.
6237 (process_partial_specialization): When checking that non-type
6238 argument expressions do not involve template parameters, loop over
6239 the arguments in argument packs separately.
6240 (push_template_decl_real): Check that the type of the declaration
6241 does not have any bare parameter packs. Check that primary
6242 templates have no more than one parameter pack, and that it comes
6243 at the end of the template parameter list.
6244 (convert_template_argument): Handle coercions for pack expansion
6245 expressions by coercing the pattern then rebuilding the expansion.
6246 (coerce_template_parms): When coercing the arguments for a
6247 variadic template, pack "extra" arguments into an argument pack.
6248 (coerce_template_template_parms): Cannot coerce between parameter
6249 packs and non-pack parameters.
6250 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6251 (comp_template_args): Expand all template arguments packs before
6252 comparing template argument lists.
6253 (mangle_class_name_for_template): Make argument packs as separate
6255 (for_each_template_parm_r): No need to handle BASELINK.
6256 (instantiate_class_template): Handle pack expansions in the base
6258 (tsubst_pack_expansion): New.
6259 (tsubst_template_args): Handle substitutions of argument packs and
6260 pack expansion into template argument lists.
6261 (tsubst_decl): Expand function parameter packs into separate
6262 function parameters.
6263 (tsubst_arg_types): Expand a type pack expansion into separate
6265 (tsubst_exception_specification): Handle pack expansions in
6266 exception specifiers.
6267 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6268 replacing a template parameter with its argument. If we encounter
6269 a substitution for an argument pack, just return the parameter
6271 (tsubst_copy): sizeof(X...) returns the number of elements in
6272 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6273 PARM_DECL is a parameter pack.
6274 (tsubst_expr): Expression pack expansions and argument packs
6275 cannot show up here; they will all be handled through function
6276 calls, sizeof, and template argument lists.
6277 (tsubst_copy_and_build): sizeof(X...) returns the number of
6278 elements in parameter pack X. Handle pack expansions in TREE_LIST
6279 and CONSTRUCTOR nodes.
6280 (fn_type_unification): Handle "incomplete" explicit template
6281 argument lists that specify some of the arguments for a template
6283 (type_unification_real): Unify arguments against pack expansions.
6284 (template_parm_level_and_index): New, helper function.
6285 (unify_pack_expansion): New.
6286 (unify): Unify argument packs on an argument-by-argument basis,
6287 handling variadic argument packs as well.
6288 (more_specialized_fn): Handle unification of function parameter
6289 packs. All things being equal, prefer non-variadic function
6290 templates to variadic function templates.
6291 (more_specialized_class): Prefer the variadic class template
6292 partial specialization that binds fewer arguments to a parameter
6294 (regenerate_decl_from_template): Expand function parameter packs
6295 into separate parameters.
6296 (instantiate_decl): Ditto.
6297 (tsubst_initializer_list): Handle pack expansions for base-class
6299 (dependent_type_p_r): Determine dependent types in argument packs
6300 and pack expansions.
6301 (value_dependent_expression_p): Determine value-dependence of
6302 non-type argument packs.
6303 (dependent_template_arg_p): Handle argument packs.
6304 * semantics.c (finish_cond): Check for bare parameter packs.
6305 (finish_expr_stmt): Ditto.
6306 (finish_for_expr): Ditto.
6307 (finish_switch_cond): Ditto.
6308 (finish_mem_initializers): Ditto.
6309 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6311 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6312 * parser.c (make_declarator): Declarator is not an expansion.
6313 (make_pointer_declarator): Transfer parameter pack flag to outer
6315 (make_reference_declarator): Ditto.
6316 (make_ptrmem_declarator): Ditto.
6317 (make_call_declarator): Ditto.
6318 (make_array_declarator): Ditto.
6319 (cp_parser_postfix_expression): Allow pack expansion expressions
6320 in the argument list for a call expression.
6321 (cp_parser_parenthesized_expression_list): Add new parameter
6322 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6323 into separate arguments."
6324 (cp_parser_new_placement): Allow pack expansion expressions.
6325 (cp_parser_new_initializer): Ditto.
6326 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6327 base-class initializer expansion.
6328 (cp_parser_mem_initializer): Ditto.
6329 (cp_parser_template_parameter_list): Keep track of whether the
6330 template parameter is a template parameter pack.
6331 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6332 template parameter pack.
6333 (cp_parser_type_parameter): Ditto.
6334 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6336 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6337 this declarator is a parameter pack.
6338 (cp_parser_parameter_declaration): The ellipsis does not end the
6339 parameter declaration, because it might be a parameter pack. Parse
6340 the ellipsis to indicate a parameter pack.
6341 (cp_parser_initializer): Allow pack expansions.
6342 (cp_parser_initializer_list): Allow ellipsis to create an
6343 initializer expansion.
6344 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6346 (cp_parser_type_id_list): Allow ellipsis to create an exception
6347 specifier expansion.
6348 (cp_parser_attribute_list): Don't allow pack expansions.
6349 (cp_parser_functional_cast): Allow pack expansions.
6350 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6351 compute the length of a parameter pack.
6352 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6353 end a template argument.
6354 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6355 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6358 2007-03-09 Dirk Mueller <dmueller@suse.de>
6360 * call.c (build_new_op): Call warn_logical_operator.
6362 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6365 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6368 * pt.c (any_template_arguments_need_structural_equality_p):
6371 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6373 * decl.c (grokdeclarator): Disable warnings for anonymous
6376 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6378 * typeck2.c (readonly_error): Always emit a hard error.
6379 Remove last argument.
6380 * cp-tree.h (readonly_error): Adjust prototype.
6381 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6382 * typeck.c (build_unary_op): Likewise.
6383 (build_modify_expr): Likewise.
6385 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6388 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6390 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6393 * parser.c (struct cp_parser): New IN_IF_STMT.
6394 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6395 returning if parsing the body of an 'if' statement or issuing an
6396 error and continuing.
6397 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6399 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6401 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6404 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6407 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6409 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6410 Objective-C++. Don't exit early if -shared-libgcc needs to be
6413 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6415 * typeck.c (common_base_type): Delete unused function.
6417 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6419 * Make-lang.in: Add dummy lang.install-pdf target.
6421 2007-03-01 Simon Baldwin <simonb@google.com>
6424 * decl.c (check_tag_decl): Added new warning for typedef ignored
6425 when it precedes an otherwise valid non-typedef declaration.
6427 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6429 * typeck.c (build_function_call): Store converted arguments
6430 in a stack-allocated array instead of building a list.
6431 (convert_arguments): Store arguments in the array passed in as an
6432 argument, and return the actual number of arguments.
6433 * call.c (build_call): Delete, and replace with...
6434 (build_call_n, build_call_a): New.
6435 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6436 (build_over_call): Store converted arguments in a stack-allocated
6437 array instead of building a list.
6438 (build_cxx_call): Pass arguments in an array instead of as a list.
6439 (build_java_interface_fn_ref): Rewrite to avoid constructing
6441 * tree.h: Update declarations to reflect above changes.
6442 * method.c (use_thunk): Use a stack-allocated array to hold
6443 the arguments instead of a list.
6444 * rtti.c (throw_bad_cast): Update call to cxx_call.
6445 (throw_bad_typeid): Likewise.
6446 (build_dynamic_cast_1): Likewise.
6447 * init.c (build_builtin_delete_call): Use build_call_n.
6448 * decl.c (expand_static_init): Likewise.
6449 * except.c (cp_protect_cleanup_actions): Likewise.
6450 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6451 (gimplify_must_not_throw_expr): Likewise.
6452 (cxx_omp_apply_fn): Use build_call_a.
6454 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6456 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6457 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6459 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6461 * cp-tree.h (static_ctors): Remove.
6462 * cp-tree.h (static_dtors): Likewise.
6463 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6464 refactoring of tree_map hierarchy.
6465 (decl_shadowed_for_var_insert): Likewise.
6466 * semantics.c (expand_body): Use c_expand_body.
6467 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6468 * decl2.c (static_ctors): Remove.
6469 (static_dtors): Likewise.
6470 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6471 objc_generate_static_init_call. Do not call static_[cd]tors.
6472 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6474 (cp_write_global_declarations): Likewise.
6476 2007-02-23 Richard Guenther <rguenther@suse.de>
6478 * class.c (note_name_declared_in_class): Make declaration
6479 changes meaning a pedwarn.
6481 2007-02-22 Michael Matz <matz@suse.de>
6484 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6485 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6486 dump_function_decl): Guard emitting outer scopes by new flag.
6487 * cp-lang.c (cxx_dwarf_name): New function.
6488 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6489 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6491 (push_template_decl_real, lookup_template_class): Remove calls
6494 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6496 * call.c (build_new_method_call): Ensure that explicit calls of
6497 destructors have type "void".
6499 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6501 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6502 and -Walways-true with -Waddress.
6503 * cvt.c (convert_to_void): Replace unconditional warning with
6506 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6508 * decl.c, tree.c: Fix comment typos.
6510 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6513 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6514 statement expression if we had an error mark node.
6516 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6517 Brooks Moses <brooks.moses@codesourcery.com>
6518 Lee Millward <lee.millward@codesourcery.com>
6520 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6521 Change class to tcc_vl_exp.
6523 * call.c (build_call): Use build_call_list instead
6525 (build_over_call): Likewise.
6526 (build_new_method_call): Use build_min_non_dep_call_list
6527 instead of build_min_non_dep.
6529 * error.c (dump_call_expr_args): New function.
6530 (dump_aggr_init_expr_args): New function.
6531 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6532 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6534 * cvt.c (convert_to_void): Use build_call_array instead
6535 of build3; use new AGGR_INIT_EXPR accessor macros.
6537 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6538 instead of TREE_CODE_LENGTH.
6540 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6541 AGGR_INIT_EXPR accessor macros.
6543 * cp-gimplify.c (cp_gimplify_init_expr): Use
6544 AGGR_INIT_EXPR_SLOT to set the slot operand.
6546 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6547 (AGGR_INIT_EXPR_SLOT): New macro.
6548 (AGGR_INIT_EXPR_ARG): New macro.
6549 (aggr_init_expr_nargs): New macro.
6550 (AGGR_INIT_EXPR_ARGP): New macro.
6551 (aggr_init_expr_arg_iterator): New.
6552 (init_aggr_init_expr_arg_iterator): New.
6553 (next_aggr_init_expr_arg): New.
6554 (first_aggr_init_expr_arg): New.
6555 (more_aggr_init_expr_args_p): New.
6556 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6557 (stabilize_aggr_init): New declaration.
6558 (build_min_non_dep_call_list): Likewise.
6560 * tree.c (process_aggr_init_operands): New function.
6561 (build_aggr_init_array) New function.
6562 (build_cplus_new): Update to use new CALL_EXPR and
6563 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6564 build_aggr_init_array.
6565 (build_min_non_dep_call_list) New function.
6566 (build_min_nt): Assert input code parameter is not a variable
6567 length expression class.
6568 (build_min, build_min_non_dep): Likewise.
6569 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6570 to check for equality instead of recursing. Handle tcc_vl_exp
6572 (stabilize_call): Update to only handle CALL_EXPRs, not
6573 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6574 (stabilize_aggr_init): New function.
6575 (stabilize_init): Use it.
6577 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6578 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6579 AGGR_INIT_EXPR accessor macros and argument iterators.
6581 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6582 build_vl_exp. Iterate through the operands, recursively
6583 processing each one.
6584 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6585 CALL_EXPR accessor macros.
6586 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6587 tree code classes. Use TREE_OPERAND_LENGTH instead of
6590 * semantics.c (finish_call_expr): Use build_nt_call_list
6591 instead of build_nt.
6592 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6593 accessor macros. Use build_call_array to construct the
6594 CALL_EXPR node instead of build3
6596 * decl2.c (build_offset_ref_call_from_tree): Use
6597 build_nt_call_list and build_min_non_dep_call_list instead
6598 of build_min_nt and build_min_non_dep.
6600 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6601 Use build_nt_call_list instead of build_min_nt.
6603 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6606 * call.c (build_conditional_expr): Improve error message.
6608 2007-02-13 Dirk Mueller <dmueller@suse.de>
6610 * friend.c (do_friend): Annotate warning about friend
6611 declarations in templates with OPT_Wnon_template_friend.
6612 Convert informal message from warning() to inform().
6614 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6615 Mark Mitchell <mark@codesourcery.com>
6618 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6619 instantiations for variables.
6621 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6624 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6625 Check warn_unused_value just once.
6627 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6630 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6631 (fn_type_unificiation): Likewise.
6632 (get_bindings): Likewise.
6634 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6637 * decl.c (finish_function): Use DECL_REPLACEABLE.
6638 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6640 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6642 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6644 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6646 * decl.c (grokvardecl): Don't error if !have_tls.
6647 (grokdeclarator): Likewise.
6648 * parser.c (cp_parser_omp_threadprivate): Likewise.
6650 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6653 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6654 parameters and result decls in omp clauses.
6655 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6658 2007-02-05 Dirk Mueller <dmueller@suse.de>
6661 * parser.c (cp_parser_class_specifier): Always initialize bases.
6663 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6665 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6666 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6667 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6669 * semantics.c (finish_omp_atomic): Store a whole expression node
6670 in operand 1, and integer_zero_node in operand 0, for dependent
6671 OMP_ATOMIC. Rewrite to make flow easier to understand.
6673 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6675 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6677 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6679 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6680 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6682 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6684 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6685 keyword warning to -Wc++0x-compat.
6687 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6689 * decl.c (grokdeclarator): Update documentation.
6691 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6694 * decl.c (grokdeclarator): If __thread is used together with
6695 a storage class other than extern and static, clear thread_p
6696 after issuing diagnostics and fall through to checking the
6699 2007-01-30 Roger Sayle <roger@eyesopen.com>
6701 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6702 calculating the size of an array (to avoid recursive errors).
6704 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6707 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6709 * call.c (convert_like_real): Don't warn when converting to
6712 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6714 * decl.c (pop_label): Replace warning with call to
6715 warn_for_unused_label.
6717 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6720 * semantics.c (finish_pseudo_destructor_expr): Check the
6721 destrutor name by calling check_dtor_name.
6723 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6725 * lex.c (D_CPP0X): Rename.
6727 (reswords): D_CPP0X -> D_CXX0X.
6728 (init_reswords): Ditto.
6729 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6730 of C++0x keywords as identifiers.
6732 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6735 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6738 2007-01-23 Ian Lance Taylor <iant@google.com>
6740 * typeck.c (convert_for_assignment): Only warn about a = b = c
6741 when converting to bool.
6743 2007-01-23 Roger Sayle <roger@eyesopen.com>
6745 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6747 * typeck.c (ignore_overflows): Remove the remaining uses of
6748 TREE_CONSTANT_OVERFLOW.
6750 2007-01-20 Jan Hubicka <jh@suse.cz>
6752 * decl2.c (start_objects, start_static_storage_duration_function):
6753 Do not make the functions uninlinable.
6755 2007-01-17 Ian Lance Taylor <iant@google.com>
6757 * class.c (add_method): Call VEC_reserve_exact rather than passing
6758 a negative size to VEC_reserve.
6760 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6763 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6765 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6768 * decl.c (make_typename_type): If the qualified name is not a
6769 type, issue an error.
6770 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6773 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6775 * rtti.c: Include target.h.
6776 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6777 don't emit typeinfo for fundamental types as weak.
6778 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6780 2007-01-08 Richard Guenther <rguenther@suse.de>
6782 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6784 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6786 * call.c (standard_conversion): Pass flag to
6787 vector_types_convertible_p to disallow emission of note.
6788 * typeck.c (convert_for_assignment): Pass flag to
6789 vector_types_convertible_p to allow emission of note.
6790 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6791 to disallow emission of note.
6793 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6796 * typeck.c (build_binary_op): Call overflow_warning if
6797 TREE_OVERFLOW_P is true for the result and not for any of the
6800 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6803 * class.c (add_method): Don't wait until template
6804 instantiation time to complain about duplicate methods.
6806 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6809 * semantics.c (finish_unary_op_expr): Warn only if result
6810 overflowed and operands did not.
6812 2007-01-05 Ian Lance Taylor <iant@google.com>
6814 * typeck.c (build_binary_op): Warn about comparing a non-weak
6817 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6819 * pt.c (tsubst): Propagate the need for structural equality checks
6820 when reducing the level of template parameters.
6822 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6824 * pt.c: Fix a comment typo.
6826 2007-01-02 Ian Lance Taylor <iant@google.com>
6828 * semantics.c (maybe_convert_cond): Optionally warn when using an
6829 assignment as a condition.
6830 * typeck.c (convert_for_assignment): Optionally warn about
6831 assigning the result of an assignment to a bool.
6833 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6835 * pt.c (canonical_template_parms): Correct typo in comment.
6837 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6839 * typeck.c (structural_comptypes): Renamed from "comptypes".
6840 (comptypes): Use canonical type information to perform fast type
6841 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6842 canonical type comparison returns the same results as we would see
6843 from the current, structural check. Support COMPARE_STRUCTURAL
6844 when we need structural checks.
6845 * decl.c (typename_compare): Fix comment.
6846 (build_typename_type): TYPENAME_TYPE nodes require structural
6847 equality checks, because they resolve different based on the
6849 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6850 require structural equality checks (for now).
6851 (build_ptrmemfunc_type): Build the canonical pointer to member
6853 (compute_array_index_type): Whenever we build a new index type
6854 to represent the size of an array in a template, we need to mark
6855 this index type as requiring structural equality. This goes for
6856 arrays with value-dependent sizes with the current ABI, or all
6858 * tree.c (cplus_array_hash): New.
6859 (struct cplus_array_info): New.
6860 (cplus_array_compare): New.
6861 (cplus_array_htab): New.
6862 (build_cplus_array_type_1): Use a hash table to cache the array
6863 types we build. Build the canonical array type for each array
6865 (cp_build_qualified_type_real): When building a cv-qualified array
6866 type, use the hash table of array types and build canonical array
6868 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6869 use structural equality (for now).
6870 * cp-tree.h (COMPARE_STRUCTURAL): New.
6871 * pt.c (canonical_template_parms): New.
6872 (canonical_type_parameter): New.
6873 (process_template_parm): Find the canonical type parameter.
6874 (lookup_template_class): When we have named the primary template
6875 type, set the canonical type for our template class to the primary
6876 template type. If any of the template arguments need structural
6877 equality checks, the template class needs structural equality
6879 (tsubst): When reducing the level of a template template
6880 parameter, we require structural equality tests for the resulting
6881 parameter because its template parameters have not had their types
6882 canonicalized. When reducing a template type parameter, find the
6883 canonical reduced type parameter.
6884 (any_template_arguments_need_structural_equality_p): New.