1 2009-01-21 Dodji Seketeli <dodji@redhat.com>
4 * decl2.c (grokfield): when a typedef appears in a
5 class, create the typedef variant type node for it.
6 (save_template_attributes): Creating typedef variant type node
8 * decl.c (grokdeclarator): If the typedef'ed struct/class was
9 anonymous, set the proper type name to all its type variants.
10 * name-lookup.c (pushdecl_maybe_friend): Reuse the
11 set_underlying_type function to install typedef variant types.
12 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
14 (append_type_to_template_for_access_check): New entry points.
15 * semantics.c (check_accessibility_of_qualified_id):
16 When a typedef that is a member of a class appears in a template,
17 add it to the template. It will be ...
18 * pt.c (instantiate_class_template, instantiate_template ): ... access
19 checked at template instantiation time.
20 (tsubst): Handle the case of being called with NULL args.
21 (resolve_type_name_type): The type name should be the name of the
23 (append_type_to_template_for_access_check): New entry point.
25 2009-01-19 Jason Merrill <jason@redhat.com>
28 * parser.c (cp_parser_unqualified_id): In a template,
30 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
32 2009-01-16 Jason Merrill <jason@redhat.com>
35 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
36 * init.c (build_new): Don't call describable_type unless we
40 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
43 * search.c (protected_accessible_p): N doesn't vary.
45 2009-01-15 Jason Merrill <jason@redhat.com>
48 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
49 accept hidden friends.
51 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
54 * decl.c (grokdeclarator): Check for a non namespace/class context.
56 2009-01-15 Jason Merrill <jason@redhat.com>
60 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
61 a function isn't necessarily an lvalue. Take tree, not const_tree.
62 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
63 * typeck.c (lvalue_or_else): Likewise.
64 * cp-tree.h: Adjust prototypes.
66 2009-01-15 Steve Ellcey <sje@cup.hp.com>
69 * pt.c (tsubst): Check for NULL args.
71 2009-01-15 Dodji Seketeli <dodji@redhat.com>
74 * name-lookup.c (pushtag): Don't create members to types that are not
77 2009-01-14 Nick Clifton <nickc@redhat.com>
80 * parser.c: Pass cp_id_kind computed in
81 cp_parser_postfix_dot_deref_expression to
82 cp_parser_primary_expression.
84 2009-01-13 Jakub Jelinek <jakub@redhat.com>
87 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
88 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
91 2009-01-12 Jason Merrill <jason@redhat.com>
92 Steve Ellcey <sje@cup.hp.com>
95 * name-lookup.c (lookup_name_real): Keep looking past a hidden
98 2009-01-12 Dodji Seketeli <dodji@redhat.com>
101 * pt.c (parameter_of_template_p): New function.
102 * cp-tree.h: Declare it.
103 * name-lookup.c (binding_to_template_parms_of_scope_p): New
105 (outer_binding): Take template parameters in account when looking for
108 2009-01-12 Jason Merrill <jason@redhat.com>
111 * tree.c (pod_type_p): Return 1 for structs created by the back end.
113 2009-01-12 Jakub Jelinek <jakub@redhat.com>
116 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
117 offsetof member-designator, handle it as `[0].'.
120 * decl.c (start_function): If grokdeclarator hasn't returned
121 FUNCTION_DECL nor error_mark_node, issue diagnostics.
123 2009-01-11 Jakub Jelinek <jakub@redhat.com>
126 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
127 (gimplify_if_stmt): ... this.
128 (cp_gimplify_expr): Don't handle IF_STMT here.
129 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
131 2009-01-10 Andrew Pinski <pinskia@gmail.com>
134 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
137 * typeck2.c (build_functional_cast): Check for reference type and NULL
140 2009-01-09 Steve Ellcey <sje@cup.hp.com>
142 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
144 2009-01-09 Jakub Jelinek <jakub@redhat.com>
147 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
149 2009-01-09 John F. Carr <jfc@mit.edu>
152 * parser.c (cp_parser_class_specifier): Clear
153 parser->in_unbraced_linkage_specification_p while parsing class
156 2009-01-07 Jakub Jelinek <jakub@redhat.com>
159 * semantics.c (finish_goto_stmt): Convert destination to
162 2009-01-06 Jason Merrill <jason@redhat.com>
169 * pt.c (check_default_tmpl_args): Don't complain about
170 out-of-order parameter packs in the enclosing class
171 or parameter packs after default args.
172 (coerce_template_parms): If we have more than one
173 parameter pack, don't flatten argument packs.
174 (template_args_equal): Handle argument packs.
175 (comp_template_args): Don't flatten argument packs.
176 (check_instantiated_arg): Split out from...
177 (check_instantiated_args): Here. Handle arg packs.
178 (convert_template_argument): Just check that nontype argument
179 packs have the right type.
181 2009-01-05 Dodji Seketeli <dodji@redhat.com>
184 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
186 2009-01-05 Jason Merrill <jason@redhat.com>
189 * typeck2.c (process_init_constructor_union): Handle union with
192 * mangle.c (write_expression): Remove mangling for zero-operand
196 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
200 * class.c (defaultable_fn_p): Only operator== can be a copy
203 2009-01-02 Jason Merrill <jason@redhat.com>
206 * typeck2.c (process_init_constructor_union): Handle excess
208 (process_init_constructor_record): Likewise.
211 * typeck2.c (digest_init_r): Don't use process_init_constructor
212 for non-aggregate classes.
214 2008-12-31 Jakub Jelinek <jakub@redhat.com>
217 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
218 Return error_mark_node if cp_parser_non_integral_constant_expression
222 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
224 2008-12-29 Jakub Jelinek <jakub@redhat.com>
227 * parser.c (cp_parser_condition): Use cp_parser_require
228 instead of cp_lexer_consume_token to consume =.
231 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
233 2008-12-28 Jakub Jelinek <jakub@redhat.com>
236 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
237 around volatile iteration var in condition and/or increment
240 2008-12-27 Jakub Jelinek <jakub@redhat.com>
243 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
246 2008-12-21 Jason Merrill <jason@redhat.com>
249 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
251 2008-12-20 Jakub Jelinek <jakub@redhat.com>
252 Manuel López-Ibáñez <manu@gcc.gnu.org>
255 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
256 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
259 2008-12-19 Jakub Jelinek <jakub@redhat.com>
262 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
265 2008-12-18 Jakub Jelinek <jakub@redhat.com>
268 * init.c (perform_member_init): For value-initialized
269 references call permerror instead of warning and don't emit any
272 2008-12-18 Jason Merrill <jason@redhat.com>
275 * parser.c (cp_parser_token_starts_cast_expression): An EOF
276 can't start a cast-expression.
278 2008-12-17 Jason Merrill <jason@redhat.com>
280 * semantics.c (describable_type): New function.
281 (finish_decltype_type): Use it for dependent exprs.
282 * cp-tree.h: Declare it.
283 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
284 (write_expression): If skip_evaluation, use type stubs.
285 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
286 declarations of a function.
287 * init.c (build_new): Do auto deduction if type is describable.
288 * decl.c (cp_finish_decl): Likewise.
289 * parser.c (cp_parser_omp_for_loop): Likewise.
291 2008-12-10 Jason Merrill <jason@redhat.com>
294 * mangle.c (write_builtin_type): Add mangling for decimal floating
295 point and fixed point types.
296 (write_type): Pass FIXED_POINT_TYPE along.
298 2008-12-09 Mark Mitchell <mark@codesourcery.com>
301 * class.c (resolve_address_of_overloaded_function): Check
302 accessibility of member functions unless FLAGS indicates
304 * call.c (standard_conversion): Adjust flags passed to
306 (convert_default_arg): Do not perform access checks.
307 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
309 2008-12-08 Steve Ellcey <sje@cup.hp.com>
311 * decl2.c (mark_used): Remove assemble_external call.
313 2008-12-08 Dodji Seketeli <dodji@redhat.com>
316 * name-lookup.c (kept_level_p): Don't forget the case of levels
317 having using directives.
319 2008-12-08 Richard Henderson <rth@redhat.com>
322 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
323 * decl.c (record_unknown_type): Likewise.
324 (start_enum, finish_enum): Likewise.
326 2008-12-05 Jakub Jelinek <jakub@redhat.com>
329 * error.c (dump_expr): Handle BIT_FIELD_REF.
331 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
334 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
337 2008-12-04 Jason Merrill <jason@redhat.com>
340 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
342 * class.c (check_bases_and_members): Rather than assuming any
343 user-declared default constructor is complex here.
345 2008-12-04 Richard Guenther <rguenther@suse.de>
348 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
349 pointer access with TREE_NO_WARNING.
351 2008-12-03 Jason Merrill <jason@redhat.com>
354 * init.c (build_value_init): Do initial zero-initialization
355 of a class with an implicitly-defined constructor using
356 build_zero_init rather than in build_value_init.
357 (build_value_init_1): Fold into build_value_init.
360 * parser.c (cp_parser_conversion_type_id): Diagnose
361 'operator auto' here.
362 * decl.c (grokdeclarator): Not here.
365 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
366 on explicit constructors.
367 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
368 CONSTRUCTOR_IS_DIRECT_INIT.
370 2008-12-02 Jason Merrill <jason@redhat.com>
372 PR c++/35782, c++/37860
373 * call.c (build_user_type_conversion_1): Remember
375 (convert_like_real): Likewise.
376 (build_over_call): Don't require the copy constructor
377 for copy-list-initialization.
378 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
381 * decl.c (cp_finish_decl): Handle =default and =delete for
384 2008-12-01 Jakub Jelinek <jakub@redhat.com>
387 * parser.c (cp_parser_omp_for_loop): Handle auto.
388 * pt.c (tsubst_omp_for_iterator): Likewise.
390 2008-11-28 Jason Merrill <jason@redhat.com>
393 * init.c (perform_member_init): Fix value-initialization.
394 (build_value_init_1): Add assert to catch cases that will break
396 (build_default_init): Remove.
397 * cp-tree.h: Remove its prototype.
398 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
399 value-initialization.
402 * parser.c (cp_parser_class_name): Only call
403 maybe_note_name_used_in_class if we actually found a class name.
405 2008-11-25 Jason Merrill <jason@redhat.com>
408 * decl2.c (check_classfn): Error rather than abort on parameter
411 2008-11-20 Jason Merrill <jason@redhat.com>
414 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
417 * call.c (build_over_call): Take the address of the function even
419 (build_new_method_call): Remember the type of the called function
422 2008-11-19 Dodji Seketeli <dodji@redhat.com>
425 * pt.c (coerce_template_template_parm): Use the more robust
426 uses_template_parms instead of dependent_type_p.
428 2008-11-19 Dodji Seketeli <dodji@redhat.com>
431 * pt.c (lookup_template_class): Check pointers before dereferencing
433 * error.c (dump_template_decl): Likewise.
435 2008-11-19 Jason Merrill <jason@redhat.com>
438 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
439 that names a class for linkage purposes.
442 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
443 name is not a declaration.
446 * pt.c (instantiate_decl): Don't require a definition of
447 a template that is explicitly instantiated 'extern'.
449 2008-11-18 Jason Merrill <jason@redhat.com>
450 Jakub Jelinek <jakub@redhat.com>
453 * parser.c (cp_parser_type_id): Complain about auto.
454 * decl.c (grokdeclarator): Complain about parameters and
455 conversion functions declared with auto.
457 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
459 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
461 2008-11-17 Jakub Jelinek <jakub@redhat.com>
464 * init.c (constant_value_1): Handle TREE_LIST init.
466 2008-11-15 Jakub Jelinek <jakub@redhat.com>
469 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
470 argtype instead of result_type.
472 2008-11-14 Jason Merrill <jason@redhat.com>
475 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
476 for a non-dependent call.
479 * call.c (build_aggr_conv): Increment i.
481 2008-11-13 Jason Merrill <jason@redhat.com>
484 * typeck2.c (process_init_constructor_record): Update bitfield
486 (check_narrowing): Update bitfield handling, print source type.
488 2008-11-12 Jakub Jelinek <jakub@redhat.com>
492 2007-05-07 Mike Stump <mrs@apple.com>
493 * parser.c (check_empty_body): Add.
494 (cp_parser_iteration_statement): Add call to check_empty_body.
496 2008-11-12 Jason Merrill <jason@redhat.com>
499 * typeck.c (cp_build_modify_expr): Update bitfield handling.
501 2008-11-12 Jakub Jelinek <jakub@redhat.com>
504 * parser.c (cp_parser_simple_declaration): Don't commit
505 to tentative parse if parse errors were seen.
508 * error.c (dump_expr): Handle COMPLEX_EXPR.
510 2008-11-10 Jakub Jelinek <jakub@redhat.com>
513 * parser.c (cp_parser_enum_specifier): After parsing :,
514 parse definitely. Don't return early if type specifier
517 2008-11-06 David Edelsohn <edelsohn@gnu.org>
520 * g++spec.c (LIBSTDCXX_STATIC): New.
521 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
524 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
527 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
530 2008-11-05 Richard Guenther <rguenther@suse.de>
533 * decl.c (start_preparsed_function): Use the correct type for
534 building the RESULT_DECL.
536 2008-10-31 Jakub Jelinek <jakub@redhat.com>
539 * decl.c (grokdeclarator): Diagnose auto function decl without
540 late return type and late return type function decl where type
544 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
547 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
550 * class.c (check_bitfield_decl): Rename min_precision to
551 tree_int_cst_min_precision.
552 * decl.c (finish_enum): Likewise.
554 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
557 * parser.c (cp_parser_token_starts_cast_expression): New.
558 (cp_parser_cast_expression): Peek the next token to decide whether
559 this could be a parenthesized constructor or is definitely an
562 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
565 * typeck.c (build_x_binary_op): Update call to
566 warn_about_parentheses.
567 * parser.c (cp_parser_binary_expression): Add note about passing
568 the correct code for unary expressions.
570 2008-10-24 Jakub Jelinek <jakub@redhat.com>
572 * Make-lang.in (check-c++-subtargets): New alias for
573 check-g++-subtargets.
574 (lang_checks_parallelized): Add check-g++.
575 (check_g++_parallelize): New variable.
577 2008-10-21 Richard Guenther <rguenther@suse.de>
579 * semantics.c (simplify_aggr_init_exprs_r): Remove.
580 (expand_or_defer_fn): Do not walk the function body to
581 simplify aggr_init_exprs.
583 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
586 * typeck.c (cp_common_type): New. The same as
587 type_after_usual_arithmetic_conversions but without promotions.
588 (type_after_usual_arithmetic_conversions): Do the promotions and
590 (common_type): Make it behave like the C version of this
591 function. Do not handle pointer types.
592 (common_pointer_type): Move handling of pointer types from
594 (cp_build_binary_op): Use common_pointer_type instead of
595 common_type in call to pointer_diff.
596 Use cp_common_type instead of common_type.
597 * cp-tree.h (common_pointer_type): Declare.
599 2008-10-14 Jakub Jelinek <jakub@redhat.com>
602 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
603 arguments if they don't already have COND_EXPR's type.
605 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
608 * pt.c (push_template_decl_real): Check that current_template_parms
610 (process_partial_specialization): Assert current_template_parms not
613 2008-10-13 Doug Evans <dje@google.com>
615 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
617 2008-10-10 Jakub Jelinek <jakub@redhat.com>
620 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
623 2008-10-09 Jakub Jelinek <jakub@redhat.com>
626 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
627 setting it to error_mark_node.
629 2008-10-07 Steve Ellcey <sje@cup.hp.com>
631 * decl.c (start_cleanup_fn): Declare as inline.
633 2008-10-06 Jason Merrill <jason@redhat.com>
635 PR c++/37376, other mangling issues
636 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
637 (write_member_name): Break out from...
638 (write_expression): ...here. Handle dependent COMPONENT_REF.
639 (write_template_arg): Wrap an argument pack in 'I'/'E'.
640 (write_builtin_type): Update char16/32_t mangling.
641 (write_nested_name, write_prefix): Don't forget template args
643 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
646 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
648 * typeck.c (build_x_indirect_ref): Add location argument.
649 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
650 (cp_build_unary_op): Add location argument.
651 (cp_build_modify_expr): Same.
652 * class.c (build_base_path): Pass location to build_indirect_ref.
653 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
656 2008-10-05 Dodji Seketeli <dodji@redhat.com>
659 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
660 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
661 of the innermost containing BLOCK.
663 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
666 * error.c (dump_function_decl): Save the exceptions in case of
667 error about incompatible specifications in a specialization.
669 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
671 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
673 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
676 * parser.c (cp_parser_selection_statement): Fix uninitialized
679 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
683 * decl.c (grokdeclarator): Set the type for typedefs to a
684 nested-name-specifier to error_mark_node.
686 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
688 * parser.c (cp_parser_selection_statement): Implement here the
689 -Wempty-body warning for `if' and `else' statements.
690 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
692 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
695 * name-lookup.c (maybe_process_template_type_declaration): Check
696 return value of push_template_decl_real for error_mark_node.
698 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
700 * semantics.c (finish_fname): Pass location to fname_decl.
702 2008-09-23 Jakub Jelinek <jakub@redhat.com>
705 * semantics.c (finish_omp_for): If processing_template_decl, just build
706 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
708 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
710 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
711 (get_member_function_from_ptrfunc): Same.
712 (build_x_binary_op): Same.
713 (build_binary_op): Same.
714 (cp_build_binary_op): New location argument.
715 (pointer_diff): Pass location to cp_build_binary_op.
716 (cp_truthvalue_conversion): Pass location to build_binary_op.
717 (convert_ptrmem): Pass location to cp_build_binary_op.
718 (cp_build_modify_expr): Same.
719 (build_ptrmemfunc): Same.
720 * init.c (expand_cleanup_for_base): Pass location to
721 c_common_truthvalue_conversion.
722 (build_new_1): Pass location to cp_build_binary_op.
723 (build_vec_delete_1): Pass location to *build_binary_op,
724 c_common_truthvalue_conversion.
725 (build_vec_init): Same.
726 (build_delete): Same.
727 * decl.c (compute_array_index_type): Same.
728 * call.c (build_new_op): Same.
729 * rtti.c (build_dynamic_cast_1): Same.
730 * cp-tree.h: Add argument to cp_build_binary_op.
731 * semantics.c (handle_omp_for_class_iterator): Pass location to
732 *build_binary_op, c_common_truthvalue_conversion.
733 * decl2.c (get_guard_cond): Same.
735 2008-09-17 Richard Guenther <rguenther@suse.de>
738 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
739 result to the correct type.
741 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
744 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
745 parameter for duplicate.
747 2008-09-17 Jason Merrill <jason@redhat.com>
750 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
752 2008-09-17 Jakub Jelinek <jakub@redhat.com>
755 * typeck.c (build_array_ref): Use protected_set_expr_location instead
756 of SET_EXPR_LOCATION when ret might not be an expression.
758 2008-09-17 Jan Hubicka <jh@suse.cz>
761 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
763 2008-09-16 Jakub Jelinek <jakub@redhat.com>
766 * semantics.c (finish_compound_literal): Return error_mark_node if
770 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
773 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
775 * decl.c (duplicate_decls): Call error_at.
776 (grokfndecl): New location argument. Use location if available.
777 (grokdeclarator): Pass declarator location to grokfndecl.
778 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
779 * decl2.c (check_classfn): Use error_at.
780 * parser.c (cp_parser_init_declarator): Set function_start_locus
782 (cp_parser_member_declaration): Set id_loc for function declarators.
784 2008-09-09 Jan Hubicka <jh@suse.cz>
787 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
789 2008-09-09 Jakub Jelinek <jakub@redhat.com>
792 * tree.c (array_type_nelts_top): Add size_one_node instead of
795 2008-09-09 Jason Merrill <jason@redhat.com>
798 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
801 2008-09-09 Jakub Jelinek <jakub@redhat.com>
804 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
805 being error_operand_p. Don't clear value if it was error_mark_node.
807 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
809 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
810 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
811 * semantics.c (anon_aggr_type_p): Remove.
813 2008-09-06 Jason Merrill <jason@redhat.com>
816 * parser.c (cp_parser_parameter_declaration_list): Process the
817 PARM_DECLs as we go and push them. Return a TREE_LIST.
818 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
819 (cp_parser_direct_declarator): Create a binding level and
820 suppress deprecated warnings in the parameter list.
821 (make_call_declarator): PARMS is now a tree.
822 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
823 * decl.h (enum deprecated_states, deprecated_state): Move here.
825 (type_is_deprecated): New fn.
826 (grokparms): PARMLIST is a tree now. Warn about parms that
827 use deprecated types.
828 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
830 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
831 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
833 * name-lookup.c (pushtag): Look through function parameter scopes.
834 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
835 when we're parsing a function declarator.
837 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
840 * tree.c (cp_build_qualified_type_real): Deal with sharing of
841 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
844 2008-09-04 Ian Lance Taylor <iant@google.com>
846 * parser.c (check_no_duplicate_clause): Change code parameter to
847 enum omp_clause_code.
849 2008-09-03 Jakub Jelinek <jakub@redhat.com>
852 * decl.c (cp_finish_decl): Only set
853 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
856 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
858 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
859 deferred_mark_used_calls vector and exit early.
860 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
862 (finish_function): Set defer_mark_used_calls for the duration of the
863 function. Call mark_used on any queued decls.
865 2008-09-02 Jason Merrill <jason@redhat.com>
868 * call.c (build_over_call): Make =delete work with SFINAE.
869 * class.c (resolve_address_of_overloaded_function): Likewise.
871 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
872 threadprivate_or_deleted_p.
873 (CP_DECL_THREADPRIVATE_P): Adjust.
874 (DECL_DELETED_FN): Likewise.
875 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
876 (SD_DELETED): New macro.
877 * parser.c (cp_parser_init_declarator): Use them.
878 * decl.c (start_decl): Use them.
880 * decl2.c (mark_used): Give =deleted error even in sizeof.
882 * typeck2.c (check_narrowing): Downgrade narrowing error to
885 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
887 * typeck.c (build_array_ref): Use new location argument.
888 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
889 * call.c (build_new_op): Same.
890 * decl2.c (grok_array_decl): Same.
891 * cp-tree.h (build_array_ref): Add location argument to prototype.
893 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
895 * typeck.c (build_x_indirect_ref): Add location argument.
896 * class.c (build_base_path): Pass location to build_indirect_ref.
897 * pt.c (tsubst_copy_and_build): Pass location to
898 finish_label_address_expr.
899 * parser.c (cp_parser_unary_expression): Same.
901 2008-08-31 Jason Merrill <jason@redhat.com>
903 Implement late-specified return type using 'auto'.
904 * cp-tree.h (struct cp_declarator): Add late_return_type field to
906 * parser.c (cp_parser_late_return_type_opt): New fn.
907 (cp_parser_direct_declarator): Use it.
908 (make_call_declarator): Put it in the declarator.
909 * decl.c (grokdeclarator): Splice in late-specified return type.
910 * pt.c (splice_late_return_type): New fn.
912 2008-08-29 Michael Meissner <gnu@the-meissners.org>
914 * decl.c (builtin_function_1): Take a bool argument to decide
915 whether to use pushdecl or pushdecl_top_level.
916 (duplicate_decls): Copy function specific target and optimization
917 options on duplicate declarations.
918 (cxx_builtin_function): Update builtin_function_1 call.
919 (cxx_builtin_function_ext_scope): New function, guarantee that the
920 declaration is done at global scope.
922 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
923 macro, define builtin function hook for delayed machine specific
926 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
928 2008-08-30 Jason Merrill <jason@redhat.com>
931 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
933 2008-08-29 Jason Merrill <jason@redhat.com>
935 Implement C++0x 'auto' semantics.
936 * decl.c (start_decl_1): Don't complain about auto being incomplete.
937 (cp_finish_decl): Deduce auto.
938 * init.c (build_new): Handle 'new auto'.
939 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
940 message for auto than for normal template type parms.
941 * pt.c (type_dependent_expression_p): Handle { }.
942 (make_auto): New function.
943 (listify_autos): New function.
944 (do_auto_deduction): New function.
945 (is_auto): New function.
946 (type_uses_auto): New function.
947 * cp-tree.h: Declare them.
948 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
949 treat auto as a declspec.
950 (cp_parser_simple_type_specifier): It's a type-specifier.
952 2008-08-29 Mark Mitchell <mark@codesourcery.com>
954 * mangle.c (write_type): Add target-specific manglings for
955 non-fundamental types to the substitution table.
958 2008-08-29 Jakub Jelinek <jakub@redhat.com>
962 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
963 Adjust debug_hooks->imported_module_or_decl callers.
965 2008-08-29 Jan Hubicka <jh@suse.cz>
967 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
969 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
972 * decl.c (reshape_init_r): Check init for error_mark_node.
974 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
977 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
978 (finish_return_stmt): Likewise.
979 (finish_switch_condition): Likewise.
981 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
983 * cp-tree.h: Fix #error directive.
985 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
987 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
988 usual arithmetic conversions on scoped enumeration types.
989 (common_type): Ditto.
990 (default_conversion): Don't perform integral promotions on scoped
992 (build_array_ref): Scoped enumeration types can't be used as
994 * decl.c (start_enum): If building a C++0x scoped enumeration,
995 enter its scope. If provided with an underlying type, check that
996 underlying type and set up the enumeration type accordingly.
997 (finish_enum): Only compute an underlying type if the underlying
998 type isn't already fixed, and only convert the enumerator values
999 now if we've just computed the underlying type. Finish the scope
1000 of C++0x scoped enumerations.
1001 (build_enumerator): For enumerations with a fixed underlying type,
1002 check the enumerator values when the enumerator is defined.
1003 (lookup_enumerator): New.
1004 * call.c (standard_conversion): Don't allow assignment from
1005 integers to scoped enumeration types, even with -fpermissive.
1006 Don't convert from scoped enumerations to bool or any arithmetic
1008 (build_conditional_expr): Don't per the usual arithmetic
1009 conversions for scoped enumeration types.
1010 (convert_like_real): Check complain to see if we should
1012 * error.c (class_key_or_enum_as_string): Print scoped enums.
1013 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1015 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1016 (SCOPED_ENUM_P): New.
1017 (UNSCOPED_ENUM_P): New.
1018 (SET_SCOPED_ENUM_P): New.
1019 (ENUM_UNDERLYING_TYPE): New.
1020 * pt.c (lookup_template_class): Update the instantiation of enum
1021 types to deal with C++0x scoped enumerations and underlying
1023 * name-lookup.c (begin_scope): Deal with scoped enumeration
1025 (lookup_qualified_name): Deal with lookup into enumeration types.
1026 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1027 * parser.c (cp_parser_class_or_namespace_name): Rename to...
1028 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1029 parse a type-name that can be an enumeration type.
1030 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1031 (cp_parser_elaborated_type_specifier): Parse the
1032 optional `struct' or `class' following enum (in C++0x).
1033 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1036 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1038 * typeck.c: Update all calls to pedwarn.
1041 * error.c: Likewise.
1043 * name-lookup.c: Likewise.
1044 * parser.c: Likewise.
1046 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1049 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1052 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1054 * parser.c: Update all calls to inform.
1055 * typeck.c: Likewise.
1057 * class.c: Likewise.
1059 * method.c: Likewise.
1060 * friend.c: Likewise.
1061 * typeck2.c: Likewise.
1063 * name-lookup.c: Likewise.
1066 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1069 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1071 2008-08-18 Tomas Bily <tbily@suse.cz>
1073 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1075 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1077 * typeck.c: Update all callers of permerror.
1079 * class.c: Likewise.
1082 * except.c: Likewise.
1084 * typeck2.c: Likewise.
1086 * semantics.c: Likewise.
1087 * name-lookup.c: Likewise.
1089 * decl2.c: Likewise.
1090 * parser.c: Likewise.
1092 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1095 * pt.c (check_template_shadow): Change to return a bool.
1096 * name-lookup.c (push_class_level_binding): Early return if
1097 check_template_shadow returns false.
1098 * cp-tree.h (check_template_shadow): Adjust declaration.
1100 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1103 * decl.c (grokdeclarator): In case of extern and initializer, return
1104 error_mark_node after the error.
1106 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1109 * decl.c (grokfndecl): Call check_main_parameters_type only if
1112 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1115 * parser.c (cp_parser_class_head): Early return error_mark_node in
1116 case of global qualification of class name or qualified name that
1117 does not name a class.
1119 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1122 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1124 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1127 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1128 Delete forward declarations. Check that toplev.h has not been
1129 included before this file. Include toplev.h and diagnostic.h.
1130 * error.c (cp_cpp_error): Use DK_PEDWARN.
1131 (cxx_incomplete_type_diagnostic): Update declaration.
1132 (cxx_incomplete_type_error): Use DK_ERROR.
1133 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1134 as argument. Use emit_diagnostic.
1135 (cxx_incomplete_type_error): Use DK_ERROR.
1136 (add_exception_specifier): Use diagnostic_t instead of custom
1138 * typeck.c (complete_type_or_else): Update call to
1139 cxx_incomplete_type_diagnostic.
1140 * init.c (build_delete): Likewise.
1141 * call.c (diagnostic_fn_t): Remove unused typedef.
1142 (build_temp): Pass a pointer to diagnostic_t.
1143 (convert_like_real): Use emit_diagnostic.
1144 (joust): Check return value of warning before giving informative
1146 * friend.c (do_friend): Check return value of warning
1147 before giving informative note.
1148 * parser.c (cp_parser_template_id): Likewise.
1150 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1153 * class.c (check_bases_and_members): Warn with -Wuninitialized
1156 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1159 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1160 and make sure it is not a union.
1162 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1164 * semantics.c (finish_decltype_type): Initialize type.
1166 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1168 * semantics.c (finish_decltype_type): Handle calls to function
1169 pointers and references to functions properly.
1171 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1174 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1175 following a type-id is an error when in C++0x mode.
1177 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1180 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1182 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1185 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1187 2008-08-05 Jason Merrill <jason@redhat.com>
1190 * decl.c (build_ptrmemfunc_type): Don't require structural
1191 comparison of PMF types.
1192 * tree.c (cp_build_qualified_type_real): Don't clear
1193 a valid TYPE_PTRMEMFUNC_TYPE.
1194 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1197 2008-08-04 Jason Merrill <jason@redhat.com>
1200 * typeck2.c (check_narrowing): Allow narrowing conversion
1201 from an explicit floating-point constant.
1204 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1207 2008-08-04 Simon Baldwin <simonb@google.com>
1210 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1211 the declaration's id is followed by a semicolon.
1213 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1216 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1217 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1219 2008-07-31 Jason Merrill <jason@redhat.com>
1222 * init.c (build_new_1): Don't convert pointer to the data type
1223 until we're actually going to treat it as that type.
1226 * tree.c (build_aggr_init_expr): Split out...
1227 (build_cplus_new): ...from here.
1228 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1229 * init.c (build_new_1): new T() means value-initialization,
1230 not default-initialization.
1231 (build_vec_init): Likewise.
1232 (build_value_init_1): Use build_aggr_init_expr.
1234 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1237 * decl2.c (fix_temporary_vars_context_r): New function.
1238 (one_static_initialization_or_destruction): Make sure temporary
1239 variables part of the initialiser have their DECL_CONTEXT()
1242 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1245 * typeck.c (build_binary_op): Encapsulate code into
1248 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1251 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1252 TYPE_UID instead of pointers.
1254 2008-07-29 Jan Hubicka <jh@suse.cz>
1256 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1257 * decl.c (duplicate_decls): Likewise.
1258 (grokfndecl): Likewise.
1259 (start_method): Likewise.
1260 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1262 * pt.c (register_specialization, regenerate_decl_from_template):
1264 * decl2.c (grokfield): Likewise.
1266 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1269 * decl.c (duplicate_decls): Merge USED flags.
1271 2008-07-27 Jason Merrill <jason@redhat.com>
1274 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1276 2008-07-28 Richard Guenther <rguenther@suse.de>
1278 Merge from gimple-tuples-branch.
1280 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1282 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1285 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1287 * decl.c (finish_function): Call gimple_body after cp_genericize.
1289 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1291 * optimize.c: Include gimple.h instead of tree-gimple.h.
1292 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1293 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1296 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1298 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1300 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1302 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1304 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1306 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1308 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1309 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1310 (cxx_omp_clause_copy_ctor): Same.
1311 (cxx_omp_clause_assign_op): Same.
1313 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1315 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1316 (cp_gimplify_expr): Adjust caller.
1318 2008-05-11 Doug Kwan <dougkwan@google.com>
1320 * init.c (build_vec_delete): Add type conversion for argument
1321 0 of POINTER_PLUS_EXPR.
1323 2008-04-29 Doug Kwan <dougkwan@google.com>
1325 * decl2 (File): Include "gimple.h"
1326 (cp_write_global_declarations): Use gimple_body instead of
1328 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1330 2008-04-10 Diego Novillo <dnovillo@google.com>
1332 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1334 * optimize.c (maybe_clone_body): Re-enable call to
1336 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1337 code with call to gimple_unreachable.
1338 (cp_genericize): Fix handling of clone bodies.
1340 2008-04-04 Diego Novillo <dnovillo@google.com>
1342 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1344 * optimize.c (maybe_clone_body): Re-enable.
1346 2008-02-19 Diego Novillo <dnovillo@google.com>
1347 Oleg Ryjkov <olegr@google.com>
1349 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1351 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1352 argument to gimple_seq *. Update all users.
1353 (gimplify_must_not_throw_expr): Likewise.
1355 2008-02-04 Oleg Ryjkov <olegr@google.com>
1357 * except.c: Include gimple.h
1358 (cp_protect_cleanup_actions): Convert to tuples.
1359 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1361 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1363 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1364 instead of annotating each block manually.
1366 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1368 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1369 (gimplify_for_stmt): Same.
1370 (gimplify_switch_stmt): Same.
1371 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1373 [WHILE_STMT]: Return GS_OK.
1374 [SWITCH_STMT]: Same.
1375 [CONTINUE_STMT]: Same.
1377 (cp_genericize): Set gimple_body() of cloned functions when needed.
1379 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1381 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1382 (cp_gimplify_init_expr): Convert to tuples.
1383 (gimplify_must_not_throw_expr): Make function return a
1384 gimplify_status and convert to tuples.
1386 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1388 * cp-gimplify.c (genericize_try_block): Enable and do not call
1390 (genericize_catch_block): Same.
1391 (genericize_eh_spec_block): Same.
1392 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1393 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1395 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1397 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1398 * decl.c (finish_function): Use gimple_body instead of
1400 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1401 * cp-gimplify.c (genericize_try_block): Comment out.
1402 (genericize_catch_block): Same.
1403 (genericize_eh_spec_block): Same.
1404 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1405 (gimplify_for_stmt): Comment out.
1406 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1407 (cp_gimplify_omp_for): Same.
1408 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1409 Comment out call to gimplify_stmt and append_to_statement_list.
1410 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1411 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1412 (cp_gimplify_expr): Same.
1413 Comment out calls to genericize_*_block. Comment out call to
1416 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1419 * class.c (type_has_user_provided_default_constructor): Handle
1422 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1424 * decl.c (push_library_fn): Add a parameter for the exceptions that
1425 the function may throw.
1426 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1428 (build_library_fn): Change to static.
1429 * cp-tree.h: Adjust declarations.
1430 * except.c (declare_nothrow_library_fn): New.
1431 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1432 do_allocate_exception): Use the latter, adjust the declarations
1433 (ie, add empty exception-specification), consistently with the
1434 actual implementation in libsupc++.
1436 2008-07-25 Jan Hubicka <jh@suse.cz>
1438 * typeck.c (inline_conversion): Remove.
1439 (cp_build_function_call): Do not use inline_conversion.
1440 * decl.c (duplicate_decls): Do not insist on inline being declared
1442 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1443 from being output. We now remove static functions always.
1444 (finish_function): Do return warning on all static functions.
1445 * call.c (build_over_call): Do not use inline_conversion.
1446 * cp-tree.h (possibly_inlined_p): Declare.
1447 (inline_conversion): Remove.
1448 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1449 * decl2.c (cp_write_global_declarations): Likewise.
1450 (mark_used): Likewise.
1451 (possibly_inlined_p): New functions.
1453 2008-07-25 Jason Merrill <jason@redhat.com>
1455 * class.c (type_has_user_provided_default_constructor): Handle
1458 2008-07-23 Jan Hubicka <jh@suse.cz>
1460 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1461 (grogfndecl): Drop flag_inline_trees code.
1462 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1463 * lex.c (cxx_init): Do not set unit-at-a-time.
1465 2008-07-23 Jason Merrill <jason@redhat.com>
1467 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1468 trying to mangle a decl with no name.
1470 Implement defaulted/deleted functions as per N2346
1471 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1472 (DECL_DELETED_FN): New macro.
1473 (DECL_DEFAULTED_FN): New macro.
1474 * class.c (user_provided_p): New fn.
1475 (defaultable_fn_p): New fn.
1476 (type_has_user_provided_constructor): New fn.
1477 (type_has_user_provided_default_constructor): New fn.
1478 (check_methods): A defaulted fn is still trivial.
1479 (check_bases_and_members): Likewise.
1480 * decl.c (grok_special_member_properties): Likewise.
1481 (duplicate_decls): Complain about redeclaring a function as deleted.
1482 (start_decl): initialized==2 means deleted.
1483 (cp_finish_decl): Handle deleted/defaulted semantics.
1484 * decl2.c (grokfield): Likewise.
1485 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1486 Complain about using a deleted fn.
1487 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1488 (perform_member_init): Check for a user-provided default constructor
1489 even if TYPE_NEEDS_CONSTRUCTING.
1490 (build_new_1): Likewise.
1491 * call.c (build_over_call): Don't call mark_used twice.
1492 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1493 * search.c (check_final_overrider): Check for deleted mismatch.
1494 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1495 (cp_parser_pure_specifier): Handle =default and =delete.
1497 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1499 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1502 * typeck.c: All calls to pedwarn changed.
1503 * decl.c: All calls to pedwarn changed.
1504 * call.c: All calls to pedwarn changed.
1505 * error.c: All calls to pedwarn changed.
1506 * typeck2.c: All calls to pedwarn changed.
1507 * pt.c: All calls to pedwarn changed.
1508 * name-lookup.c: All calls to pedwarn changed.
1509 * parser.c: All calls to pedwarn changed.
1511 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1513 * call.c: Fix comment typos.
1514 * class.c: Likewise.
1515 * cp-tree.h: Likewise.
1516 * cxx-pretty-print.c: Likewise.
1519 * name-lookup.c: Likewise.
1520 * operators.def: Likewise.
1521 * parser.c: Likewise.
1524 * typeck.c: Likewise.
1526 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1530 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1531 copy constructors and copy assignment operators proper.
1533 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1535 * parser.c (cp_token): Remove in_system_header.
1536 (eof_token): Remove in_system_header.
1537 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1538 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1539 (cp_parser_member_declaration): Use in_system_header_at.
1540 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1541 (pop_tinst_level): Don't set in_system_header.
1542 (instantiate_class_template): Don't set in_system_header.
1543 (instantiate_decl): Don't set in_system_header.
1544 (instantiate_pending_templates): Don't set in_system_header.
1546 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1549 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1550 TYPE_NOTHROW_P, not TREE_NOTHROW.
1551 (trait_expr_value): Likewise.
1553 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1556 * call.c (convert_like_real): Don't take the error code path
1557 when a rvalue or base conversion has the bad_p field set.
1559 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1561 * rtti.c (emit_support_tinfos): Add char16_type_node and
1563 * typeck2.c (digest_init): Support char16_t and char32_t.
1565 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1567 * cvt.c (convert_to_void): Avoid C++ keywords.
1568 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1570 * friend.c (is_friend): Likewise.
1571 * init.c (perform_member_init): Likewise.
1572 * mangle.c (write_template_prefix, write_template_template_param):
1574 * name-lookup.c (do_namespace_alias, do_using_directive,
1575 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1576 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1577 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1579 * pt.c (is_specialization_of_friend, lookup_template_class,
1580 push_tinst_level, instantiate_class_template,
1581 tsubst_copy_and_build): Likewise.
1582 * tree.c (add_stmt_to_compound): Likewise.
1583 * typeck.c (finish_class_member_access_expr): Likewise.
1585 2008-07-17 Julian Brown <julian@codesourcery.com>
1586 Mark Mitchell <mark@codesourcery.com>
1588 * decl2.c (determine_visibility): Allow target to override
1589 visibility of class data.
1591 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1594 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1595 semantics to the current WP (N2691).
1597 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1600 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1601 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1602 complies with exception specification constraints.
1604 2008-07-14 Jason Merrill <jason@redhat.com>
1606 * lex.c (init_reswords): Always set D_OBJC.
1608 2008-07-11 Tom Tromey <tromey@redhat.com>
1609 Ian Lance Taylor <iant@google.com>
1611 * lex.c (struct resword, reswords): Don't define.
1612 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1613 (init_reswords): Clarify mask code. Use c_common_reswords rather
1616 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1619 * decl.c (grokdeclarator): Warn about initializing variables
1620 of storage class 'extern' only after the type of the declarator
1621 has been properly computed.
1623 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1626 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1627 carries the location of the primary type.
1628 * parser.c (cp_parser_check_type_definition): Update documentation.
1629 (cp_parser_check_for_definition_in_return_type,
1630 cp_parser_check_for_invalid_template_id,
1631 cp_parser_set_decl_spec_type,
1632 cp_parser_check_for_definition_in_return_type,
1633 cp_parser_diagnose_invalid_type_name,
1634 cp_parser_new_expression, cp_parser_explicit_instantiation,
1635 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1636 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1639 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1643 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1644 Add a location_t parameter so that
1645 error message can have a more accurate location.
1646 * cp-tree.h: Updated prototype
1647 * pt.c (tsubst_qualified_id): Use location in error messages.
1648 * parser.c (cp_parser_postfix_expression,
1649 cp_parser_objc_statement, cp_parser_trait_expr,
1650 cp_parser_token_is_class_key,
1651 cp_parser_uncommitted_to_tentative_parse_p,
1652 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1653 cp_parser_error, cp_parser_name_lookup_error,
1654 cp_parser_simulate_error, cp_parser_check_decl_spec,
1655 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1656 cp_parser_diagnose_invalid_type_name,
1657 cp_parser_parse_and_diagnose_invalid_type_name,
1658 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1659 cp_parser_string_literal, cp_parser_primary_expression,
1660 cp_parser_primary_expression, cp_parser_unqualified_id,
1661 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1662 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1663 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1664 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1665 cp_parser_jump_statement, cp_parser_block_declaration,
1666 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1667 cp_parser_function_specifier_opt, cp_parser_decltype,
1668 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1669 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1670 cp_parser_type_parameter, cp_parser_template_id,
1671 cp_parser_template_name, cp_parser_template_argument): Likewise.
1673 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1676 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1677 on function return type.
1679 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1682 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1683 on function return type in case of system header.
1685 2008-07-09 Raksit Ashok <raksit@google.com>
1687 * parser.c (cp_parser_postfix_expression): New warning based on flag
1688 warn_disallowed_functions.
1690 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1693 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1694 functions declared with a storage class qualifier.
1696 2008-07-03 Richard Guenther <rguenther@suse.de>
1699 * typeck.c (cp_build_function_call): Move code to verify
1700 builtin function arguments ...
1701 * call.c (build_cxx_call): ... here.
1703 2008-07-02 Jason Merrill <jason@redhat.com>
1705 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1707 Implement WG21 N2672, Initializer List proposed wording
1708 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1709 (struct lang_type_class): Add has_list_ctor bitfield.
1710 (TYPE_HAS_LIST_CTOR): New macro.
1711 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1712 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1713 (LOOKUP_NO_NARROWING): New macro.
1714 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1715 * parser.c (cp_parse_braced_list): Split out from...
1716 (cp_parser_initializer_clause): ...here.
1717 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1719 (cp_lexer_next_token_is_not_keyword): New fn.
1720 (cp_parser_parenthesized_expression_list): Handle { }.
1721 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1722 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1723 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1724 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1725 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1726 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1727 (cp_parser_save_member_function_body): Likewise.
1728 * call.c (conversion_kind): Add ck_list, ck_aggr.
1729 (struct conversion): Add check_narrowing bitfield, conversion list.
1730 (build_list_conv): New fn.
1731 (build_aggr_conv): New fn.
1732 (implicit_conversion): Call them.
1733 (standard_conversion): Set check_narrowing if appropriate.
1734 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1735 (build_user_type_conversion_1): When converting from an init list,
1736 we allow additional conversions except when calling a copy ctor.
1737 (convert_like_real): Calling an explicit ctor for an init list is
1738 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1739 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1740 class doesn't have a list ctor, break the {} into a TREE_LIST.
1741 (compare_ics): ck_list is better than other UDCs.
1742 (set_up_extended_ref_temp): Split out from initialize_reference.
1743 (is_std_init_list): New fn.
1744 (is_list_ctor): New fn.
1745 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1746 (reshape_init_array_1): Pass it to build_constructor.
1747 (reshape_init_class): Ditto.
1748 (initialize_artificial_var): Pass the appropriate type.
1749 (build_aggr_init_full_exprs): Split out from...
1750 (check_initializer): ...here. Handle new semantics.
1751 (build_init_list_var_init): New subroutine of check_initializer.
1752 (grokdeclarator): Converting constructors can have more than one parm.
1753 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1754 * init.c (expand_default_init): Only do digest_init for aggregates.
1755 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1756 build_constructor_from_list.
1757 (generic_initializer, ptr_initializer): Ditto.
1758 (ptm_initializer, class_initializer): Ditto.
1759 (get_pseudo_ti_init): Ditto.
1760 * error.c (dump_type): Handle init_list_type_node.
1761 (maybe_warn_cpp0x): New fn.
1762 (maybe_varn_variadic_templates): Call it.
1763 * cvt.c (ocp_convert): Handle conversion from { }.
1764 * tree.c (build_array_of_n_type): New fn.
1765 * typeck2.c (store_init_value): Use init_list_type_node.
1766 (digest_init): Likewise.
1767 (check_narrowing): New fn.
1768 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1769 of vector of constructor elts. Handle non-aggregate types. Make
1770 constant literals static.
1771 * pt.c: (tsubst_copy_and_build): Adjust.
1772 (unify): Handle { }.
1773 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1775 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1777 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1778 (comp_ptr_ttypes_const): Likewise.
1780 2008-07-01 Andrew Haley <aph@redhat.com>
1782 * decl.c (finish_constructor_body): Don't set the return value of
1783 the constructor if the constructor is that of a Java type.
1785 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1788 * decl2.c (is_late_template_attribute): If the first attribute
1789 argument is IDENTIFIER_NODE, don't consider it when checking
1790 if arguments are value or type dependent.
1792 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1795 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1798 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1800 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1802 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1805 * repo.c (repo_emit_p): Put const static data members initialized
1806 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1809 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1812 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1815 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1818 * typeck.c (cp_build_function_call): Show example syntax in
1821 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1823 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1824 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1825 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1826 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1827 pedwarn to permerror.
1828 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1829 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1830 * identify_goto, check_previous_goto_1, check_goto, define_label,
1831 check_tag_decl, start_decl, check_class_member_definition_namespace,
1832 grokfndecl, grokdeclarator): Likewise.
1833 * except.c (check_handlers): Likewise.
1834 * typeck2.c (digest_init): Likewise.
1835 * pt.c (check_specialization_namespace,
1836 check_explicit_instantiation_namespace,
1837 maybe_process_partial_specialization, check_explicit_specialization,
1838 convert_template_argument, do_decl_instantiation,
1839 do_type_instantiation, instantiate_decl): Likewise.
1840 * semantics.c (finish_template_type_parm): Likewise.
1841 * name-lookup.c (pushdecl_maybe_friend,
1842 check_for_out_of_scope_variable): Likewise.
1843 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1844 coerce_new_type): Likewise.
1845 * parser.c (cp_parser_nested_name_specifier_opt,
1846 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1847 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1848 (cp_parser_parameter_declaration): Check flag_permissive instead of
1849 flag_pedantic_errors.
1850 * call.c (joust): Change pedwarn to warning.
1851 * friend.c (make_friend_class): Likewise.
1853 2008-06-16 Jan Hubicka <jh@suse.cz>
1855 * method.c: Include cgraph.h.
1856 (use_thunk): Use cgraph_add_new_function instead of calling backend
1859 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1861 * parser.c: Fix comment typo.
1863 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1866 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1867 grokdeclarator and apply it to the created declaration.
1868 * cp-tree.h (grokbitfield): Update prototype.
1869 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1870 since they are now applied in grokbitfield. Adjusted the call to
1872 (cp_parser_objc_class_ivars): Likewise.
1874 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1877 * class.c (type_requires_array_cookie): Do not consider delete[]
1878 operators with an ellipsis as second argument.
1880 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1883 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1886 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1889 * pt.c (maybe_process_partial_specialization): Check the tree
1890 returned by push_template_decl for error_mark_node.
1891 * parser.c (cp_parser_class_head): Likewise, check the tree
1892 returned by the latter.
1894 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1897 * decl.c (grokdeclarator): In case of wrong return type return
1898 immediately error_mark_node.
1900 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1902 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1903 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1904 finish_omp_taskwait): New prototypes.
1905 (cxx_omp_clause_default_ctor): Add outer argument.
1906 (finish_omp_for): Add new clauses argument.
1907 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1908 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1909 (cxx_omp_clause_default_ctor): Add outer argument.
1910 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1911 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1912 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1913 Add par_clauses argument. If decl is present in parallel's
1914 lastprivate clause, change that clause to shared and add
1915 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1916 Fix wording of error messages. Adjust finish_omp_for caller.
1917 Add clauses argument. Parse loops with random access iterators.
1918 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1920 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1921 cp_parser_omp_for_loop callers.
1922 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1924 (cp_parser_omp_clause_name): Handle collapse and untied
1926 (cp_parser_omp_clause_schedule): Handle auto schedule.
1927 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1928 and PRAGMA_OMP_CLAUSE_UNTIED.
1929 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1930 (OMP_TASK_CLAUSE_MASK): Define.
1931 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1932 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1933 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1934 PRAGMA_OMP_TASKWAIT.
1935 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1936 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1937 (tsubst_omp_for_iterator): New function.
1938 (dependent_omp_for_p): New function.
1939 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1940 loops. Adjust finish_omp_for caller. Handle loops with random
1941 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1942 (tsubst_expr): Handle OMP_TASK.
1943 * semantics.c (cxx_omp_create_clause_info): New function.
1944 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1945 OMP_CLAUSE_COLLAPSE.
1946 (cxx_omp_predetermined_sharing): Removed.
1947 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1948 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1949 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1950 clauses argument. Fix check for type dependent cond or incr.
1951 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1952 fold_convert to convert incr amount to difference_type. Only
1953 fold if not in template. If decl is mentioned in lastprivate
1954 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1955 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1957 (finish_omp_threadprivate): Allow static class members of the
1959 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1960 finish_omp_taskwait): New functions.
1962 * parser.c (cp_parser_binary_expression): Add prec argument.
1963 (cp_parser_assignment_expression): Adjust caller.
1964 * cp-tree.h (outer_curly_brace_block): New prototype.
1965 * decl.c (outer_curly_brace_block): No longer static.
1967 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1970 * pt.c (push_template_decl_real): Consistently return error_mark_node
1973 2008-06-02 Tomas Bily <tbily@suse.cz>
1975 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1976 (cp_build_unary_op): Likewise.
1977 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1978 (maybe_warn_about_returning_address_of_local): Likewise.
1980 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1983 * pt.c (tsubst_initializer_list): Consistently check the tree
1984 returned by tsubst_pack_expansion for error_mark_node.
1986 2008-05-27 Michael Matz <matz@suse.de>
1989 * call.c (build_new_op): Make warning conditional on
1992 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1995 * call.c (convert_like_real): Convert bitfield to desired type
1996 before creating temporary.
1998 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2000 * Makefile.in: Adjusted dependencies on c-incpath.o.
2002 2008-05-23 Jakub Jelinek <jakub@redhat.com>
2005 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2006 fold_build_cleanup_point_expr on build_call_a results.
2009 * semantics.c (omp_clause_info_fndecl): New function.
2010 (finish_omp_clauses): Use it.
2012 2008-05-21 Jakub Jelinek <jakub@redhat.com>
2015 * cp-tree.h (check_array_initializer): New prototype.
2016 * decl.c (check_array_initializer): New function.
2017 (check_initializer): Call it.
2018 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2020 2008-05-21 Tom Tromey <tromey@redhat.com>
2022 * mangle.c (save_partially_mangled_name): Remove.
2023 (restore_partially_mangled_name): Likewise.
2024 (write_encoding): Update.
2025 (write_unqualified_name): Likewise.
2026 (start_mangling): Always use name_obstack. Remove 'ident_p'
2028 (get_identifier_nocopy): Remove.
2029 (finish_mangling_internal): Rename from finish_mangling.
2030 (finish_mangling): New function.
2031 (finish_mangling_get_identifier): Likewise.
2032 (partially_mangled_name, partially_mangled_name_len): Remove.
2033 (mangle_decl_string): Change return type. Update.
2034 (mangle_decl, mangle_type_string, mangle_special_for_type,
2035 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2036 mangle_ref_init_variable): Update.
2038 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2041 * semantics.c (begin_class_definition): Extend checks on the first
2044 2008-05-12 Tomas Bily <tbily@suse.cz>
2046 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2047 * call.c (build_over_call): Likewise.
2048 * error.c (dump_expr): Use CASE_CONVERT.
2049 * class.c (fixed_type_or_null): Likewise.
2051 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2053 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2055 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2058 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2060 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2061 DECL_LOOPING_CONST_OR_PURE_P attributes.
2062 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2065 2008-05-02 Simon Baldwin <simonb@google.com>
2068 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2070 2008-05-01 Simon Baldwin <simonb@google.com>
2072 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2074 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2077 * pt.c (more_specialized_fn): Stop the loop even if there are no
2078 arguments before ellipsis.
2080 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2083 * parser.c (cp_parser_lookup_name): Look through single function
2087 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2088 COMPOUND_EXPR if the second argument would be error_mark_node.
2090 2008-04-28 Jason Merrill <jason@redhat.com>
2091 Liu Guanwei <liu_gw@163.com>
2094 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2095 in default arguments.
2097 2008-04-25 Jan Hubicka <jh@suse.cz>
2099 * typeck.c (check_return_expr): Update.
2100 * decl.c (start_preparsed_function): Update.
2101 * method.c (use_thunk): Update.
2103 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2106 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2107 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2108 * decl2.c (is_late_template_attribute): Only make vector_size
2109 late tmpl attribute if argument is type or value dependent.
2110 (cp_reconstruct_complex_type): New function.
2112 2008-04-24 Richard Guenther <rguenther@suse.de>
2114 * typeck.c (cp_build_function_call): Call
2115 check_builtin_function_arguments.
2117 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2119 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2120 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2121 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2122 * class.c (build_base_path): Don't set TREE_INVARIANT.
2123 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2124 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2125 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2126 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2127 (generic_initializer): Don't set TREE_INVARIANT.
2128 (ptr_initializer): Don't set TREE_INVARIANT.
2129 (ptm_initializer): Don't set TREE_INVARIANT.
2130 (class_initializer): Don't set TREE_INVARIANT.
2131 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2132 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2133 (build_template_parm_index): Don't set TREE_INVARIANT.
2134 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2135 (process_template_parm): Don't set TREE_INVARIANT.
2137 2008-04-22 Jason Merrill <jason@redhat.com>
2140 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2141 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2142 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2144 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2147 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2148 expression is errorneous.
2150 2008-04-21 Jason Merrill <jason@redhat.com>
2153 * tree.c (cp_tree_equal): Handle FIXED_CST.
2156 * pt.c (template_template_parm_bindings_ok_p): Set
2157 processing_template_decl while in this function.
2159 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2161 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2162 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2163 char16_t and char32_t.
2164 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2165 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2166 extended builtin type "u8char{16,32}_t".
2167 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2169 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2170 (cp_parser_is_string_literal): Idem.
2171 (cp_parser_string_literal): Idem.
2172 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2174 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2175 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2176 * typeck.c (string_conv_p): Support char16_t and char32_t.
2178 2008-04-17 Jason Merrill <jason@redhat.com>
2181 * call.c (build_user_type_conversion_1): Represent second step of
2182 copy-init with an rvalue conversion.
2183 (convert_like_real) [ck_user]: Don't implicitly add it here.
2185 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2188 * decl.c (layout_var_decl): If extern or static var has variable
2189 size, set TREE_TYPE (decl) to error_mark_node.
2191 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2194 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2197 2008-04-09 Jason Merrill <jason@redhat.com>
2200 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2201 not a pushed variable.
2203 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2205 * call.c (build_op_delete_call): Fix quotation in warning message.
2206 * decl.c (grokdeclarator): Quote keyword in error message.
2207 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2210 * parser.c (cp_parser_check_type_definition): Print error string
2211 directly rather than using "%s".
2212 (cp_parser_postfix_expression): Fix quotation.
2213 (cp_parser_decltype): Likewise.
2214 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2216 * parser.c (cp_parser_non_integral_constant_expression): Build error
2217 message with CONCAT rather than using "%s".
2218 (cp_parser_primary_expression): Fix quotation.
2219 (cp_parser_postfix_expression): Likewise.
2220 (cp_parser_postfix_dot_deref_expression): Likewise.
2221 (cp_parser_unary_expression): Likewise.
2222 (cp_parser_new_expression): Likewise.
2223 (cp_parser_delete_expression): Likewise.
2225 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2226 as `)', not as `('. Fix quotation.
2227 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2228 (cp_parser_primary_expression): Likewise.
2229 (cp_parser_nested_name_specifier_opt): Likewise.
2230 (cp_parser_postfix_expression): Likewise.
2231 (cp_parser_postfix_open_square_expression): Likewise.
2232 (cp_parser_parenthesized_expression_list): Likewise.
2233 (cp_parser_pseudo_destructor_name): Likewise.
2234 (cp_parser_new_expression): Likewise.
2235 (cp_parser_direct_new_declarator): Likewise.
2236 (cp_parser_delete_expression): Likewise.
2237 (cp_parser_cast_expression): Likewise.
2238 (cp_parser_question_colon_clause): Likewise.
2239 (cp_parser_builtin_offsetof): Likewise.
2240 (cp_parser_trait_expr): Likewise.
2241 (cp_parser_label_for_labeled_statement): Likewise.
2242 (cp_parser_compound_statement): Likewise.
2243 (cp_parser_selection_statement): Likewise.
2244 (cp_parser_condition): Likewise.
2245 (cp_parser_iteration_statement): Likewise.
2246 (cp_parser_already_scoped_statement): Likewise.
2247 (cp_parser_simple_declaration): Likewise.
2248 (cp_parser_linkage_specification): Likewise.
2249 (cp_parser_static_assert): Likewise.
2250 (cp_parser_decltype): Likewise.
2251 (cp_parser_conversion_function_id): Likewise.
2252 (cp_parser_operator_function_id): Likewise.
2253 (cp_parser_operator): Likewise.
2254 (cp_parser_type_parameter): Likewise.
2255 (cp_parser_template_id): Likewise.
2256 (cp_parser_explicit_instantiation): Likewise.
2257 (cp_parser_explicit_specialization): Likewise.
2258 (cp_parser_enum_specifier): Likewise.
2259 (cp_parser_namespace_definition): Likewise.
2260 (cp_parser_namespace_alias_definition): Likewise.
2261 (cp_parser_using_declaration): Likewise.
2262 (cp_parser_using_directive): Likewise.
2263 (cp_parser_asm_definition): Likewise.
2264 (cp_parser_direct_declarator): Likewise.
2265 (cp_parser_ptr_operator): Likewise.
2266 (cp_parser_parameter_declaration_clause): Likewise.
2267 (cp_parser_initializer_clause): Likewise.
2268 (cp_parser_class_specifier): Likewise.
2269 (cp_parser_member_specification_opt): Likewise.
2270 (cp_parser_member_declaration): Likewise.
2271 (cp_parser_pure_specifier): Likewise.
2272 (cp_parser_constant_initializer): Likewise.
2273 (cp_parser_base_clause): Likewise.
2274 (cp_parser_exception_specification_opt): Likewise.
2275 (cp_parser_try_block): Likewise.
2276 (cp_parser_function_try_block): Likewise.
2277 (cp_parser_handler): Likewise.
2278 (cp_parser_throw_expression): Likewise.
2279 (cp_parser_asm_operand_list): Likewise.
2280 (cp_parser_attributes_opt): Likewise.
2281 (cp_parser_label_declaration): Likewise.
2282 (cp_parser_constructor_declarator_p): Likewise.
2283 (cp_parser_template_declaration_after_export): Likewise.
2284 (cp_parser_single_declaration): Likewise.
2285 (cp_parser_objc_message_expression): Likewise.
2286 (cp_parser_objc_message_args): Likewise.
2287 (cp_parser_objc_encode_expression): Likewise.
2288 (cp_parser_objc_defs_expression): Likewise.
2289 (cp_parser_objc_protocol_expression): Likewise.
2290 (cp_parser_objc_selector_expression): Likewise.
2291 (cp_parser_objc_protocol_refs_opt): Likewise.
2292 (cp_parser_objc_typename): Likewise.
2293 (cp_parser_objc_method_keyword_params): Likewise.
2294 (cp_parser_objc_superclass_or_category): Likewise.
2295 (cp_parser_objc_try_catch_finally_statement): Likewise.
2296 (cp_parser_objc_synchronized_statement): Likewise.
2297 (cp_parser_objc_throw_statement): Likewise.
2298 (cp_parser_omp_var_list_no_open): Likewise.
2299 (cp_parser_omp_clause_default): Likewise.
2300 (cp_parser_omp_clause_if): Likewise.
2301 (cp_parser_omp_clause_num_threads): Likewise.
2302 (cp_parser_omp_clause_reduction): Likewise.
2303 (cp_parser_omp_clause_schedule): Likewise.
2304 (cp_parser_omp_critical): Likewise.
2305 (cp_parser_omp_for_loop): Likewise.
2306 (cp_parser_omp_sections_scope): Likewise.
2308 * parser.c (cp_parser_template_parameter_list): Simplify.
2310 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2312 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2314 2008-04-07 Jason Merrill <jason@redhat.com>
2317 * class.c (type_has_user_nondefault_constructor): A template
2318 counts as a nondefault constructor.
2320 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2322 * decl.c (cxx_push_function_context): Delete.
2323 (cxx_pop_function_context): Delete.
2324 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2326 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2327 LANG_HOOKS_FUNCTION_FINAL): Delete.
2328 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2329 LANG_HOOKS_MISSING_NORETURN_OK_P.
2330 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2332 * semantics.c (current_stmt_tree): Fix comment.
2334 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2337 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2338 before calling fold_offsetof.
2340 2008-04-03 Tom Tromey <tromey@redhat.com>
2342 * Make-lang.in (c++_OBJS): New variable.
2344 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2346 * optimize.c (clone_body): New, from tree-inline.c.
2348 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2350 * method.c (synthesize_method): Use {push,pop}_function_context.
2351 * name-lookup.c (push_to_top_level): Likewise.
2352 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2354 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2357 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2360 2008-03-27 Tom Tromey <tromey@redhat.com>
2362 * Make-lang.in: Revert automatic dependency patch.
2364 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2367 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2368 (build_compound_expr): New, for compatibility with C
2369 build_compound_expr.
2370 (cp_build_compound_expr): Renamed from build_compound_expr.
2371 (build_c_cast): New, for compatibility with C build_c_cast.
2372 (cp_build_c_cast): Renamed from build_c_cast.
2373 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2374 * decl.c (cxx_maybe_build_cleanup): Ditto.
2375 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2376 (cp_build_compound_expr): Renamed from build_compound_expr.
2377 (build_c_cast): Add C-compatible prototype.
2378 (cp_build_c_cast): Renamed from build_c_cast.
2379 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2380 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2382 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2384 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2385 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2386 ending in a pack expansion, both of which can occur when
2387 substituting into a nested template.
2388 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2389 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2390 * parser.c (cp_parser_template_parameter): Deal with unnamed
2391 non-type template parameter packs identified by pack expansions in
2394 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2397 * pt.c (apply_late_template_attributes): Don't call tsubst on
2398 first attribute argument if it is IDENTIFIER_NODE.
2401 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2402 and LTGT_EXPR to pp_expression.
2404 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2406 * pt.c (coerce_template_template_parm): Moved the body of the loop
2407 of coerce_template_template_parms here, to make iteration over a
2408 template argument pack simpler.
2409 Also, allow matching of a template parameter pack in the template
2410 template parameter to a template parameter in the template
2412 (coerce_template_template_parms): Deal with variadic template
2413 template parameters. Use coerce_template_template_parm.
2414 (unify): Make sure we coerce the template template argument's
2415 template arguments to the template template parameter's template
2416 parameters, not the other way around.
2418 2008-03-25 Tom Tromey <tromey@redhat.com>
2420 * Make-lang.in: Remove .o targets.
2421 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2423 (c++_OBJS): New variable.
2424 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2426 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2428 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2429 (composite_pointer_type): Ditto.
2430 (common_type): Fix call to composite_pointer_type.
2431 (cxx_sizeof_nowarn): New; used to be a macro.
2432 (cxx_sizeof_expr): Add SFINAE support.
2433 (cxx_alignof_expr): Ditto.
2434 (decay_conversion): Fix calls for SFINAE support.
2435 (rationalize_conditional_expr): Add SFINAE support.
2436 (build_class_member_access_expr): Ditto.
2437 (finish_class_member_access_expr): Ditto.
2438 (build_x_indirect_ref): Ditto.
2439 (build_indirect_ref): Original version renamed to
2440 cp_build_indirect_ref; new version provides a bridge from
2442 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2444 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2445 (build_function_call): Original version renamed to
2446 cp_build_function_call; new version provides a bridge from
2448 (cp_build_function_call): Was build_function_call; added SFINAE
2450 (convert_arguments): Add SFINAE support.
2451 (build_x_binary_op): Ditto.
2452 (build_binary_op): Original version renamed to cp_build_binary_op;
2453 new version provides a bridge from c-common.
2454 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2455 (pointer_diff): Fix calls for SFINAE.
2456 (build_x_unary_op): Add SFINAE support.
2457 (condition_conversion): Fix calls for SFINAE.
2458 (build_unary_op): Original version renamed to cp_build_unary_op;
2459 new version provides a bridge from c-common.
2460 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2461 (unary_complex_lvalue): Fix calls for SFINAE.
2462 (build_x_conditional_expr): Add SFINAE support.
2463 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2464 (build_x_compound_expr): Add SFINAE support.
2465 (convert_ptrmem): Fix calls for SFINAE.
2466 (build_static_cast_1): Add SFINAE support.
2467 (build_static_cast): Ditto.
2468 (build_reinterpret_cast_1): Ditto.
2469 (build_reinterpret_cast): Ditto.
2470 (build_const_cast_1): Ditto.
2471 (build_const_cast): Ditto.
2472 (build_c_cast): Ditto.
2473 (build_modify_expr): Original version renamed to
2474 cp_build_modify_expr; new version provides a bridge from c-common.
2475 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2477 (build_x_modify_expr): Add SFINAE support.
2478 (build_ptrmemfunc): Fix calls for SFINAE.
2479 (convert_for_assignment): Add SFINAE support.
2480 (convert_for_initialization): Ditto.
2481 (check_return_expr): Fix calls for SFINAE.
2482 (lvalue_or_else): Add SFINAE support.
2483 * init.c (perform_member_init): Fix calls for SFINAE.
2484 (emit_mem_initializers): Ditto.
2485 (expand_virtual_init): Ditto.
2486 (expand_cleanup_for_base): Ditto.
2487 (build_aggr_init): Add SFINAE support.
2488 (expand_default_init): Ditto.
2489 (expand_aggr_init_1): Fix calls for SFINAE.
2490 (build_offset_ref): Ditto.
2491 (build_new_1): Add SFINAE support.
2493 (build_vec_delete_1): Fix calls for SFINAE.
2494 (get_temp_regvar): Ditto.
2495 (build_vec_init): Add SFINAE support.
2496 (build_dtor_call): Fix calls for SFINAE.
2497 (build_delete): Ditto.
2498 (push_base_cleanups): Ditto.
2499 (build_vec_delete_1): Ditto.
2500 * class.c (build_base_path): Fix calls for SFINAE.
2501 (build_simple_base_path): Ditto.
2502 (convert_to_base_statically): Ditto.
2503 (build_vfn_ref): Ditto.
2504 (resolve_address_of_overloaded_function): Ditto.
2505 * decl.c (check_initializer): Fix calls for SFINAE.
2506 (register_dtor_fn): Ditto.
2507 (compute_array_index_type): Ditto.
2508 (finish_enum): Ditto.
2509 (start_preparsed_function): Ditto.
2510 (cxx_maybe_build_cleanup): Ditto.
2511 * call.c (convert_like): Add COMPLAIN argument.
2512 (convert_like_with_context): Ditto.
2513 (build_this): Fix calls for SFINAE.
2514 (build_user_type_conversion): Ditto.
2515 (resolve_args): Ditto.
2516 (build_new_function_call): Add SFINAE support.
2517 (build_operator_new_call): Fix calls for SFINAE.
2518 (build_object_call): Add SFINAE support.
2519 (build_conditional_expr): Ditto.
2520 (build_new_op): Ditto.
2521 (build_op_delete_call): Fix calls for SFINAE.
2522 (build_temp): Ditto.
2523 (convert_like_real): Add SFINAE support.
2524 (build_x_va_arg): Fix calls for SFINAE.
2525 (convert_default_arg): Ditto.
2526 (build_over_call): Add SFINAE support.
2527 (build_java_interface_fn_ref): Fix calls for SFINAE.
2528 (build_special_member_call): Add SFINAE support.
2529 (build_new_method_call): Ditto.
2530 (perform_implicit_conversion): Ditto.
2531 (perform_direct_initialization_if_possible): Ditto.
2532 (initialize_reference): Fix calls for SFINAE.
2533 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2534 * rtti.c (build_headof): Fix calls for SFINAE.
2535 (get_tinfo_decl_dynamic): Ditto.
2536 (get_typeid): Ditto.
2537 (build_dynamic_cast_1): Add SFINAE support.
2538 (build_dynamic_cast): Ditto.
2539 (tinfo_base_init): Fix calls for SFINAE.
2540 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2541 (do_end_catch): Ditto.
2542 (initialize_handler_parm): Ditto.
2543 (expand_start_catch_block): Ditto.
2544 (do_allocate_exception): Ditto.
2545 (do_free_exception): Ditto.
2546 (build_throw): Ditto.
2547 * cvt.c (build_up_reference): Fix calls for SFINAE.
2548 (convert_to_reference): Ditto.
2549 (ocp_convert): Ditto.
2550 (convert_to_void): Add SFINAE support.
2551 * tree.c (build_dummy_object): Fix calls for SFINAE.
2552 (stabilize_expr): Ditto.
2553 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2555 (build_new_method_call): Ditto.
2556 (build_special_member_call): Ditto.
2557 (build_new_op): Ditto.
2558 (perform_implicit_conversion): Ditto.
2559 (perform_direct_initialization_if_possible): Ditto.
2560 (convert_to_void): Ditto.
2561 (build_aggr_init): Ditto.
2563 (build_vec_init): Ditto.
2564 (build_dynamic_cast): Ditto.
2565 (finish_call_expr): Ditto
2566 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2567 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2568 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2569 (finish_class_member_access_expr): Ditto.
2570 (build_x_indirect_ref): Ditto.
2571 (cp_build_indirect_ref): New.
2572 (cp_build_function_call): Add tsubst_flags_t parameter.
2573 (build_x_unary_op): Ditto.
2574 (cp_build_unary_op): New.
2575 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2576 (build_x_compound_expr): Ditto.
2577 (build_compound_expr): Ditto.
2578 (build_static_cast): Ditto.
2579 (build_reinterpret_cast): Ditto.
2580 (build_const_cast): Ditto.
2581 (build_c_cast): Ditto.
2582 (build_x_modify_expr): Ditto.
2583 (cp_build_modify_expr): New.
2584 (convert_for_initialization): Add tsubst_flags_t parameter.
2585 (cp_build_binary_op): Remove macro; add function declaration.
2586 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2587 (lvalue_or_else): Ditto.
2588 (build_functional_cast): Ditto.
2589 * typeck2.c (digest_init): Fix calls for SFINAE.
2590 (process_init_constructor_array): Ditto.
2591 (process_init_constructor_record): Ditto.
2592 (build_x_arrow): Ditto.
2593 (build_m_component_ref): Ditto.
2594 (build_functional_cast): Add SFINAE support.
2595 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2596 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2597 (finish_expr_stmt): Ditto.
2598 (finish_for_expr): Ditto.
2599 (finish_asm_stmt): Ditto.
2600 (finish_non_static_data_member): Ditto.
2601 (finish_qualified_id_expr): Ditto.
2602 (finish_call_expr): Add SFINAE support.
2603 (finish_increment_expr): Fix calls for SFINAE.
2604 (finish_unary_op_expr): Ditto.
2605 (simplify_aggr_init_expr): Ditto.
2606 (finish_omp_clauses): Ditto.
2607 (finish_omp_for): Ditto.
2608 (finish_omp_barrier): Ditto.
2609 (finish_omo_flush): Ditto.
2610 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2611 (build_anon_union_vars): Ditto.
2612 (get_guard_cond): Ditto.
2614 (one_static_initialization_or_destruction): Ditto.
2615 (do_static_initialization_or_destruction): Ditto.
2616 (generate_ctor_or_dtor_function): Ditto.
2617 (build_offset_ref_call_from_tree): Ditto.
2618 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2619 (cp_parser_postfix_dot_deref_expression): Ditto.
2620 (cp_parser_unary_expression): Ditto.
2621 (cp_parser_new_expression): Ditto.
2622 (cp_parser_cast_expression): Ditto.
2623 (cp_parser_binary_expression): Ditto.
2624 (cp_parser_question_colon_clause): Ditto.
2625 (cp_parser_assignment_expression): Ditto.
2626 (cp_parser_expression): Ditto.
2627 (cp_parser_builtin_offsetof): Ditto.
2628 (cp_parser_template_argument): Ditto.
2629 (cp_parser_functional_cast): Ditto.
2631 2008-03-24 Tom Tromey <tromey@redhat.com>
2633 * lex.c (handle_pragma_interface): Don't copy the filename.
2634 (handle_pragma_implementation): Copy filename using xstrdup.
2636 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2638 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2639 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2640 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2641 (PROMOTES_TO_AGGR_TYPE): Remove.
2642 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2643 * typeck.c (unary_complex_lvalue, build_modify_expr,
2644 convert_for_initialization): Adjust.
2645 * init.c (is_aggr_type): Remove.
2646 (is_class_type): Add.
2647 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2648 build_delete): Adjust.
2649 * lex.c (make_aggr_type): Remove.
2650 (make_class_type): Add.
2651 (cxx_make_type): Adjust.
2652 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2654 * decl.c (build_typename_type, make_typename_type,
2655 make_unbound_class_template, cxx_init_decl_processing,
2656 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2657 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2658 grok_op_properties, xref_tag, check_function_type): Adjust.
2659 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2660 add_builtin_candidate, add_builtin_candidates,
2661 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2662 is_subseq, compare_ics): Adjust.
2663 * method.c (use_thunk): Adjust.
2664 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2665 create_tinfo_types): Adjust.
2666 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2667 build_up_reference, convert_to_reference, convert_from_reference,
2668 ocp_convert, build_expr_type_conversion): Adjust.
2669 * tree.c (bind_template_template_parm, error_type): Adjust.
2670 * dump.c (cp_dump_tree): Adjust.
2671 * search.c (lookup_member): Adjust.
2672 * friend.c (make_friend_class, do_friend): Adjust.
2673 * typeck2.c (store_init_value, process_init_constructor_array,
2674 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2675 build_functional_cast): Adjust.
2676 * pt.c (finish_member_template_decl, process_template_parm,
2677 lookup_template_class, tsubst_function_type, tsubst,
2678 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2680 * semantics.c (begin_class_definition, finish_base_specifier,
2681 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2683 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2684 do_class_using_decl, lookup_qualified_name,
2685 maybe_process_template_type_declaration): Adjust.
2686 * decl2.c (grok_array_decl, check_member_template,
2687 constrain_class_visibility): Adjust.
2688 * parser.c (cp_parser_class_name): Adjust.
2690 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2692 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2694 2008-03-17 Jason Merrill <jason@redhat.com>
2697 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2698 a temp directly to a reference as per DR391.
2700 2008-03-12 Richard Guenther <rguenther@suse.de>
2704 2008-02-04 Richard Guenther <rguenther@suse.de>
2707 * decl.c (record_builtin_java_type): Make jboolean a
2708 integer type again where its mode doesn't match that of bool.
2710 2008-01-25 Richard Guenther <rguenther@suse.de>
2713 * decl.c (record_builtin_java_type): Make __java_boolean
2715 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2716 after TYPE_MAIN_VARIANT check.
2718 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2721 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2725 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2726 DECL_P in not a variable and appears more than once error messages.
2728 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2732 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2736 * typeck.c (structural_comptypes): Call cp_comptypes.
2737 (comptypes): New; called from the C/C++ common bits to perform
2739 (cp_comptypes): Renamed from comptypes, which is already used,
2740 with a different signature, by the C++ front end.
2741 (build_reinterpret_cast_1): Call cp_comptypes.
2742 (ptr_reasonably_similar): Ditto.
2743 * decl.c (decls_match): Ditto.
2744 * cvt.c (convert_to_reference): Ditto.
2745 * cp-tree.h (same_type_p): Ditto.
2746 (same_or_base_type_p): Ditto.
2747 (comptypes): Rename to cp_comptypes.
2748 * pt.c (canonical_type_parameter): Call cp_comptypes.
2750 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2752 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2753 test for equivalence between pointer and references.
2755 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2758 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2759 (check_field_decls): Likewise.
2760 (note_name_declared_in_class): Likewise.
2761 * call.c (build_new_op): Likewise.
2762 (convert_like_real): Likewise.
2763 (build_over_call): Likewise.
2764 * lex.c (unqualified_fn_lookup_error): Likewise.
2765 * parser.c (cp_parser_template_id): Likewise.
2766 * cvt.c (warn_ref_binding): Likewise.
2767 (convert_to_reference): Likewise.
2768 (ocp_convert): Likewise.
2769 (convert_to_void): Use error instead of pedwarn.
2770 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2771 * decl.c (compute_array_index_type): Use constant_expression_error.
2773 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2775 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2776 that auto is either a storage class or a simple type specifier,
2777 depending on the dialect.
2778 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2779 specifier in C++98 mode, error in C++0x mode (since we don't
2780 support auto as a type specifier, yet).
2781 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2782 storage specifier in C++0x mode.
2783 (cp_parser_simple_type_specifier): Parse `auto' as a
2784 simple-type-specifier, but error because we don't support it yet.
2786 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2788 * parser.c (cp_parser_nonclass_name): New.
2789 (cp_parser_pseudo_destructor_name): Use it instead of
2790 cp_parser_type_name.
2791 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2793 2008-02-29 Tom Tromey <tromey@redhat.com>
2795 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2796 (cp_lexer_get_preprocessor_token): Update.
2797 (cp_lexer_set_source_position_from_token): Don't call
2798 restore_input_file_stack.
2799 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2801 2008-02-28 Richard Guenther <rguenther@suse.de>
2804 2008-02-26 Richard Guenther <rguenther@suse.de>
2806 * decl.c (duplicate_decls): Remove decl from global mapping
2807 before ggc_freeing it.
2809 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2812 * rtti.c: Include c-pragma.h.
2813 (push_abi_namespace, pop_abi_namespace): New functions.
2814 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2815 create_tinfo_types, emit_support_tinfos): Use them.
2816 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2818 2008-02-26 Jason Merrill <jason@redhat.com>
2821 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2822 to name the struct for linkage purposes even if it has attributes.
2823 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2825 2008-02-26 Tom Tromey <tromey@redhat.com>
2827 * parser.c (eof_token): Remove old location code.
2828 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2829 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2831 (cp_write_global_declarations): Likewise.
2832 * lex.c (cxx_init): Remove old location code.
2833 (handle_pragma_implementation): Remove test of
2834 USE_MAPPED_LOCATION.
2835 * pt.c (tsubst): Remove old location code.
2836 * error.c (cp_print_error_function): Remove test of
2837 USE_MAPPED_LOCATION.
2838 * decl.c (pop_label): Remove old location code.
2839 (finish_function): Likewise.
2841 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2844 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2846 2008-02-26 Richard Guenther <rguenther@suse.de>
2848 * decl.c (duplicate_decls): Remove decl from global mapping
2849 before ggc_freeing it.
2851 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2854 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2856 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2858 * typeck.c (build_class_member_access_expr): Add appropriate
2859 OPT_W* parameter to warning.
2860 (build_reinterpret_cast_1): Likewise.
2861 * name-lookup.c (push_overloaded_decl): Likewise.
2863 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2866 * error.c (dump_expr): Handle CONJ_EXPR.
2868 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2871 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2872 (dump_expr): Handle FIXED_CST.
2874 2008-02-24 Jason Merrill <jason@redhat.com>
2876 * parser.c (cp_parser_declaration): Handle "inline namespace".
2877 (cp_parser_namespace_definition): Likewise.
2880 * name-lookup.c (arg_assoc_namespace): Look down into inline
2883 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2885 * typeck.c (check_for_casting_away_constness): Use 1 single
2886 argument, the type of cast, to decide what diagnostics generate.
2887 (build_static_cast_1): Remove unused code. Update call to
2888 check_for_casting_away_constness.
2889 (build_reinterpret_cast_1): Update call to
2890 check_for_casting_away_constness.
2891 (build_const_cast_1): Likewise.
2893 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2895 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2896 VEC_NEW_EXPR), forward to pp_expression.
2897 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2899 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2902 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2904 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2907 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2908 template decls' function decl.
2910 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2914 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2917 * pt.c (determine_specialization): In case of function templates,
2918 when the type of DECL does not match FN there is no match.
2920 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2923 * typeck.c (build_binary_op): Warn about floating point
2924 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2926 2008-02-19 Jason Merrill <jason@redhat.com>
2929 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2930 while we look for possible bindings.
2932 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2935 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2939 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2940 vars. Afterwards ensure v is VAR_DECL.
2943 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2944 call cp_finish_decl.
2945 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2948 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2953 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2954 is error_mark_node, return an error early.
2955 (find_parameter_packs_r): Pass the pointer set along to recursive
2956 calls of cp_walk_subtrees; don't try to manage the pointer set
2958 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2959 (make_pack_expansion): Ditto.
2960 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2961 a second pass through the tree with find_parameter_packs_r; that
2962 second pass no longer does anything.
2963 (push_template_decl_real): If we have an erroneous declaration,
2964 set its type to error_mark_node before returning an error.
2966 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2969 * pt.c (tsubst_initializer_list): Deal with the use of
2970 VOID_TYPE_NODE to indicate value-initialization of the bases.
2972 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2973 Jason Merrill <jason@redhat.com>
2977 * class.c (type_has_user_nondefault_constructor): New fn.
2978 * cp-tree.h: Declare it.
2979 * init.c (emit_mem_initializers): Use it for -W warning about
2980 missing base initializer.
2982 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2985 * pt.c (determine_specialization): In case of function templates,
2986 when the type of DECL does not match FN there is no match.
2988 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2989 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2992 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2993 are not identifier :: ~, return before calling cp_parser_type_name.
2995 2008-02-13 Jason Merrill <jason@redhat.com>
2997 PR c++/34962, c++/34937, c++/34939
2998 * decl2.c (is_late_template_attribute): Always defer attributes
2999 vector_size and weak.
3002 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3003 of enumerators, too.
3005 2008-02-12 Jason Merrill <jason@redhat.com>
3008 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3009 if we're doing conversions to call a user-defined conversion function.
3011 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
3014 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3017 2008-02-12 Jakub Jelinek <jakub@redhat.com>
3020 * init.c (build_new_1): Don't create placement_expr before
3021 constructing alloc_call. Verify that the pointer is passed by
3022 value to operator new.
3024 2008-02-11 Jason Merrill <jason@redhat.com>
3027 * pt.c (tsubst): Don't look up a template typedef in an explicit
3030 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3033 * tree.c (cp_build_qualified_type_real): When building a
3034 cv-qualified array type, build it as a unique type with
3035 build_cplus_array_type_1 and then adopt the unqualified type's
3038 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3041 * decl.c (groktypename): Check grokdeclarator return.
3043 2008-02-10 Jason Merrill <jason@redhat.com>
3046 * decl2.c (cp_write_global_declarations): Don't write out static
3047 data members with DECL_IN_AGGR_P set.
3049 2008-02-08 Jason Merrill <jason@redhat.com>
3052 * tree.c (build_target_expr_with_type): Handle void initializer.
3053 (bot_manip): Remap slot before recursing.
3055 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3058 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3060 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3063 * tree.c: Include tree-flow.h.
3064 (build_target_expr): Check type compatibility.
3065 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3066 * call.c (convert_like_real): Convert bitfield to expected type.
3068 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3072 * typeck.c (structural_comptypes): Call cp_comptypes.
3073 (comptypes): New; called from the C/C++ common bits to perform
3075 (cp_comptypes): Renamed from comptypes, which is already used,
3076 with a different signature, by the C++ front end.
3077 (build_reinterpret_cast_1): Call cp_comptypes.
3078 (ptr_reasonably_similar): Ditto.
3079 * decl.c (decls_match): Ditto.
3080 * cvt.c (convert_to_reference): Ditto.
3081 * cp-tree.h (same_type_p): Ditto.
3082 (same_or_base_type_p): Ditto.
3083 (comptypes): Rename to cp_comptypes.
3084 * pt.c (canonical_type_parameter): Call cp_comptypes.
3086 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3089 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3090 value dependent expression.
3092 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3095 * decl2.c (save_template_attributes): When we're modifying the
3096 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3097 all of the other variants to add those same attributes. Otherwise,
3098 the main variant will be inconsistent with those other variants.
3100 2008-02-04 Richard Guenther <rguenther@suse.de>
3103 * decl.c (record_builtin_java_type): Make jboolean a
3104 integer type again where its mode doesn't match that of bool.
3106 2008-02-02 Jason Merrill <jason@redhat.com>
3107 Mark Mitchell <mark@codesourcery.com>
3110 * init.c (build_value_init_1): New function.
3111 (build_value_init): New function.
3112 * typeck2.c (build_functional_cast): Call it.
3113 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3115 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3116 TYPE_HAS_CONSTRUCTOR.
3117 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3118 add_implicitly_declared_members): Adjust.
3119 (check_field_decls): Adjust. Remove warnings about reference/const
3120 in class without constructor.
3121 (check_bases_and_members): Adjust. Give those warnings here instead.
3122 * decl.c (fixup_anonymous_aggr): Adjust.
3123 (check_initializer): Adjust, clarify logic slightly.
3124 (grok_special_member_properties): Adjust, only set if user-provided.
3125 * rtti.c (create_tinfo_types): Don't set.
3126 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3127 Use same_type_ignoring_top_level_qualifiers_p.
3128 * pt.c (check_explicit_specialization): Adjust.
3129 (instantiate_class_template): Adjust.
3131 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3132 Jakub Jelinek <jakub@redhat.com>
3136 * typeck.c (structural_comptypes): Handle comparisons of
3137 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3139 * mangle.c (write_builtin_type): Map down to the canonical type,
3140 which will be one of the predefined type nodes.
3142 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3145 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3146 bits to allow for expansion of the number of middle end tree
3149 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3160 * typeck.c (check_return_expr): Tweak call to
3161 check_for_bare_parameter_packs.
3162 * class.c (add_method): Be careful with error_mark_nodes.
3163 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3165 * pt.c (struct find_parameter_pack_data): Remove
3167 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3168 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3169 (make_pack_expansion): Ditto.
3170 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3172 (process_template_parm): Tweak call to
3173 check_for_bare_parameter_packs.
3174 (push_template_decl_real): Tweak calls to
3175 check_for_bare_parameter_packs. If bare parameter packs are found
3176 in the list of exceptions, clear out that list after giving an
3178 * semantics.c (finish_cond): Tweak call to
3179 check_for_bare_parameter_packs.
3180 (finish_expr_stmt): Ditto.
3181 (finish_for_expr): Ditto.
3182 (finish_switch_cond): Ditto.
3183 (finish_mem_initializers): Ditto.
3184 (finish_member_declaration): Ditto.
3185 (finish_static_assert): Check for bare parameter packs in the
3187 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3188 attributes of a declaration.
3189 * parser.c (cp_parser_using_declaration): Tweak call to
3190 check_for_bare_parameter_packs.
3191 (cp_parser_base_clause): Ditto.
3193 2008-01-28 Jason Merrill <jason@redhat.com>
3196 * class.c (build_base_path): Fix !want_pointer case.
3198 2008-01-27 Jason Merrill <jason@redhat.com>
3201 * class.c (build_base_path): Fix previous change.
3203 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3206 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3209 2008-01-26 Richard Guenther <rguenther@suse.de>
3212 * typeck.c (build_binary_op): Remove code to shorten compares.
3214 2008-01-25 Richard Guenther <rguenther@suse.de>
3217 * decl.c (record_builtin_java_type): Make __java_boolean
3219 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3220 after TYPE_MAIN_VARIANT check.
3222 2008-01-25 Jason Merrill <jason@redhat.com>
3225 * class.c (build_base_path): Don't mess with virtual access if
3227 * call.c (standard_conversion): Don't check whether source type
3230 * decl2.c (is_late_template_attribute): Don't defer attribute
3231 visibility just because the type is dependent.
3233 2008-01-25 Jason Merrill <jason@redhat.com>
3234 Mark Mitchell <mark@codesourcery.com>
3237 * call.c (standard_conversion): Allow conversion from integer/real
3239 (compare_ics): Such a conversion is worse than a normal arithmetic
3242 2008-01-25 Richard Guenther <rguenther@suse.de>
3245 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3248 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3251 * pt.c (push_template_decl_real): Return error_mark_node in case
3252 of template definition of non-template.
3254 2008-01-24 Jason Merrill <jason@redhat.com>
3257 * decl2.c (is_late_template_attribute): Defer any attribute with
3258 dependent args. Also defer type attributes if the type is dependent.
3260 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3261 Alexandre Oliva <aoliva@redhat.com>
3264 * call.c (reference_binding): For bitfields use the declared bitfield
3266 (add_builtin_candidates): Likewise.
3267 * class.c (layout_class_type): For bitfields copy over the
3268 original type quals.
3270 2008-01-22 Jason Merrill <jason@redhat.com>
3273 * decl.c (groktypename): Also ignore attributes on dependent
3274 possibly-class types.
3277 * friend.c (do_friend): Check for prior declaration of a friend
3278 function of a local class.
3279 * name-lookup.c (lookup_name_innermost_nonclass_level):
3281 * name-lookup.h: Declare it.
3283 2008-01-22 Tom Tromey <tromey@redhat.com>
3286 * init.c (build_new_1): Only disallow Java aggregates.
3288 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3291 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3292 if decl or init is error_mark_node.
3295 * error.c (dump_expr): Handle VECTOR_CST.
3297 2008-01-21 Jason Merrill <jason@redhat.com>
3300 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3303 * pt.c (retrieve_local_specialization): Robustify.
3304 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3307 * pt.c (tsubst): Only call retrieve_local_specialization if the
3308 original typedef was in a function template.
3311 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3313 2008-01-21 Richard Guenther <rguenther@suse.de>
3316 * error.c (cp_print_error_function): Deal with recursive
3319 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3322 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3324 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3328 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3329 on non-IS_AGGR_TYPE scope.
3330 (constructor_name_p): Assert IS_AGGR_TYPE.
3332 2008-01-18 Ian Lance Taylor <iant@google.com>
3335 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3336 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3337 DECL_IS_OPERATOR_NEW flag.
3339 2008-01-16 Richard Guenther <rguenther@suse.de>
3342 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3343 for conversions to type variants.
3345 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3347 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3348 declaration and code. Update copyright year.
3350 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3353 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3354 know we have a class type.
3356 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3359 * pt.c (coerce_template_parameter_pack): When substituting into
3360 the type of a non-type template parameter pack. use the
3361 deduced/substituted arguments.
3362 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3363 can be a parameter pack with the ellipsis following it. When we
3364 have an erroneous declaration, allow it to be a parameter pack.
3365 (cp_parser_template_parameter): Complain about default
3366 arguments on non-type template parameter packs, and parse them
3367 using the new cp_parser_default_argument.
3368 (cp_parser_parameter_declaration): Complain about parameter packs
3369 with default arguments. Move parsing of default arguments into a
3370 new function, cp_parser_default_argument.
3371 (cp_parser_default_argument): New; extracted from
3372 cp_parser_parameter_declaration.
3374 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3380 * typeck.c (check_return_expr): If there are bare parameter packs
3381 in the return value, set it to error_mark_node.
3382 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3383 * pt.c (find_parameter_packs_r): Look at the type of
3384 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3385 (check_for_bare_parameter_packs): Flip the result: now returns
3386 TRUE when there were bare parameter packs, FALSE otherwise.
3387 (push_template_decl_real): Deal with flipped result of
3388 check_for_bare_parameter_packs.
3389 * semantics.c (finish_cond): If there are bare parameter packs in
3390 the conditional, set it to error_mark_node.
3391 (finish_expr_stmt): If there are bare parameter packs in the
3392 expression, set it to error_mark_node.
3393 (finish_for_expr): Ditto.
3394 (finish_switch_cond): If there are bare parameter packs in
3395 the conditional, set it to error_mark_node.
3396 (finish_mem_initializers): If there are bare parameter packs in
3397 the member initializer, set it to error_mark_node.
3398 (finish_member_declaration): Check the attributes of the
3399 declaration for bare parameter packs, and remove the attributes if
3400 any have bare parameter packs.
3401 * parser.c (cp_parser_using_declaration): Check the using
3402 declaration for bare parameter packs.
3403 (cp_parser_base_clause): If there are bare parameter packs in a
3404 base specifier, don't add it to the chain.
3406 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3409 * error.c (dump_simple_decl): Display ellipsis for template
3410 non-type parameter packs.
3411 (dump_decl): Display ellipsis for template type parameter packs.
3412 (dump_template_decl): Display ellipsis for template template
3414 * pt.c (redeclare_class_template): When redeclaring a class
3415 template, check for collisions between template parameters and
3416 template parameter packs.
3418 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3421 * pt.c (process_partial_specialization): Don't mark template
3422 parameters that occur in non-deduced contexts.
3423 (struct pair_fn_data): Add include_nondeduced_p.
3424 (for_each_template_parm_r): Only visit non-deduced contexts if
3425 include_nondeduced_p is set.
3426 (for_each_template_parm): Added parameter include_nondeduced_p,
3427 which states whether template parameters found in non-deduced
3428 contexts should be visited.
3429 (uses_template_parms): Visit all template parameters, even those
3430 in non-deduced contexts.
3432 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3435 * pt.c (check_default_tmpl_args): Check for parameter packs that
3436 aren't at the end of a primary template.
3437 (push_template_decl_real): Remove check for parameter packs that
3438 aren't at the end of a primary template; that now happens in
3439 check_default_tmpl_args.
3440 * semantics.c (finish_template_template_parm): Use
3441 check_default_tmpl_args to check for errors in the template
3444 2008-01-12 Doug Kwan <dougkwan@google.com>
3446 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3447 instead of OPT_Wreturn_type in warning due to ignored return type
3449 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3450 instead of OPT_Wreturn_type in warning due to ignored return type
3453 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3456 * semantics.c (finish_omp_for): Don't call
3457 fold_build_cleanup_point_expr if processing_template_decl.
3459 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3460 Jakub Jelinek <jakub@redhat.com>
3463 * error.c (dump_template_argument): Deal with TREE_LIST.
3465 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3467 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3468 long" in C++0x mode; change the warning to note that "long long"
3469 is only unsupported in C++98 mode.
3471 2007-12-20 Jason Merrill <jason@redhat.com>
3474 * call.c (standard_conversion): Derived-to-base is considered a
3475 standard conversion.
3477 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3480 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3481 call cp_parser_statement rather than
3482 cp_parser_already_scoped_statement.
3484 2007-12-18 Jason Merrill <jason@redhat.com>
3487 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3489 (dependent_type_p_r): Handle the domain of an array.
3491 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3492 Jakub Jelinek <jakub@redhat.com>
3497 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3498 bindings of template template parameters after all template
3499 arguments have been deduced.
3500 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3502 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3503 (unify): Deal with variadic, bound template template parameters.
3504 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3506 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3509 * decl.c (grokdeclarator): Reject friend sfk_constructor
3512 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3515 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3518 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3521 * cp-lang.c (cp_classify_record): New.
3522 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3524 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3527 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3530 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3531 dynamic_cast in a template.
3533 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3536 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3537 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3539 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3542 * error.c (dump_type_prefix, dump_type_suffix): Handle
3543 TYPE_PACK_EXPANSION.
3546 * error.c (dump_expr): Handle ABS_EXPR.
3548 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3552 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3553 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3554 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3555 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3556 flag_use_repository and repo_emit_p returned 2.
3558 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3561 * tree.c (stabilize_call, stabilize_init): Do nothing if
3562 processing_template_decl.
3564 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3567 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3568 error instead of assertion failure.
3569 * parser.c (cp_parser_decltype): If closing paren is not found,
3570 return error_mark_node.
3572 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3575 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3577 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3578 since arg_assoc_template_arg will deal with them (better).
3580 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3583 * pt.c (tsubst_exception_specification): Handle substitutions into
3584 member templates, where tsubst_pack_expansion returns a
3585 TYPE_PACK_EXPANSION.
3587 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3590 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3591 bindings for the template parameter pack, don't try to keep the
3592 empty deduced arguments.
3593 (unify): If a parameter is a template-id whose template argument
3594 list contains a pack expansion that is not at the end, then we
3595 cannot unify against that template-id.
3597 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3600 * pt.c (current_template_args): Use error_operand_p.
3602 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3605 * error.c (dump_decl): Handle TREE_BINFO.
3607 2007-12-01 Ollie Wild <aaw@google.com>
3610 * typeck.c (build_binary_op): Add conversion of pointers to function
3611 members appearing as operands to the equality operators.
3613 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3616 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3618 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3621 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3623 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3628 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3630 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3633 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3635 PR tree-optimization/34181
3636 * method.c (use_thunk): Don't inline the call in the thunk.
3639 * tree.c (decl_linkage): Static data members and static member
3640 functions in anonymous ns classes are lk_external.
3642 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3645 * decl.c (start_preparsed_function): Pass
3646 processing_template_decl for the new allocate_struct_function
3649 2007-11-25 Richard Guenther <rguenther@suse.de>
3651 * decl.c (poplevel): Use BLOCK_CHAIN.
3653 2007-11-24 Ollie Wild <aaw@google.com>
3655 * typeck.c (delta_from_ptrmemfunc): New function.
3656 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3657 (build_binary_op): Call delta_from_ptrmemfunc.
3659 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3663 * decl.c (cp_finish_decl): Disallow variable or field
3664 definitions if extern "Java" aggregates.
3665 (grokparms): Disallow parameters with extern "Java"
3667 (check_function_type): Disallow function return values
3668 with extern "Java" aggregates.
3669 * init.c (build_new_1): Disallow placement new with
3670 extern "Java" aggregates.
3672 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3673 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3676 * call.c (convert_like_real): Build a zero constant when __null is
3677 converted to an integer type.
3679 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3682 * decl2.c (cp_write_global_declarations): Issue error about static
3683 data members in anonymous namespace which are declared and used,
3686 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3689 * parser.c (cp_parser_class_head): Reject function template ids.
3692 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3693 when processing_template_decl to build_array_type.
3696 * pt.c (more_specialized_fn): Don't segfault if one or
3697 both argument list end with ellipsis.
3699 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3702 * semantics.c (finish_call_expr): Set
3703 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3704 or OVERLOAD with all noreturn functions.
3706 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3709 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3712 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3719 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3720 set to error_mark_node the outermost POINTER_TYPE to the pack if
3721 it is seen in a POINTER_TYPE.
3722 (push_template_decl_real): If check_for_bare_parameter_packs
3723 fails for function return type, set the return type to
3724 integer_type_node. If check_for_bare_parameter_packs failed
3725 for non-function, return error_mark_node.
3728 * call.c (build_new_op): Call resolve_args before calling
3731 2007-11-11 Tom Tromey <tromey@redhat.com>
3734 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3736 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3739 * pt.c (redeclare_class_template): Update error message. Use a
3740 note to show the previous declaration.
3741 (tsubst_friend_class): Use the location of the friend template as
3742 the input location before calling redeclare_class_template.
3744 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3747 * semantics.c (finish_pseudo_destructor_expr): Handle
3748 object == error_mark_node.
3750 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3753 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3754 is not scalar type, let finish_class_member_access_expr handle
3755 diagnostics. Pass BIT_NOT_EXPR argument to
3756 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3758 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3761 * decl.c (cp_complete_array_type): If any of the initializer
3762 elements are pack expansions, don't compute the array size yet.
3764 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3767 * tree.c (decl_linkage): Fields have no linkage.
3769 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3771 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3773 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3778 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3779 Be careful with ERROR_MARK_NODEs.
3780 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3783 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3786 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3789 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3793 * tree.c (c_build_qualified_type): Define bridge to
3794 cp_build_qualified_type.
3796 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3807 * typeck.c (check_return_expr): Pass address of retval to
3808 check_for_bare_parameter_packs.
3809 * class.c (build_base_field): Tolerate bases that have no layout
3811 (end_of_base): Ditto.
3812 * tree.c (canonical_type_variant): Be careful with
3814 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3816 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3817 which states whether parameter packs should be replaced with
3819 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3820 possible. If set_packs_to_error is set true, replace the parameter
3821 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3822 (uses_parameter_packs): Don't set parameter packs to
3824 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3825 which may be modified (if it is a parameter pack). Instructs
3826 find_parameter_packs_r to replace parameter packs with
3827 ERROR_MARK_NODE (so that they won't cause errors later on).
3828 (process_template_parm): Pass pointer to
3829 check_for_bare_parameter_packs.
3830 (process_partial_specialization): Replace pack expansions before
3831 the end of the template argument list with ERROR_MARK_NODE.
3832 (push_template_decl_real): Pass pointer to
3833 check_for_bare_parameter_packs. Replace parameter packs not at the
3834 end of the template parameter list with ERROR_MARK_NODE.
3835 (convert_template_argument): Be more careful about using DECL_NAME
3836 on only declarations.
3837 (unify): Can't unify against ERROR_MARK_NODE.
3838 * semantics.c (finish_cond): Pass pointer to
3839 check_for_bare_parameter_packs.
3840 (finish_expr_stmt): Ditto.
3841 (finish_for_expr): Ditto.
3842 (finish_switch_cond): Pass pointer to
3843 check_for_bare_parameter_packs, and call it before we put the
3844 condition into the statement.
3845 (finish_mem_initializers): Pass pointer to
3846 check_for_bare_parameter_packs.
3847 (finish_member_declaration): Ditto.
3848 * parser.c (cp_parser_base_clause): Ditto.
3850 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3853 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3854 with the final TREE_READONLY flag in place. processing_template_decl
3855 is known to be 0 in this part of function.
3858 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3859 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3860 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3861 * semantics.c (finish_omp_atomic): Revert most of the
3862 2007-02-05 changes, just keep the new representation of
3863 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3865 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3868 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3871 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3876 * typeck.c (merge_types): Don't lose rvalue references when
3878 * call.c (build_over_call): Don't elide move constructors just
3879 because the copy constructor is trivial (!).
3880 (compare_ics): If comparing cv-qualifiers fails, we can still order
3881 based on binding lvalues vs. rvalues.
3883 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3886 * pt.c (unify_pack_expansion): bring handling of function call
3887 arguments into line with type_unification_real.
3889 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3891 * typeck.c (build_binary_op): Use pedwarn instead of error for
3894 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3897 * parser.c (cp_parser_unary_expression): For &&label call
3898 cp_parser_non_integral_constant_expression and return error_mark_node
3899 if it returned true.
3902 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3903 is neither FUNCTION_TYPE nor METHOD_TYPE.
3905 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3908 * parser.c (cp_parser_nested_name_specifier_opt): Use
3909 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3910 typedef of currently open class.
3912 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3915 * error.c (dump_expr): Deal specially with statements.
3917 2007-11-01 Jason Merrill <jason@redhat.com>
3920 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3922 (lookup_template_class): Use it to get the outer template args
3923 for instantiating one.
3926 * pt.c (reduce_template_parm_level): tsubst the parameters
3927 of a template template parm.
3929 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3932 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3934 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3937 * parser.c (cp_parser_postfix_dot_deref_expression): If
3938 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3939 first and if that succeeds and type is SCALAR_TYPE_P, create
3943 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3944 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3945 as for std::type_info.
3947 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3950 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3951 pp_cxx_delete_expression): Change to static linkage.
3952 * cxx-pretty-print.h: Adjust declarations.
3953 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3954 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3955 MODOP_EXPR): Forward to pp_expression.
3957 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3960 2007-10-31 Christian Bruel <christian.bruel@st.com>
3961 Mark Mitchell <mark@codesourcery.com>
3964 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3965 if retval is volatile.
3967 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3970 * decl2.c (build_offset_ref_call_from_tree): Call
3971 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3972 if FN is DOTSTAR_EXPR.
3974 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3978 * pt.c (find_parameter_packs_r): Fix typo in comment.
3979 (convert_template_argument): Look at the pattern of a pack
3980 expansion to determine what kind of entity we're converting.
3981 (coerce_template_parameter_pack): When we have coerced a non-type
3982 template parameter pack, substitute into the type of that pack.
3983 (tsubst_pack_expansion): When our substitution of a parameter pack
3984 is a "trivial" substitution of itself, just substitute into the
3985 pack expansion rather than actually expanding.
3987 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3990 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3991 for non-integral type bitfields. Return true if bitfield is correct, false
3992 error has been diagnosed.
3993 (check_field_decls): If check_bitfield_decl returned false, call also
3996 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3997 Mark Mitchell <mark@codesourcery.com>
4000 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4001 class member error out and return.
4003 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4005 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4006 to current_function_decl rather than 0.
4009 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4011 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4013 2007-10-27 Jason Merrill <jason@redhat.com>
4016 * call.c (convert_default_arg): Detect recursion.
4018 2007-10-27 Jakub Jelinek <jakub@redhat.com>
4021 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4022 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4024 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4026 * error.c (dump_expr): Handle OFFSETOF_EXPR.
4028 2007-10-26 Jason Merrill <jason@redhat.com>
4031 * pt.c (get_template_info): New fn.
4032 (template_class_depth): Use it.
4033 (push_template_decl_real): Check that the template args of the
4034 definition match the args of the previous declaration.
4036 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4039 * decl2.c (coerce_new_type): Do not allow a default argument for
4040 the first parameter.
4042 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4045 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4046 don't see the leading '('. Only lookup names if we get an
4049 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4052 * parser.c (cp_parser_parenthesized_expression_list): Set
4053 greater_than_is_operator_p to true in between the parens.
4055 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4058 * decl.c (grokdeclarator): In case of conflicting specifiers
4059 just return error_mark_node.
4061 2007-10-26 Ollie Wild <aaw@google.com>
4063 * expr.c (cxx_expand_expr): Removed.
4064 * cp-tree.h (exx_expand_expr): Removed.
4065 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4068 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4071 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4073 2007-10-23 Jason Merrill <jason@redhat.com>
4075 PR c++/25950 (DR 391)
4076 * call.c (struct conversion): Remove check_copy_constructor_p.
4077 (reference_binding): Always bind a reference directly to a
4078 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4080 (check_constructor_callable): Remove.
4081 (convert_like_real): Don't call it.
4082 (initialize_reference): Don't call check_constructor_callable.
4083 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4084 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4085 conversions if LOOKUP_NO_TEMP_BIND.
4086 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4087 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4089 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4091 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4094 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4095 before checking if its type is integral.
4097 2007-10-22 Jason Merrill <jason@redhat.com>
4100 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4101 * pt.c (apply_late_template_attributes): Splice out dependent
4102 attributes from DECL_ATTRIBUTES.
4104 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4106 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4108 * typeck.c (build_binary_op) : Use appropriate warning option
4109 instead of unnamed warning.
4111 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4114 * pt.c (current_template_args): Do not change TREE_LIST elements
4115 with a TREE_VALUE of error_mark_node.
4117 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4119 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4120 * decl.c (start_decl): Tidy.
4121 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4123 (grokdeclarator): Clarify comment.
4125 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4128 * decl.c (grokfndecl): Return NULL after the "definition of
4129 implicitly-declared" error happened.
4131 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4134 * call.c (build_user_type_conversion_1): Do not consider conversion
4135 functions to convert a (possibly cv-qualified) object to the (possibly
4136 cv-qualified) same object type (or a reference to it), to a (possibly
4137 cv-qualified) base class of that type (or a reference to it).
4139 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4141 * pt.c (tsubst): Use template_parm_level_and_index.
4143 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4146 * parser.c (cp_parser_compound_statement): Handle label-declarations
4147 at the beginning of the compound statement.
4148 (cp_parser_block_declaration): Issue diagnostics about __label__
4149 not at the beginning of a block.
4151 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4154 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4155 to convert_template_argument.
4156 (coerce_template_parms): Return error_mark_node after fixed-length
4158 (tsubst_decl): Check for error_mark_node the return value of the
4159 first tsubst in 'case VAR_DECL'.
4161 2007-10-08 Ollie Wild <aaw@google.com>
4163 * typeck2.c (digest_init): Call cplus_expand_constant after
4164 convert_for_initialization.
4165 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4166 * expr.c (cplus_expand_constant): Updated function description.
4168 2007-10-04 Jason Merrill <jason@redhat.com>
4171 * call.c (initialize_reference): Handle local static reference
4174 2007-10-03 Jason Merrill <jason@redhat.com>
4177 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4178 (push_namespace): Here.
4179 (handle_namespace_attrs): New fn for the attr code.
4180 (leave_scope): Don't pop_visibility.
4181 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4182 * parser.c (cp_parser_namespace_definition): Call
4183 handle_namespace_attrs and pop_visibility as appropriate.
4186 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4188 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4190 * decl.c (duplicate_decls): Preserve linkage flags for mere
4191 redeclarations of gnu_inline definitions.
4193 2007-10-03 Jason Merrill <jason@redhat.com>
4196 * decl.c (wrap_cleanups_r): New fn.
4197 (wrap_temporary_cleanups): New fn.
4198 (initialize_local_var): Call it.
4200 2007-09-29 Jason Merrill <jason@redhat.com>
4203 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4204 constant to not have DECL_EXTERNAL if it's file-local.
4206 2007-09-28 Ollie Wild <aaw@google.com>
4209 2007-09-27 Ollie Wild <aaw@google.com>
4211 * typeck2.c (digest_init): Call cplus_expand_constant after
4212 convert_for_initialization.
4213 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4214 * expr.c (cplus_expand_constant): Updated function description.
4216 2007-09-28 Jason Merrill <jason@redhat.com>
4219 * class.c (layout_empty_base): Take rli parameter, update
4220 rli->record_align if empty base has user-specified alignment.
4221 (build_base_field): Pass rli to it.
4223 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4226 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4228 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4231 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4232 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4233 (dump_parameters): Just call dump_type for argument packs too.
4235 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4238 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4239 qualification by creating qualified PACK_EXPANSION_PATTERN and
4240 then calling make_pack_expansion on it.
4242 2007-09-27 Ollie Wild <aaw@google.com>
4244 * typeck2.c (digest_init): Call cplus_expand_constant after
4245 convert_for_initialization.
4246 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4247 * expr.c (cplus_expand_constant): Updated function description.
4249 2007-09-27 Jason Merrill <jason@redhat.com>
4252 * decl2.c (is_late_template_attribute): Don't crash on unknown
4255 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4258 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4259 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4260 spaces in the formatting.
4261 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4263 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4265 * error.c (cxx_print_error_function): Add third argument, pass
4266 it over to lhd_print_error_function.
4267 (cp_print_error_function): If diagnostic->abstract_origin, print
4269 * cp-tree.h (struct diagnostic_info): New forward decl.
4270 (cxx_print_error_function): Add third argument.
4272 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4275 * name-lookup.c (pushtag): Do not create an implicit typedef before
4276 the associated type declaration is known to be valid.
4278 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4280 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4281 rather than pointers.
4283 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4286 * search.c (check_final_overrider): Fail if
4287 targetm.comp_type_attributes returns 0.
4289 2007-09-24 Jason Merrill <jason@redhat.com>
4292 * pt.c (resolve_typename_type): Don't look things up in the original
4293 template if it would mean losing template arguments.
4295 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4298 * cp-tree.h (cxx_type_hash_eq): New prototype.
4299 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4300 * tree.c (cxx_type_hash_eq): New function.
4302 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4305 * tree.c (cp_build_qualified_type_real): Build a canonical
4306 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4308 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4312 * tree.c (cplus_array_compare): Compare pointers, not types.
4313 (build_cplus_array_type_1): Store new array type into the hash
4314 table before building the canonical type; build the canonical type
4316 (cp_build_qualified_type_real): Put all of the array types with
4317 cv-qualified element types into the C++ array hash table, built as
4318 variants of the unqualified versions.
4320 2007-09-23 Jason Merrill <jason@redhat.com>
4323 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4324 for deprecation warnings.
4326 2007-09-22 Jason Merrill <jason@redhat.com>
4329 * call.c (build_over_call): Warn about deprecated virtuals.
4332 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4333 (MAYBE_TAGGED_TYPE_P): Remove.
4334 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4335 instead of calling is_late_template_attribute again.
4336 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4337 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4338 Don't crash on typedefs from non-template classes.
4339 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4340 (is_late_template_attribute): All attributes applied to template
4341 parms or typename types are dependent. Static.
4342 (splice_template_attributes): Pass decl through.
4343 (save_template_attributes): Likewise.
4345 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4348 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4349 returned from tsubst_pack_expansion.
4350 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4351 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4353 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4356 * semantics.c (finish_id_expression): Use consistently
4357 context_for_name_lookup.
4358 * decl.c (fixup_anonymous_aggr): Fix error message for
4359 anonymous struct (vs union).
4361 2007-09-19 Jason Merrill <jason@redhat.com>
4364 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4365 (retrieve_specialization): Only tagged types use
4366 DECL_TEMPLATE_INSTANTIATIONS.
4367 (instantiate_class_template): Push nested classes too.
4368 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4370 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4371 * init.c (is_aggr_type): Remove redundant tests.
4372 * class.c (push_nested_class): Use CLASS_TYPE_P.
4374 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4377 * init.c (build_zero_init): If, recursively, build_zero_init
4378 returns a NULL_TREE, do not append it to the VEC of constructors.
4380 2007-09-18 Jason Merrill <jason@redhat.com>
4383 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4384 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4385 ATTR_FLAG_TYPE_IN_PLACE.
4386 (tsubst): Do unqualified lookup to find typedefs from current class.
4387 [ARRAY_TYPE]: Propagate alignment info.
4388 * decl2.c (is_late_template_attribute): Only defer handling of
4389 attribute aligned if the expression is dependent.
4390 (save_template_attributes): If we're deferring any attributes,
4391 make this a naming typedef.
4393 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4395 PR c++/33462 (again)
4396 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4397 va_arg instead of __builtin_va_arg.
4399 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4402 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4403 (pp_cxx_primary_expression): Use it.
4404 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4405 * error.c (dump_expr): Use it.
4407 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4410 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4411 out case TYPEID_EXPR to...
4412 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4413 and pp_cxx_right_paren.
4414 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4415 * error.c (dump_expr): Use it.
4417 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4420 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4421 (pp_cxx_primary_expression): Use it.
4422 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4423 * error.c (dump_expr): Use it.
4425 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4428 * init.c (build_new): Remove warning for zero-element
4431 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4434 * call.c (maybe_handle_implicit_object): Set this_p, clear
4435 rvaluedness_matches_p.
4436 (compare_ics): Do not compare rvaluedness matching when one of the
4437 operands is an implicit object.
4439 2007-09-14 Jason Merrill <jason@redhat.com>
4441 PR c++/17743, c++/19163
4442 * decl2.c (is_late_template_attribute): New fn.
4443 (splice_template_attributes, save_template_attributes): New fns.
4444 (cplus_decl_attributes): Call save_template_attributes.
4445 * pt.c (apply_late_template_attributes): New fn.
4446 (instantiate_class_template, tsubst_decl): Use it.
4447 * cp-tree.h: Declare is_late_template_attribute.
4449 2007-09-13 Tom Tromey <tromey@redhat.com>
4451 * parser.c (cp_lexer_new_main): Don't use
4452 c_lex_return_raw_strings.
4453 (cp_lexer_get_preprocessor_token): Update. Add special case when
4456 2007-09-11 Jan Hubicka <jh@suse.cz>
4458 * method.c (use_thunk): Use tree_rest_of_compilation
4459 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4460 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4461 * cp-tree.h (expand_body): Kill.
4462 (emit_associated_thunks): Declare.
4463 * semantics.c (emit_associated_thunks): Export.
4464 (expand_body): Kill.
4466 2007-09-09 David Daney <ddaney@avtrex.com>
4469 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4470 to calculate cookie_ptr.
4472 2007-09-08 Jason Merrill <jason@redhat.com>
4475 * pt.c (most_specialized_class): Set processing_template_decl
4476 while tsubsting partial spec args.
4478 2007-09-06 Jason Merrill <jason@redhat.com>
4480 * decl2.c (get_guard): Copy visibility from the guarded variable.
4482 2007-09-06 Jan Hubicka <jh@suse.cz>
4484 * semantics.c (expand_body): Do not mark arguments of clones used.
4486 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4489 * decl.c (cp_finish_decl): When processing_template_decl,
4490 deal correctly with init as TREE_LIST.
4492 2007-09-06 Tom Tromey <tromey@redhat.com>
4494 * decl.c (finish_function): Put return's location on line zero of
4497 2007-09-05 Jason Merrill <jason@redhat.com>
4500 * except.c (prepare_eh_type): Use type_decays_to.
4503 * init.c (build_delete): Use build_headof to get the address of the
4504 complete object if we aren't using the deleting destructor.
4505 * rtti.c (build_headof): No longer static.
4506 * cp-tree.h: Declare it.
4508 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4510 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4511 decl if a prototype for XX is provided with throw().
4514 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4515 on __*_chk non-__builtin_* decls.
4517 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4520 * semantics.c (finish_id_expression): Use context_for_name_lookup
4521 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4522 * class.c (finish_struct_anon): Deal correctly with anonymous
4523 structs (vs unions, as GNU extension) in error messages.
4525 2007-09-05 Jan Hubicka <jh@suse.cz>
4527 * sematics.c (expand_body): Remove unnecesary import_export_decl
4528 call, DECL_EXTERNAL checks and current_function_decl saving.
4530 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4532 PR c++/29731 (again)
4533 * parser.c (cp_parser_primary_expression): Return error_mark_node
4534 when a statement-expression is found in a template-argument list.
4536 2007-09-04 Jason Merrill <jason@redhat.com>
4538 * except.c (initialize_handler_parm): Use
4539 fold_build_cleanup_point_expr.
4542 * call.c (reference_binding): Don't look for user-defined conversions
4546 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4547 the MUST_NOT_THROW_EXPR.
4549 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4551 * decl.c (cp_finish_decl): Call determine_visibility before
4552 make_rtl_for_nonlocal_decl.
4554 2007-09-04 Jason Merrill <jason@redhat.com>
4557 * pt.c (most_specialized_class): Substitute outer template
4558 arguments into the arguments of a member template partial
4560 (strip_innermost_template_args): New fn.
4562 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4564 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4566 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4568 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4569 * decl.c (cp_make_fname_decl): Likewise,
4570 * parser.c (cp_parser_string_literal): Likewise,
4571 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4572 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4575 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4578 * typeck.c (build_unary_op): Fix error message for
4579 Boolean expression as operand to operator--.
4581 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4583 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4584 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4587 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4590 * init.c (build_default_init): Make extern.
4591 * cp-tree.h (build_default_init): Declare here.
4592 * pt.c (tsubst_expr): When the instantiation of the initializer of
4593 a variable results in an empty list, default-initialize the
4595 (tsubst_copy_and_build): When the instantiation of the initializer
4596 in a new expression results in an empty initializer list,
4597 default-initialize it.
4599 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4601 * mangle.c (write_type): Change mangling of rvalue reference from
4604 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4606 * decl.c (duplicate_decls): Remove duplicated line.
4608 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4611 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4612 BOUND_TEMPLATE_TEMPLATE_PARM.
4614 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4617 * search.c (lookup_member): Check the name argument for
4620 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4623 * parser.c (cp_parser_trait_expr): Check rerurn value of
4626 2007-08-30 Ollie Wild <aaw@google.com>
4628 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4629 convert_ptrmem for pointer to member conversions.
4630 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4631 (ocp_convert): Update cp_convert_to_pointer call.
4632 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4634 (build_static_cast_1): Check can_convert for conversions in either
4636 (get_delta_difference_1): New function.
4637 (get_delta_difference): Refactor to call get_delta_difference_1.
4639 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4641 * decl.c (start_preparsed_function): Set
4642 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4644 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4647 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4648 BOUND_TEMPLATE_TEMPLATE_PARM.
4650 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4654 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4655 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4657 2007-08-27 Jason Merrill <jason@redhat.com>
4660 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4661 Look inside STMT_EXPR.
4662 * semantics.c (stmt_expr_value_expr): New fn.
4663 * cp-tree.h: Declare it.
4666 * decl.c (groktypename): Ignore attributes applied to class type.
4668 2007-08-28 Richard Guenther <rguenther@suse.de>
4670 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4672 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4674 * error.c (dump_expr): Handle COMPLEX_CST.
4675 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4676 (pp_cxx_expression): Likewise.
4678 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4680 * decl.c (GNU_INLINE_P): New.
4681 (duplicate_decls): Handle gnu_inline. Merge attributes and
4682 some flags in overriding definitions.
4683 (redeclaration_error_message): Handle gnu_inline.
4684 (start_preparsed_function): Likewise.
4686 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4688 * call.c (sufficient_parms_p): Constify.
4689 * class.c (same_signature_p): Likewise.
4690 * cp-gimplify.c (is_invisiref_parm,
4691 cxx_omp_privatize_by_reference): Likewise.
4692 * cp-objcp-common.c (has_c_linkage): Likewise.
4693 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4694 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4695 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4696 num_artificial_parms_for, comp_template_parms,
4697 template_parameter_pack_p, any_dependent_template_arguments_p,
4698 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4699 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4700 zero_init_p, member_p, cp_lvalue_kind,
4701 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4702 varargs_function_p, is_dummy_object, special_function_kind,
4703 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4704 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4705 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4706 cp_has_mutable_p, at_least_as_qualified_p,
4707 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4708 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4709 * except.c (nothrow_libfn_p): Likewise.
4710 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4712 * pt.c (comp_template_parms, template_parameter_pack_p,
4713 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4714 any_dependent_template_arguments_p): Likewise.
4715 * repo.c (repo_export_class_p): Likewise.
4716 * semantics.c (anon_aggr_type_p): Likewise.
4717 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4718 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4719 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4720 zero_init_p, special_function_p): Likewise.
4721 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4722 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4723 compparms, invalid_nonstatic_memfn_p,
4724 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4725 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4726 cp_has_mutable_p, lvalue_or_else): Likewise.
4728 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4730 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4731 * cp-objcp-common.c (cp_tree_size): Ditto.
4732 * tree.c (cp_walk_subtrees): Ditto
4733 * cp-tree.def (TINST_LEVEL): Go away.
4734 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4735 move together with other non-tree structs.
4736 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4737 (union lang_tree_node): Eliminate tinst_level field.
4738 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4739 (current_instantiation, outermost_tinst_level): Return
4740 a "struct tinst_level *".
4742 * error.c (print_instantiation_partial_context): Change second
4743 parameter to a "struct tinst_level *". Replace accessor macros
4745 (print_instantiation_full_context): Likewise.
4746 * lex.c (in_main_input_context): Likewise.
4748 * pt.c (struct pending_templates): New.
4749 (pending_templates, last_pending_template): Use it as a type.
4750 (current_tinst_level): Change typo to "struct tinst_level *"
4751 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4752 (add_pending_template): Construct a "struct pending_template".
4753 Replace TINST_LEVEL accessor macros with field access.
4754 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4755 (pop_tinst_level): Likewise.
4756 (instantiate_pending_templates): Likewise. Factor common code used
4757 when an instantiation has been done.
4758 (outermost_tinst_level): Replace tree_last with loop.
4759 (current_instantiation): Return a "struct tinst_level *".
4761 2007-08-24 Ollie Wild <aaw@google.com>
4763 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4764 * name-lookup.h (cp_binding_level): Remove vtables member.
4766 2007-08-24 Richard Guenther <rguenther@suse.de>
4768 * tree.c (cp_cannot_inline_tree_fn): Remove.
4769 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4770 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4773 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4776 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4777 error_mark_node right away if build_expr_type_conversion
4781 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4782 is error_mark_node rather than NULL_TREE.
4783 * pt.c (check_explicit_specialization): Likewise.
4786 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4787 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4789 2007-08-22 Jason Merrill <jason@redhat.com>
4792 * pt.c (outermost_tinst_level): New function.
4793 * lex.c (in_main_input_context): New function.
4794 * cp-tree.h: Declare it.
4795 * decl2.c (constrain_class_visibility): Use it to avoid warning
4796 about uses of the anonymous namespace in the main input file.
4798 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4800 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4802 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4805 * class.c (finish_struct_1): Warn when a class has virtual
4806 functions and accessible non-virtual destructor.
4808 2007-08-20 Richard Guenther <rguenther@suse.de>
4812 * call.c (build_new_method_call): Convert initializer to
4814 * init.c (build_aggr_init): Do not fiddle with types.
4815 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4816 * except.c (build_throw): Do not drop qualifiers for the
4818 * typeck.c (get_member_function_from_ptrfunc): Do not
4819 fiddle with types, instead convert.
4820 (build_ptrmemfunc1): Convert to the target type for
4822 (gfc_trans_allocate): Convert result to target type.
4823 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4824 pointer-to-member structures shall have alias set zero as well.
4826 2007-08-20 Richard Guenther <rguenther@suse.de>
4828 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4830 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4831 (nonstatic_local_decl_p): Likewise.
4832 * tree.c (cp_auto_var_in_fn_p): Remove.
4833 * decl.c (nonstatic_local_decl_p): Remove.
4835 2007-08-20 Richard Guenther <rguenther@suse.de>
4837 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4839 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4840 cp_walk_subtrees lh parameter.
4841 (cp_walk_tree_without_duplicates): New define to
4842 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4843 * tree.c (count_trees): Call
4844 cp_walk_tree_without_duplicates.
4845 (verify_stmt_tree): Call cp_walk_tree.
4846 (break_out_target_exprs): Likewise.
4847 (WALK_SUBTREE): Likewise.
4848 * cp-gimplify.c (cp_genericize): Likewise.
4849 * cp-pt.c (find_parameter_packs_r): Likewise.
4850 (uses_parameter_packs): Likewise.
4851 (make_pack_expansion): Likewise.
4852 (check_for_bare_parameter_packs): Likewise.
4853 (for_each_template_parm): Likewise.
4854 * decl.c (check_default_argument): Call
4855 cp_walk_tree_without_duplicates.
4856 * except.c (build_throw): Likewise.
4857 * decl2.c (type_visibility): Likewise.
4858 * semantics.c (expand_or_defer_fn): Likewise.
4859 (finalize_nrv): Call cp_walk_tree.
4861 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4864 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4865 Initialize it with save_expr rather than get_temp_regvar.
4867 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4870 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4873 2007-08-17 Ollie Wild <aaw@google.com>
4876 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4877 declarations into appropriate slots for comparison. Fix type
4880 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4883 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4884 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4886 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4889 * parser.c (cp_parser_class_head): Improve error message.
4891 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4893 * pt.c (instantiate_decl): Set input_location
4894 for the function end.
4896 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4898 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4900 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4901 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4902 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4903 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4904 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4905 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4906 * typeck.c (cp_type_quals): Likewise.
4907 * typeck2.c (cxx_incomplete_type_diagnostic,
4908 cxx_incomplete_type_error): Likewise.
4910 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4913 * pt.c (tsubst_friend_function): When check_classfn
4914 returns error_mark_node likewise return it.
4916 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4919 * typeck.c (check_return_expr): Don't NRV optimize vars in
4921 * decl.c (finish_function): Comment fix.
4923 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4926 * pt.c (push_template_decl_real): Depending on TYPE_P
4927 use either TYPE_CONTEXT or DECL_CONTEXT.
4929 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4931 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4932 constructors and destructors return this.
4934 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4937 * decl2.c (check_classfn): Return error_mark_node in case of error;
4938 in that case, do not call add_method.
4939 * decl.c (start_decl): Deal with check_classfn returning
4941 (grokfndecl): Likewise.
4942 * pt.c (tsubst_friend_function): Likewise.
4944 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4947 * typeck.c (build_binary_op): Disallow vector float types with
4948 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4950 2007-08-11 Ian Lance Taylor <iant@google.com>
4952 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4954 * cp-tree.h (cxx_get_alias_set): Update declaration.
4956 2007-08-10 Ollie Wild <aaw@google.com>
4958 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4960 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4962 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4963 (lookup_using_namespace): Fix ambiguous_decl call.
4964 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4966 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4968 * call.c (name_as_c_string): Use CONST_CAST.
4969 * decl.c (build_decl): Likewise.
4970 * parser.c (cp_parser_string_literal): Likewise.
4972 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4975 * error.c (dump_expr): Consistently use the *_cxx_*
4976 variants of the pretty-print functions.
4978 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4981 * decl.c (check_special_function_return_type): Just error
4982 on return type specified for conversion operator.
4984 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4986 * typeck2.c (readonly_error): Handle general expressions.
4987 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4989 2007-08-06 Dan Hipschman <dsh@google.com>
4991 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4992 access function name.
4994 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4997 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4998 * g++spec.c (lang_specific_driver): Check them.
5000 2007-08-06 Paolo Carlini <pcarlini@suse.de>
5003 * pt.c (inline_needs_template_parms): Fix comment; change return type
5006 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
5009 2007-03-26 Dirk Mueller <dmueller@suse.de>
5011 * parser.c (cp_parser_member_declaration): Pedwarn
5012 about stray semicolons after member declarations.
5014 2007-08-02 Lee Millward <lee.millward@gmail.com>
5019 * parser.c (cp_parser_asm_definition): Detect and discard asm
5020 statements with invalid inputs or outputs.
5021 (cp_parser_asm_operand_list): Return error mark node if any
5022 of the operands are invalid. Adjust documentation.
5024 2007-08-02 Nick Clifton <nickc@redhat.com>
5026 * typeck.c: Change copyright header to refer to version 3 of the
5027 GNU General Public License and to point readers at the COPYING3
5028 file and the FSF's license web page.
5029 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5030 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5031 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5032 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5033 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5034 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5035 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5036 name-lookup.h, parser.c: Likewise.
5038 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5041 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5043 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5046 * semantics.c (finish_label_stmt): Reject the __label__
5047 extension outside function scopes.
5049 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5051 * parser.c (eof_token): Un-constify.
5052 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5053 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5056 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5058 * pt.c, tree.c, typeck2.c: Fix comment typos.
5060 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5061 Mark Mitchell <mark@codesourcery.com>
5064 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5065 hidden due to friend declarations in local classes.
5067 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5069 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5070 * cp-tree.def (DECLTYPE_TYPE): New.
5071 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5072 (dump_type_prefix): Ditto.
5073 (dump_type_suffix): Ditto.
5074 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5075 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5076 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5078 (DECLTYPE_TYPE_EXPR): New.
5079 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5080 (finish_declared_type): Declare.
5081 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5082 DECLTYPE_TYPE nodes.
5083 (pp_cxx_type_id): Ditto.
5084 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5085 (tsubst): Substitute into a DECLTYPE_TYPE node.
5086 (tsubst_copy): Ditto.
5087 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5089 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5090 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5091 structural equality (because we can't hash the expressions).
5092 (finish_declared_type): New.
5093 * lex.c (reswords): Add "decltype" keyword.
5094 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5095 (cp_parser_postfix_expression): Add member_access_only_p to
5096 restrict postfix expression to member access expressions.
5097 (cp_parser_unary_expression): Update call to
5098 cp_parser_postfix_expression to reflect new parameter.
5099 (cp_parser_declared_type): New.
5100 (cp_parser_simple_type_specifier): Parse decltype types.
5102 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5105 * call.c (convert_for_arg_passing): Only widen bitfields to their
5106 declared types if necessary.
5108 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5110 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5113 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5115 * decl.c (typename_hash, typename_compare): Constify.
5116 * mangle.c (hash_type, compare_type): Likewise.
5117 * pt.c (eq_local_specializations, hash_local_specialization):
5119 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5120 list_hash): Likewise.
5121 * typeck2.c (pat_compare): Likewise.
5123 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5125 * method.c (implicitly_declare_fn): Increase alignment if member
5126 function pointer format requires it.
5128 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5131 * typeck.c (check_return_expr): Do not pass a null argument
5134 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5137 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5140 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5143 * typeck.c (convert_arguments): Only use default args if we have
5147 * typeck.c (structural_comptypes): No need to check
5148 resolve_typename_type return value here.
5149 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5150 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5151 original type rather than error_mark_node in case of failure.
5152 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5153 resolve_typename_type result check.
5154 (cp_parser_direct_declarator, cp_parser_head,
5155 cp_parser_constructor_declarator_p): Likewise.
5157 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5159 * pt.c (template_parms_variadic_p): Remove.
5160 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5162 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5165 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5166 argument to dump_aggr_init_expr_args instead of false.
5168 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5170 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5171 canonical types; otherwise, fall back to structural type
5172 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5173 internal compiler error if the canonical types are wrong.
5175 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5178 * parser.c (cp_parser_make_indirect_declarator): When the
5179 the code argument is ERROR_MARK return cp_error_declarator.
5181 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5184 * decl.c (cxx_init_decl_processing): Don't set
5185 force_align_functions_log.
5186 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5187 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5188 FUNCTION_DECL, return its alignment.
5190 2007-07-09 Richard Guenther <rguenther@suse.de>
5192 * decl.c (start_preparsed_function): Do not promote return type.
5194 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5197 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5199 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5202 * pt.c (resolve_overloaded_unification): Robustify. Return a
5204 (type_unification_real): Adjust accordingly.
5206 2007-07-06 Richard Guenther <rguenther@suse.de>
5208 * init.c (build_new_1): Use the correct pointer type.
5209 * typeck2.c (build_m_component_ref): Likewise.
5211 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5214 * init.c (build_zero_init): Always build an initializer for
5216 * typeck2.c (build_functional_cast): Use build_zero_init.
5219 * init.c (build_new_1): Always pass the allocation function to
5220 build_op_delete_call.
5221 * call.c (build_op_delete_call): Handle operator delete with a
5222 variable-argument list. Do not issue an error when no matching
5223 deallocation function is available for a new operator.
5226 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5227 * decl.c (value_dependent_init_p): New function.
5228 (cp_finish_decl): Use it.
5229 * pt.c (value_dependent_expression_p): Use
5230 any_value_dependent_elements_p.
5231 * parser.c (cp_parser_primary_expression): Add comment about
5232 treating dependent qualified names as integral
5233 constant-expressions.
5235 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5237 * decl.c (build_ptrmemfunc_type): Always use structural equality
5238 tests when comparing pointer-to-member-function types, because the
5239 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5242 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5244 * init.c (build_new): Tweak comment.
5246 2007-06-29 Dave Brolley <brolley@redhat.com>
5249 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5250 type to its base type and number of elements here.
5251 * init.c (build_new): Call complete_type_or_else to ensure that the
5252 type is complete and to issue a diagnostic if it is not.
5253 (build_new_1): Don't call complete_type_or_else here.
5255 2007-07-03 Richard Guenther <rguenther@suse.de>
5258 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5261 2007-07-02 Simon Baldwin <simonb@google.com>
5263 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5264 for inner-style nested forward declarations that don't declare
5267 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5270 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5271 DECL_P in not a variable and appears more than once error messages.
5273 2007-07-01 Ollie Wild <aaw@google.com>
5275 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5276 (select_decl): Remove function.
5277 (unqualified_namespace_lookup): Populate binding by calling
5278 ambiguous_decl. Remove select_decl call.
5279 (lookup_qualified_name): Remove select_decl call.
5280 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5281 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5282 generation when name lookup is ambiguous.
5284 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5287 * init.c (build_new_1): Use structural equality on the copy of the
5290 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5292 * decl2.c (determine_visibility): Implement
5293 flag_visibility_ms_compat effect on type info.
5294 * decl.c (cxx_init_decl_processing): Implement
5295 global effect of flag_visibility_ms_compat.
5297 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5299 * decl2.c (start_objects): Mark constructor-running function
5302 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5305 * decl.c (grokdeclarator): Reset friendp for member functions declared
5306 friend of their own class.
5308 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5310 * decl2.c (determine_visibility): Don't look for dllexport here.
5311 (determine_visibility_from_class): Tidy.
5313 2007-06-18 Simon Baldwin <simonb@google.com>
5316 * parser.c (cp_parser_single_declaration): Added check for storage
5317 class other than sc_none in parsed declaration, and a flag to indicate
5318 if the call is part of an explicit template specialization parse.
5319 * (cp_parser_explicit_specialization): Specialization check flag added
5320 to call to cp_parser_single_declaration(), set true.
5321 * (cp_parser_template_declaration_after_export): Specialization check
5322 flag added to call to cp_parser_single_declaration(), set false.
5323 * pt.c (check_explicit_specialization): Added code to copy visiblity
5324 and linkage from the templated function to the explicit specialization.
5326 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5328 * typeck.c (build_binary_op): For templates build the
5329 expression in pieces to avoid the assert in build2_stat.
5330 (get_member_function_from_ptrfunc):
5331 Change over to using POINTER_PLUS_EXPR and convert
5332 the second operand to sizetype.
5333 * typeck2.c (build_m_component_ref): Likewise.
5334 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5335 instead of PLUS_EXPR for pointers.
5336 (build_new_1): Likewise.
5337 (build_vec_delete_1): Likewise.
5338 (build_vec_delete): Likewise.
5339 * class.c (build_base_path): Likewise.
5340 (build_base_path): Likewise.
5341 (convert_to_base_statically): Likewise.
5342 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5343 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5344 instead of PLUS_EXPR.
5345 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5346 instead of PLUS_EXPR for pointers.
5347 * call.c (build_special_member_call): Likewise.
5348 * rtti.c (build_headof): Likewise.
5349 Use sizetype instead of ptrdiff_type_node.
5350 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5351 instead of PLUS_EXPR for pointers.
5352 * except.c (expand_start_catch_block): Do a
5353 NEGATIVE and then a POINTER_PLUS_EXPR instead
5355 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5356 PLUS_EXPR on pointer types over to use
5357 POINTER_PLUS_EXPR and remove the conversion
5358 to the pointer types.
5359 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5360 adding to a pointer type. Use size_int instead of
5361 ssize_int. Convert the index to sizetype before
5362 adding it to the pointer.
5364 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5366 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5367 (DECL_ANON_UNION_VAR_P): New macro.
5368 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5369 than DECL_VAR_MARKED_P, to keep track of which variables we have
5371 * decl.c (redeclaration_error_message): Complain about redeclaring
5372 anonymous union members at namespace scope.
5373 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5375 2007-06-14 Geoff Keating <geoffk@apple.com>
5377 * decl2.c (determine_visibility): Ensure that functions with
5378 hidden types as parameters are hidden.
5381 * decl2.c (determine_visibility): Remove duplicate code for
5384 2007-06-12 Ian Lance Taylor <iant@google.com>
5387 * init.c (avoid_placement_new_aliasing): New static function.
5388 (build_new_1): Call it.
5390 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5392 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5393 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5395 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5398 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5399 on init, the non-decl cond operand and increment value.
5401 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5404 * decl.c (check_initializer): Report an error when a brace enclosed
5405 initializer is used for a non-aggregate type in C++98.
5406 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5408 (grokdeclarator): Likewise.
5409 (move_fn_p): Likewise.
5410 * typeck.c (check_return_expr): Likewise.
5411 * call.c (reference_binding): Likewise.
5412 * error.c (cp_cpp_error): Likewise.
5413 * pt.c (check_default_tmpl_args): Likewise.
5415 * lex.c (init_reswords): Likewise.
5416 * parser.c (p_parser_primary_expression): Likewise.
5417 (TOKEN_PRECEDENCE): Likewise.
5418 (cp_parser_init_declarator): Likewise.
5419 (cp_parser_ptr_operator): Likewise.
5420 (cp_parser_parameter_declaration): Likewise.
5421 (cp_parser_enclosed_template_argument_list): Likewise.
5422 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5423 (cp_parser_next_token_ends_template_argument_p): Likewise.
5425 2007-06-04 Simon Baldwin <simonb@google.com>
5427 * decl.c (grokdeclarator): Readability change. Moved case labels
5428 into direct switch statement scope.
5430 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5432 * call.c (convert_like_real): Remove pointless code.
5434 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5436 * decl.c (get_atexit_fn_ptr_type): New function.
5437 (get_atexit_node): Use it.
5438 (start_cleanup_fn): Likewise.
5439 (register_dtor_fn): Use the object's destructor, instead of a
5440 separate cleanup function, where possible.
5441 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5442 (atexit_fn_ptr_type_node): New macro.
5443 * decl2.c (build_cleanup): Use build_address.
5445 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5447 * typeck.c (build_binary_op): Include types in error.
5449 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5452 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5453 needs runtime initialization.
5455 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5458 * semantics.c (finish_trait_expr): Complete the types.
5460 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5461 Douglas Gregor <doug.gregor@gmail.com>
5462 Pedro Lamarao <pedro.lamarao@mndfck.org>
5463 Howard Hinnant <howard.hinnant@gmail.com>
5467 * typeck.c (comptypes): Don't consider rvalue and lvalue
5468 reference types to be equivalent.
5469 (check_return_expr): Move from certain lvalues when returning
5471 * decl.c (grokdeclarator): Implement reference collapsing.
5472 (copy_fn_p): Don't consider constructors taking rvalue references
5473 to be copy constructors.
5475 * call.c (conversion): New "rvaluedness_matches_p" member.
5476 (convert_class_to_reference): Require reference type as first
5477 parameter instead of base type.
5478 (reference_binding): Add logic to handle rvalue references.
5479 (implicit_conversion): Update inaccurate comment.
5480 (convert_like_real): Disable creation of temporaries that are
5481 impossible to initialize for types with move constructors.
5482 (build_over_call): Elide move constructors when possible.
5483 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5484 (maybe_handle_ref_bind): Return conversion instead of type node.
5485 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5486 determine preferred conversion sequences.
5487 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5488 (LOOKUP_PREFER_RVALUE): New.
5489 (DECL_MOVE_CONSTRUCTOR_P): New.
5490 (struct cp_declarator): Add "reference" member for reference
5491 types, with new "rvalue_ref" flag.
5492 (cp_build_reference_type): Declare.
5493 (move_fn_p): Declare.
5494 * error.c (dump_type_prefix): Format rvalue reference types
5495 correctly in error messages.
5496 * except.c (build_throw): Move from certain lvalues when
5498 * mangle.c (write_type): Mangle rvalue references differently
5499 than regular references.
5500 * parser.c (make_reference_declarator): Add boolean parameter for
5502 (cp_parser_make_indirect_declarator): New.
5503 (cp_parser_new_declarator_opt): Call
5504 cp_parser_make_indirect_declarator.
5505 (cp_parser_conversion_declarator_opt): Ditto.
5506 (cp_parser_declarator): Ditto.
5507 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5509 * pt.c (tsubst): Implement reference collapsing.
5510 (maybe_adjust_types_for_deduction): Implement special template
5511 parameter deduction rule for rvalue references.
5512 (type_unification_real): Update calls to
5513 maybe_adjust_types_for_deduction.
5514 (try_one_overload): Ditto.
5515 (unify_pack_expansion): Ditto.
5516 * tree.c (lvalue_p_1): Handle rvalue reference types.
5517 (cp_build_reference_type): New.
5519 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5522 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5523 variables that need runtime initialization.
5525 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5528 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5529 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5530 case POSTDECREMENT_EXPR>): Return the error_mark_node
5531 if either the real or imaginary parts would an
5534 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5535 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5538 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5539 token is a closing brace, false if there are no tokens left.
5540 (cp_parser_namespace_alias_definition): Only consume the next token if
5541 it is a closing brace.
5543 * parser.c (cp_parser_class_specifier): Likewise.
5545 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5547 * semantics.c (finish_member_declaration): Fix a typo in the
5550 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5562 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5563 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5564 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5565 whether everything was okay. Fix indentation.
5566 (push_template_decl_real): Check for bare parameter packs in
5567 function parameters; where errors occur, mark the parameter types
5568 with ERROR_MARK_NODEs to avert ICEs.
5569 (coerce_template_parameter_pack): New.
5570 (coerce_template_parms): Moved parameter pack coercion into
5571 coerce_template_parameter_pack, and permit it anywhere in the
5572 template parameter list (not just at the end). Parameter and
5573 argument indices can vary (somewhat) separately now, so add
5574 PARM_IDX and ARG_IDX.
5575 (fn_type_unification): Don't set an argument pack as incomplete if
5576 no argument pack was deduced.
5577 (type_unification_real): If a type parameter is a parameter pack
5578 and has not otherwise been deduced, it will be deduced to an empty
5580 (more_specialized_fn): Use the actual lengths of the argument
5581 lists when comparing against expansions.
5582 * semantics.c (finish_member_declaration): If a field's type has
5583 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5585 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5588 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5590 2007-05-22 Ollie Wild <aaw@google.com>
5592 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5593 (unqualified_namespace_lookup): Adds check for hidden types.
5595 2007-05-22 Ollie Wild <aaw@google.com>
5597 * decl.c (duplicate_decls): Verify namespace names are unique.
5599 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5601 * decl.c (cxx_maybe_build_cleanup): Handle
5602 __attribute__((cleanup)).
5604 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5606 * cvt.c (cp_convert_and_check): Don't check warnings if the
5609 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5611 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5613 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5616 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5617 type only if is a class type (5.2.8/4).
5619 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5621 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5622 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5623 c_common_unsigned_type.
5625 2007-05-11 Silvius Rus <rus@google.com>
5627 * typeck.c (build_indirect_ref): Add call to
5628 strict_aliasing_warning.
5629 (build_reinterpret_cast_1): Condition call to
5630 strict_aliasing_warning.
5632 2007-05-11 Jan Hubicka <jh@suse.cz>
5634 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5635 * decl2.c (start_objects): ctors and dtors are no longer public.
5636 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5638 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5640 * typeck.c (build_unary_op): Remove code that used to
5641 handle non lvalue increments/decrements.
5643 2007-05-07 Mike Stump <mrs@apple.com>
5645 * parser.c (check_empty_body): Add.
5646 (cp_parser_iteration_statement): Add call to check_empty_body.
5648 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5651 * mangle.c (write_mangled_name): Mangle static variable names.
5652 (write_unqualified_name): Use local-source-name for
5653 namespace-scope static variables.
5655 2007-05-04 Dirk Mueller <dmueller@suse.de>
5657 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5660 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5663 * decl2.c (constrain_class_visibility):
5664 Use strip_pointer_or_array_types instead of strip_array_types.
5666 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5669 * decl.c (reshape_init_r): Don't reshape the first element if it
5670 is a pointer to member function.
5672 2007-04-27 Simon Baldwin <simonb@google.com>
5674 * decl.c (grokparms): Changed message format from %qD to %qE.
5676 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5678 * error.c (maybe_warn_variadic_templates): Variadic templates are
5679 now in C++0x, so only warn about them in C++98 mode.
5681 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5684 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5685 integeral types from vectors types.
5687 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5690 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5691 for type dependent OMP_CLAUSE_DECLs.
5693 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5696 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5697 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5698 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5699 * init.c (build_zero_init): Adjust, as
5700 COMPLEX_TYPE is now a SCALAR_TYPE.
5701 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5702 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5704 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5706 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5707 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5708 (trait_expr_value): Adjust.
5710 2007-04-23 Simon Baldwin <simonb@google.com>
5712 * decl.c (grokparms): Added new error for duplicate function
5713 parameters names in function prototypes, to match gcc behavior.
5715 2007-04-23 Jan Hubicka <jh@suse.cz>
5717 * decl2.c (finish_objects): Do not call target constructor/destructor
5720 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5722 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5723 instead of checking GIMPLE_STMT_P in chain_next.
5725 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5728 * call.c (convert_for_arg_passing): Convert bitfields to their
5731 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5734 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5736 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5739 * decl2.c (constrain_class_visibility):
5740 Do not warn about the use of anonymous namespace in the main input file.
5742 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5744 * cp-tree.h (current_template_parms): Fix typo in comment.
5746 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5748 * cp-tree.h, error.c: Fix comment typos.
5750 2007-04-13 Jason Merrill <jason@redhat.com>
5753 * call.c (reference_binding): Add c_cast_p parm. If true,
5754 add quals to TO as needed to make it reference-compatible.
5756 2007-04-11 Jan Hubicka <jh@suse.cz>
5758 * class.c (convert_to_base_statically): Fold produced tree; verify
5759 that we are not processing template_decl.
5761 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5764 * class.c (build_base_path): Ensure that the converted pointer has
5765 the same cv-qualification as the input.
5767 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5769 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5771 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5773 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5775 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5776 * tree.c (cp_add_pending_fn_decls): Remove.
5777 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5779 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5781 Revert change removing staticp.
5783 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5785 * cp-objcp-common.c (cxx_staticp): Remove.
5786 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5787 * cp-tree.h (cxx_staticp):
5789 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5791 * class.c (check_for_override): Don't remove dllmport attribute
5794 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5797 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5798 type issue error and return early.
5800 2007-03-30 Jason Merrill <jason@redhat.com>
5803 * typeck.c (cp_type_readonly): New fn.
5804 * cp-tree.h: Declare it.
5805 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5806 (cp_finish_decl): Not here.
5808 2007-03-31 Richard Guenther <rguenther@suse.de>
5810 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5813 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5818 * parser.c (declarator_can_be_parameter_pack): New.
5819 (cp_parser_template_parameter): Only parse the `...' if the
5820 declarator can be a parameter pack.
5821 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5823 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5824 types (they could be used as array bounds).
5825 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5826 (tsubst_pack_expansion): Handle failure to expand parameter
5829 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5832 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5833 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5834 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5835 (CLASS_TYPE_NON_UNION_P): Add.
5836 (struct lang_type_class): Add has_complex_dflt.
5837 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5838 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5839 * cp-tree.def: Add TRAIT_EXPR.
5840 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5841 * lex.c (struct resword): Add __has_nothrow_assign,
5842 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5843 __has_trivial_constructor, __has_trivial_copy,
5844 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5845 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5846 __is_pod, __is_polymorphic, __is_union.
5847 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5848 (cp_parser_trait_expr): New.
5849 * semantics.c (finish_trait_expr, trait_expr_value
5850 classtype_has_nothrow_copy_or_assign_p): New.
5851 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5853 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5854 * class.c (check_bases, check_field_decl, check_bases_and_members):
5855 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5856 * pt.c (uses_template_parms, tsubst_copy_and_build,
5857 value_dependent_expression_p, type_dependent_expression_p): Deal with
5859 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5861 2007-03-29 Richard Guenther <rguenther@suse.de>
5863 * tree.c (cp_walk_subtrees): Do not set input_location.
5865 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5868 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5871 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5873 * parser.c (struct cp_parser): Update comment for
5874 greater_than_is_operator_p.
5875 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5876 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5877 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5878 !GREATER_THAN_IS_OPERATOR_P.
5879 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5880 `>>' operators that will become two `>' tokens in C++0x.
5881 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5882 mode, allowing it to terminate default arguments.
5883 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5884 `>>' like two consecutive `>' tokens.
5885 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5886 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5887 ends a template argument.
5889 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5891 * decl.c (redeclaration_error_message): Complain when redeclaring
5892 a friend function with default template arguments (C++0x mode only).
5893 * cp-tree.h (check_default_tmpl_args): Declare.
5894 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5895 template arguments in function templates. Add support for checking
5896 the default template arguments of friend templates.
5897 (push_template_decl_real): Fix call to check_default_tmpl_args.
5898 (type_unification_real): If a template parameter has not been
5899 deduced but provides a default template argument, substitute into
5900 that default template argument.
5901 * parser.c (cp_parser_init_declarator): When declaring (but not
5902 defining!) a function template in C++0x mode, check for default
5905 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5908 * decl.c (grokdeclarator): Deal with cv-qualified function type
5909 typedefs in the same way for member and non-member functions.
5911 2007-03-26 Dirk Mueller <dmueller@suse.de>
5913 * parser.c (cp_parser_member_declaration): Pedwarn
5914 about stray semicolons after member declarations.
5916 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5919 * pt.c (instantiate_decl): Set in_system_header.
5921 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5923 * cp-tree.h (current_tempalte_parms): Improve documentation.
5924 * pt.c (current_template_args): Likewise.
5927 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5928 not consume tokens when failing.
5930 2007-03-22 Jim Wilson <wilson@specifix.com>
5931 Mark Mitchell <mark@codesourcery.com>
5934 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5935 consistent with FROM.
5937 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5939 * error.c (dump_expr): Handle dependent names that designate types.
5940 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5942 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5944 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5946 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5948 * cvt.c (cp_convert_and_check) : Define.
5949 * cp-tree.h (cp_convert_and_check): Declare.
5950 * call.c (convert_conversion_warnings): Rename to
5951 conversion_null_warnings. The warning for floating-point to
5952 integer is handled by convert_and_check in convert_like_real.
5953 (convert_like_real): convert_conversion_warnings was renamed as
5954 conversion_null_warnings.
5955 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5956 overflow and changes of value during conversion.
5958 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5961 * parser.c (cp_parser_statement): If 'namespace' is found, this
5962 only can be a namespace alias definition, so parse it now.
5963 (cp_parser_namespace_alias_definition): if we find an open brace
5964 instead of '=', then this is actually a misplaced namespace
5967 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5970 * decl.c (cxx_init_decl_processing): Move command-line options
5971 processing to c-opts.c.
5973 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5975 * ptree.c (cxx_print_type): Use formatting markup for integers
5976 when printing template parameter index/level/orig level.
5977 (cxx_print_xnode): Ditto.
5978 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5979 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5980 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5982 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5983 rather than a HOST_WIDE_INT.
5984 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5985 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5987 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5988 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5989 IN_BASE_INITIALIZER bool bitfields.
5990 (struct cp_declarator): Make KIND a 4-bit field. Make
5991 PARAMETER_PACK_P a bool bitfield just after KIND.
5992 * pt.c (uses_parameter_packs): Destroy the pointer set.
5993 (make_pack_expansion): Ditto.
5994 (check_for_bare_parameter_packs): Ditto.
5995 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5997 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
6000 * call.c (convert_default_arg): Instead of copying the node,
6003 2007-03-15 Dirk Mueller <dmueller@suse.de>
6006 * call.c (convert_conversion_warnings): New..
6007 (convert_like_real): .. factored out from here.
6008 (convert_conversion_warnings): Add warning about
6009 false being converted to NULL in argument passing.
6011 2007-03-14 Dirk Mueller <dmueller@suse.de>
6013 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6014 (finish_do_body): Warn about empty body in do/while statement.
6016 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6018 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6020 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6023 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6026 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
6028 * repo.c (init_repo): Initialize random_seed saved options.
6029 (finish_repo): Adjust.
6031 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6034 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6037 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6039 * decl.c (compute_array_index_type): New warning flag warn_vla.
6041 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6044 * call.c (convert_default_arg): Copy non-constant arguments.
6046 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6049 * parser.c (cp_parser_postfix_expression): Disallow compound
6050 literals in constant expressions.
6053 * semantics.c (finish_typeof): Use unlowered_expr_type.
6055 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6058 * cp-tree.h (unlowered_expr_type): New function.
6059 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6060 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6061 (unlowered_expr_type): New function.
6062 (build_unary_op): Disallow predecrements of bool bitfields.
6063 * call.c (build_conditional_expr): Use unlowered_expr_type.
6064 * pt.c (type_unification_real): Likewise.
6066 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6069 * typeck.c (check_return_expr): Check for bare parameter packs.
6070 (comptypes): Compare template parameter packs and
6071 type pack expansions.
6072 * decl.c (grokdeclarator): Deal with the declaration of function
6074 (grokparms): Verify that the (optional) function parameter pack is
6075 at the end of the parameter list.
6076 (xref_basetypes): Handle pack expansions in the base class.
6077 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6078 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6079 (NONTYPE_ARGUMENT_PACK): New.
6080 (TYPE_PACK_EXPANSION): New.
6081 (EXPR_PACK_EXPANSION): New.
6082 (ARGUMENT_PACK_SELECT): New.
6083 * cp-objcp-common.c (cp_tree_size): Compute size of
6084 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6085 ARGUMENT_PACK_SELECT.
6086 * error.c (dump_template_argument): Print template argument packs.
6087 (dump_template_argument_list): Ditto.
6088 (dump_template_parameter): Dump `...' for template type parameter
6090 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6091 (dump_parameters): Print function parameter packs.
6092 (dump_template_parms): Print template argument packs.
6093 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6094 (maybe_warn_variadic_templates): New.
6095 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6096 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6097 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6099 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6100 (write_template_arg): Write argument packs as separate arguments.
6101 * cp-tree.h (struct template_parm_index_s): Add flag that
6102 indicates that the template parameter is actually a parameter
6104 (struct tree_argument_pack_select): New.
6105 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6106 (union lang_tree_node): Add argument_pack_select.
6107 (FUNCTION_PARAMETER_PACK_P): New.
6108 (PACK_EXPANSION_P): New.
6109 (PACK_EXPANSION_PATTERN): New.
6110 (SET_PACK_EXPANSION_PATTERN): New.
6111 (PACK_EXPANSION_PARAMETER_PACKS): New.
6112 (ARGUMENT_PACK_P): New.
6113 (ARGUMENT_PACK_ARGS): New.
6114 (SET_ARGUMENT_PACK_ARGS): New.
6115 (ARGUMENT_PACK_INCOMPLETE_P): New.
6116 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6117 (TEMPLATE_PARM_PARAMETER_PACK): New.
6118 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6119 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6120 (ARGUMENT_PACK_SELECT_INDEX): New.
6121 (ARGUMENT_PACK_SELECT_ARG): New.
6122 (struct cp_declarator): Add parameter_pack_p flag.
6123 (maybe_warn_variadic_templates): Declare.
6124 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6125 indicate a template parameter pack.
6126 (uses_parameter_packs): Declare.
6127 (template_parameter_pack_p): Declare.
6128 (template_parms_variadic_p): Declare.
6129 (make_pack_expansion): Declare.
6130 (check_for_bare_parameter_packs): Declare.
6131 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6132 sizeof... expressions.
6133 (pp_cxx_expression): Print pack expansions and non-type argument
6135 (pp_cxx_exception_specification): Print pack expansions.
6136 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6137 (pp_cxx_ctor_initializer): Print pack expansions.
6138 (pp_cxx_type_id): Print pack expansions.
6139 (pp_cxx_template_argument_list): Print argument packs.
6140 (pp_cxx_template_parameter): Print ellipsis for template parameter
6142 * pt.c (comp_template_parms): Compare template parameter packs.
6143 (template_parameter_pack_p): New.
6144 (template_parms_variadic_p): New.
6145 (template_args_variadic_p): New.
6146 (make_ith_pack_parameter_name): New.
6147 (struct find_parameter_pack_data): New.
6148 (find_parameter_packs_r): New.
6149 (uses_parameter_packs): New.
6150 (make_pack_expansion): New.
6151 (check_for_bare_parameter_packs): New.
6152 (expand_template_argument_pack): New.
6153 (reduce_template_parm_level): Propagate parameter pack flag.
6154 (process_template_parm): Add is_parameter_pack parameter to state
6155 when the parameter is actually a parameter pack. Create template
6156 parameter packs when is_parameter_pack is true.
6157 (current_template_args): The argument for a template parameter
6158 pack is an argument pack containing a single pack expansion.
6159 (process_partial_specialization): When checking that non-type
6160 argument expressions do not involve template parameters, loop over
6161 the arguments in argument packs separately.
6162 (push_template_decl_real): Check that the type of the declaration
6163 does not have any bare parameter packs. Check that primary
6164 templates have no more than one parameter pack, and that it comes
6165 at the end of the template parameter list.
6166 (convert_template_argument): Handle coercions for pack expansion
6167 expressions by coercing the pattern then rebuilding the expansion.
6168 (coerce_template_parms): When coercing the arguments for a
6169 variadic template, pack "extra" arguments into an argument pack.
6170 (coerce_template_template_parms): Cannot coerce between parameter
6171 packs and non-pack parameters.
6172 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6173 (comp_template_args): Expand all template arguments packs before
6174 comparing template argument lists.
6175 (mangle_class_name_for_template): Make argument packs as separate
6177 (for_each_template_parm_r): No need to handle BASELINK.
6178 (instantiate_class_template): Handle pack expansions in the base
6180 (tsubst_pack_expansion): New.
6181 (tsubst_template_args): Handle substitutions of argument packs and
6182 pack expansion into template argument lists.
6183 (tsubst_decl): Expand function parameter packs into separate
6184 function parameters.
6185 (tsubst_arg_types): Expand a type pack expansion into separate
6187 (tsubst_exception_specification): Handle pack expansions in
6188 exception specifiers.
6189 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6190 replacing a template parameter with its argument. If we encounter
6191 a substitution for an argument pack, just return the parameter
6193 (tsubst_copy): sizeof(X...) returns the number of elements in
6194 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6195 PARM_DECL is a parameter pack.
6196 (tsubst_expr): Expression pack expansions and argument packs
6197 cannot show up here; they will all be handled through function
6198 calls, sizeof, and template argument lists.
6199 (tsubst_copy_and_build): sizeof(X...) returns the number of
6200 elements in parameter pack X. Handle pack expansions in TREE_LIST
6201 and CONSTRUCTOR nodes.
6202 (fn_type_unification): Handle "incomplete" explicit template
6203 argument lists that specify some of the arguments for a template
6205 (type_unification_real): Unify arguments against pack expansions.
6206 (template_parm_level_and_index): New, helper function.
6207 (unify_pack_expansion): New.
6208 (unify): Unify argument packs on an argument-by-argument basis,
6209 handling variadic argument packs as well.
6210 (more_specialized_fn): Handle unification of function parameter
6211 packs. All things being equal, prefer non-variadic function
6212 templates to variadic function templates.
6213 (more_specialized_class): Prefer the variadic class template
6214 partial specialization that binds fewer arguments to a parameter
6216 (regenerate_decl_from_template): Expand function parameter packs
6217 into separate parameters.
6218 (instantiate_decl): Ditto.
6219 (tsubst_initializer_list): Handle pack expansions for base-class
6221 (dependent_type_p_r): Determine dependent types in argument packs
6222 and pack expansions.
6223 (value_dependent_expression_p): Determine value-dependence of
6224 non-type argument packs.
6225 (dependent_template_arg_p): Handle argument packs.
6226 * semantics.c (finish_cond): Check for bare parameter packs.
6227 (finish_expr_stmt): Ditto.
6228 (finish_for_expr): Ditto.
6229 (finish_switch_cond): Ditto.
6230 (finish_mem_initializers): Ditto.
6231 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6233 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6234 * parser.c (make_declarator): Declarator is not an expansion.
6235 (make_pointer_declarator): Transfer parameter pack flag to outer
6237 (make_reference_declarator): Ditto.
6238 (make_ptrmem_declarator): Ditto.
6239 (make_call_declarator): Ditto.
6240 (make_array_declarator): Ditto.
6241 (cp_parser_postfix_expression): Allow pack expansion expressions
6242 in the argument list for a call expression.
6243 (cp_parser_parenthesized_expression_list): Add new parameter
6244 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6245 into separate arguments."
6246 (cp_parser_new_placement): Allow pack expansion expressions.
6247 (cp_parser_new_initializer): Ditto.
6248 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6249 base-class initializer expansion.
6250 (cp_parser_mem_initializer): Ditto.
6251 (cp_parser_template_parameter_list): Keep track of whether the
6252 template parameter is a template parameter pack.
6253 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6254 template parameter pack.
6255 (cp_parser_type_parameter): Ditto.
6256 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6258 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6259 this declarator is a parameter pack.
6260 (cp_parser_parameter_declaration): The ellipsis does not end the
6261 parameter declaration, because it might be a parameter pack. Parse
6262 the ellipsis to indicate a parameter pack.
6263 (cp_parser_initializer): Allow pack expansions.
6264 (cp_parser_initializer_list): Allow ellipsis to create an
6265 initializer expansion.
6266 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6268 (cp_parser_type_id_list): Allow ellipsis to create an exception
6269 specifier expansion.
6270 (cp_parser_attribute_list): Don't allow pack expansions.
6271 (cp_parser_functional_cast): Allow pack expansions.
6272 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6273 compute the length of a parameter pack.
6274 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6275 end a template argument.
6276 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6277 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6280 2007-03-09 Dirk Mueller <dmueller@suse.de>
6282 * call.c (build_new_op): Call warn_logical_operator.
6284 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6287 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6290 * pt.c (any_template_arguments_need_structural_equality_p):
6293 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6295 * decl.c (grokdeclarator): Disable warnings for anonymous
6298 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6300 * typeck2.c (readonly_error): Always emit a hard error.
6301 Remove last argument.
6302 * cp-tree.h (readonly_error): Adjust prototype.
6303 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6304 * typeck.c (build_unary_op): Likewise.
6305 (build_modify_expr): Likewise.
6307 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6310 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6312 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6315 * parser.c (struct cp_parser): New IN_IF_STMT.
6316 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6317 returning if parsing the body of an 'if' statement or issuing an
6318 error and continuing.
6319 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6321 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6323 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6326 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6329 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6331 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6332 Objective-C++. Don't exit early if -shared-libgcc needs to be
6335 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6337 * typeck.c (common_base_type): Delete unused function.
6339 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6341 * Make-lang.in: Add dummy lang.install-pdf target.
6343 2007-03-01 Simon Baldwin <simonb@google.com>
6346 * decl.c (check_tag_decl): Added new warning for typedef ignored
6347 when it precedes an otherwise valid non-typedef declaration.
6349 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6351 * typeck.c (build_function_call): Store converted arguments
6352 in a stack-allocated array instead of building a list.
6353 (convert_arguments): Store arguments in the array passed in as an
6354 argument, and return the actual number of arguments.
6355 * call.c (build_call): Delete, and replace with...
6356 (build_call_n, build_call_a): New.
6357 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6358 (build_over_call): Store converted arguments in a stack-allocated
6359 array instead of building a list.
6360 (build_cxx_call): Pass arguments in an array instead of as a list.
6361 (build_java_interface_fn_ref): Rewrite to avoid constructing
6363 * tree.h: Update declarations to reflect above changes.
6364 * method.c (use_thunk): Use a stack-allocated array to hold
6365 the arguments instead of a list.
6366 * rtti.c (throw_bad_cast): Update call to cxx_call.
6367 (throw_bad_typeid): Likewise.
6368 (build_dynamic_cast_1): Likewise.
6369 * init.c (build_builtin_delete_call): Use build_call_n.
6370 * decl.c (expand_static_init): Likewise.
6371 * except.c (cp_protect_cleanup_actions): Likewise.
6372 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6373 (gimplify_must_not_throw_expr): Likewise.
6374 (cxx_omp_apply_fn): Use build_call_a.
6376 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6378 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6379 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6381 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6383 * cp-tree.h (static_ctors): Remove.
6384 * cp-tree.h (static_dtors): Likewise.
6385 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6386 refactoring of tree_map hierarchy.
6387 (decl_shadowed_for_var_insert): Likewise.
6388 * semantics.c (expand_body): Use c_expand_body.
6389 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6390 * decl2.c (static_ctors): Remove.
6391 (static_dtors): Likewise.
6392 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6393 objc_generate_static_init_call. Do not call static_[cd]tors.
6394 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6396 (cp_write_global_declarations): Likewise.
6398 2007-02-23 Richard Guenther <rguenther@suse.de>
6400 * class.c (note_name_declared_in_class): Make declaration
6401 changes meaning a pedwarn.
6403 2007-02-22 Michael Matz <matz@suse.de>
6406 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6407 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6408 dump_function_decl): Guard emitting outer scopes by new flag.
6409 * cp-lang.c (cxx_dwarf_name): New function.
6410 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6411 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6413 (push_template_decl_real, lookup_template_class): Remove calls
6416 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6418 * call.c (build_new_method_call): Ensure that explicit calls of
6419 destructors have type "void".
6421 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6423 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6424 and -Walways-true with -Waddress.
6425 * cvt.c (convert_to_void): Replace unconditional warning with
6428 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6430 * decl.c, tree.c: Fix comment typos.
6432 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6435 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6436 statement expression if we had an error mark node.
6438 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6439 Brooks Moses <brooks.moses@codesourcery.com>
6440 Lee Millward <lee.millward@codesourcery.com>
6442 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6443 Change class to tcc_vl_exp.
6445 * call.c (build_call): Use build_call_list instead
6447 (build_over_call): Likewise.
6448 (build_new_method_call): Use build_min_non_dep_call_list
6449 instead of build_min_non_dep.
6451 * error.c (dump_call_expr_args): New function.
6452 (dump_aggr_init_expr_args): New function.
6453 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6454 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6456 * cvt.c (convert_to_void): Use build_call_array instead
6457 of build3; use new AGGR_INIT_EXPR accessor macros.
6459 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6460 instead of TREE_CODE_LENGTH.
6462 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6463 AGGR_INIT_EXPR accessor macros.
6465 * cp-gimplify.c (cp_gimplify_init_expr): Use
6466 AGGR_INIT_EXPR_SLOT to set the slot operand.
6468 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6469 (AGGR_INIT_EXPR_SLOT): New macro.
6470 (AGGR_INIT_EXPR_ARG): New macro.
6471 (aggr_init_expr_nargs): New macro.
6472 (AGGR_INIT_EXPR_ARGP): New macro.
6473 (aggr_init_expr_arg_iterator): New.
6474 (init_aggr_init_expr_arg_iterator): New.
6475 (next_aggr_init_expr_arg): New.
6476 (first_aggr_init_expr_arg): New.
6477 (more_aggr_init_expr_args_p): New.
6478 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6479 (stabilize_aggr_init): New declaration.
6480 (build_min_non_dep_call_list): Likewise.
6482 * tree.c (process_aggr_init_operands): New function.
6483 (build_aggr_init_array) New function.
6484 (build_cplus_new): Update to use new CALL_EXPR and
6485 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6486 build_aggr_init_array.
6487 (build_min_non_dep_call_list) New function.
6488 (build_min_nt): Assert input code parameter is not a variable
6489 length expression class.
6490 (build_min, build_min_non_dep): Likewise.
6491 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6492 to check for equality instead of recursing. Handle tcc_vl_exp
6494 (stabilize_call): Update to only handle CALL_EXPRs, not
6495 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6496 (stabilize_aggr_init): New function.
6497 (stabilize_init): Use it.
6499 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6500 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6501 AGGR_INIT_EXPR accessor macros and argument iterators.
6503 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6504 build_vl_exp. Iterate through the operands, recursively
6505 processing each one.
6506 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6507 CALL_EXPR accessor macros.
6508 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6509 tree code classes. Use TREE_OPERAND_LENGTH instead of
6512 * semantics.c (finish_call_expr): Use build_nt_call_list
6513 instead of build_nt.
6514 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6515 accessor macros. Use build_call_array to construct the
6516 CALL_EXPR node instead of build3
6518 * decl2.c (build_offset_ref_call_from_tree): Use
6519 build_nt_call_list and build_min_non_dep_call_list instead
6520 of build_min_nt and build_min_non_dep.
6522 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6523 Use build_nt_call_list instead of build_min_nt.
6525 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6528 * call.c (build_conditional_expr): Improve error message.
6530 2007-02-13 Dirk Mueller <dmueller@suse.de>
6532 * friend.c (do_friend): Annotate warning about friend
6533 declarations in templates with OPT_Wnon_template_friend.
6534 Convert informal message from warning() to inform().
6536 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6537 Mark Mitchell <mark@codesourcery.com>
6540 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6541 instantiations for variables.
6543 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6546 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6547 Check warn_unused_value just once.
6549 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6552 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6553 (fn_type_unificiation): Likewise.
6554 (get_bindings): Likewise.
6556 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6559 * decl.c (finish_function): Use DECL_REPLACEABLE.
6560 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6562 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6564 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6566 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6568 * decl.c (grokvardecl): Don't error if !have_tls.
6569 (grokdeclarator): Likewise.
6570 * parser.c (cp_parser_omp_threadprivate): Likewise.
6572 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6575 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6576 parameters and result decls in omp clauses.
6577 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6580 2007-02-05 Dirk Mueller <dmueller@suse.de>
6583 * parser.c (cp_parser_class_specifier): Always initialize bases.
6585 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6587 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6588 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6589 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6591 * semantics.c (finish_omp_atomic): Store a whole expression node
6592 in operand 1, and integer_zero_node in operand 0, for dependent
6593 OMP_ATOMIC. Rewrite to make flow easier to understand.
6595 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6597 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6599 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6601 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6602 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6604 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6606 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6607 keyword warning to -Wc++0x-compat.
6609 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6611 * decl.c (grokdeclarator): Update documentation.
6613 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6616 * decl.c (grokdeclarator): If __thread is used together with
6617 a storage class other than extern and static, clear thread_p
6618 after issuing diagnostics and fall through to checking the
6621 2007-01-30 Roger Sayle <roger@eyesopen.com>
6623 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6624 calculating the size of an array (to avoid recursive errors).
6626 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6629 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6631 * call.c (convert_like_real): Don't warn when converting to
6634 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6636 * decl.c (pop_label): Replace warning with call to
6637 warn_for_unused_label.
6639 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6642 * semantics.c (finish_pseudo_destructor_expr): Check the
6643 destrutor name by calling check_dtor_name.
6645 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6647 * lex.c (D_CPP0X): Rename.
6649 (reswords): D_CPP0X -> D_CXX0X.
6650 (init_reswords): Ditto.
6651 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6652 of C++0x keywords as identifiers.
6654 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6657 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6660 2007-01-23 Ian Lance Taylor <iant@google.com>
6662 * typeck.c (convert_for_assignment): Only warn about a = b = c
6663 when converting to bool.
6665 2007-01-23 Roger Sayle <roger@eyesopen.com>
6667 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6669 * typeck.c (ignore_overflows): Remove the remaining uses of
6670 TREE_CONSTANT_OVERFLOW.
6672 2007-01-20 Jan Hubicka <jh@suse.cz>
6674 * decl2.c (start_objects, start_static_storage_duration_function):
6675 Do not make the functions uninlinable.
6677 2007-01-17 Ian Lance Taylor <iant@google.com>
6679 * class.c (add_method): Call VEC_reserve_exact rather than passing
6680 a negative size to VEC_reserve.
6682 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6685 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6687 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6690 * decl.c (make_typename_type): If the qualified name is not a
6691 type, issue an error.
6692 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6695 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6697 * rtti.c: Include target.h.
6698 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6699 don't emit typeinfo for fundamental types as weak.
6700 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6702 2007-01-08 Richard Guenther <rguenther@suse.de>
6704 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6706 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6708 * call.c (standard_conversion): Pass flag to
6709 vector_types_convertible_p to disallow emission of note.
6710 * typeck.c (convert_for_assignment): Pass flag to
6711 vector_types_convertible_p to allow emission of note.
6712 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6713 to disallow emission of note.
6715 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6718 * typeck.c (build_binary_op): Call overflow_warning if
6719 TREE_OVERFLOW_P is true for the result and not for any of the
6722 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6725 * class.c (add_method): Don't wait until template
6726 instantiation time to complain about duplicate methods.
6728 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6731 * semantics.c (finish_unary_op_expr): Warn only if result
6732 overflowed and operands did not.
6734 2007-01-05 Ian Lance Taylor <iant@google.com>
6736 * typeck.c (build_binary_op): Warn about comparing a non-weak
6739 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6741 * pt.c (tsubst): Propagate the need for structural equality checks
6742 when reducing the level of template parameters.
6744 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6746 * pt.c: Fix a comment typo.
6748 2007-01-02 Ian Lance Taylor <iant@google.com>
6750 * semantics.c (maybe_convert_cond): Optionally warn when using an
6751 assignment as a condition.
6752 * typeck.c (convert_for_assignment): Optionally warn about
6753 assigning the result of an assignment to a bool.
6755 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6757 * pt.c (canonical_template_parms): Correct typo in comment.
6759 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6761 * typeck.c (structural_comptypes): Renamed from "comptypes".
6762 (comptypes): Use canonical type information to perform fast type
6763 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6764 canonical type comparison returns the same results as we would see
6765 from the current, structural check. Support COMPARE_STRUCTURAL
6766 when we need structural checks.
6767 * decl.c (typename_compare): Fix comment.
6768 (build_typename_type): TYPENAME_TYPE nodes require structural
6769 equality checks, because they resolve different based on the
6771 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6772 require structural equality checks (for now).
6773 (build_ptrmemfunc_type): Build the canonical pointer to member
6775 (compute_array_index_type): Whenever we build a new index type
6776 to represent the size of an array in a template, we need to mark
6777 this index type as requiring structural equality. This goes for
6778 arrays with value-dependent sizes with the current ABI, or all
6780 * tree.c (cplus_array_hash): New.
6781 (struct cplus_array_info): New.
6782 (cplus_array_compare): New.
6783 (cplus_array_htab): New.
6784 (build_cplus_array_type_1): Use a hash table to cache the array
6785 types we build. Build the canonical array type for each array
6787 (cp_build_qualified_type_real): When building a cv-qualified array
6788 type, use the hash table of array types and build canonical array
6790 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6791 use structural equality (for now).
6792 * cp-tree.h (COMPARE_STRUCTURAL): New.
6793 * pt.c (canonical_template_parms): New.
6794 (canonical_type_parameter): New.
6795 (process_template_parm): Find the canonical type parameter.
6796 (lookup_template_class): When we have named the primary template
6797 type, set the canonical type for our template class to the primary
6798 template type. If any of the template arguments need structural
6799 equality checks, the template class needs structural equality
6801 (tsubst): When reducing the level of a template template
6802 parameter, we require structural equality tests for the resulting
6803 parameter because its template parameters have not had their types
6804 canonicalized. When reducing a template type parameter, find the
6805 canonical reduced type parameter.
6806 (any_template_arguments_need_structural_equality_p): New.