1 2009-01-09 John F. Carr <jfc@mit.edu>
4 * parser.c (cp_parser_class_specifier): Clear
5 parser->in_unbraced_linkage_specification_p while parsing class
8 2009-01-07 Jakub Jelinek <jakub@redhat.com>
11 * semantics.c (finish_goto_stmt): Convert destination to
14 2009-01-06 Jason Merrill <jason@redhat.com>
21 * pt.c (check_default_tmpl_args): Don't complain about
22 out-of-order parameter packs in the enclosing class
23 or parameter packs after default args.
24 (coerce_template_parms): If we have more than one
25 parameter pack, don't flatten argument packs.
26 (template_args_equal): Handle argument packs.
27 (comp_template_args): Don't flatten argument packs.
28 (check_instantiated_arg): Split out from...
29 (check_instantiated_args): Here. Handle arg packs.
30 (convert_template_argument): Just check that nontype argument
31 packs have the right type.
33 2009-01-05 Dodji Seketeli <dodji@redhat.com>
36 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
38 2009-01-05 Jason Merrill <jason@redhat.com>
41 * typeck2.c (process_init_constructor_union): Handle union with
44 * mangle.c (write_expression): Remove mangling for zero-operand
48 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
52 * class.c (defaultable_fn_p): Only operator== can be a copy
55 2009-01-02 Jason Merrill <jason@redhat.com>
58 * typeck2.c (process_init_constructor_union): Handle excess
60 (process_init_constructor_record): Likewise.
63 * typeck2.c (digest_init_r): Don't use process_init_constructor
64 for non-aggregate classes.
66 2008-12-31 Jakub Jelinek <jakub@redhat.com>
69 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
70 Return error_mark_node if cp_parser_non_integral_constant_expression
74 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
76 2008-12-29 Jakub Jelinek <jakub@redhat.com>
79 * parser.c (cp_parser_condition): Use cp_parser_require
80 instead of cp_lexer_consume_token to consume =.
83 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
85 2008-12-28 Jakub Jelinek <jakub@redhat.com>
88 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
89 around volatile iteration var in condition and/or increment
92 2008-12-27 Jakub Jelinek <jakub@redhat.com>
95 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
98 2008-12-21 Jason Merrill <jason@redhat.com>
101 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
103 2008-12-20 Jakub Jelinek <jakub@redhat.com>
104 Manuel López-Ibáñez <manu@gcc.gnu.org>
107 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
108 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
111 2008-12-19 Jakub Jelinek <jakub@redhat.com>
114 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
117 2008-12-18 Jakub Jelinek <jakub@redhat.com>
120 * init.c (perform_member_init): For value-initialized
121 references call permerror instead of warning and don't emit any
124 2008-12-18 Jason Merrill <jason@redhat.com>
127 * parser.c (cp_parser_token_starts_cast_expression): An EOF
128 can't start a cast-expression.
130 2008-12-17 Jason Merrill <jason@redhat.com>
132 * semantics.c (describable_type): New function.
133 (finish_decltype_type): Use it for dependent exprs.
134 * cp-tree.h: Declare it.
135 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
136 (write_expression): If skip_evaluation, use type stubs.
137 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
138 declarations of a function.
139 * init.c (build_new): Do auto deduction if type is describable.
140 * decl.c (cp_finish_decl): Likewise.
141 * parser.c (cp_parser_omp_for_loop): Likewise.
143 2008-12-10 Jason Merrill <jason@redhat.com>
146 * mangle.c (write_builtin_type): Add mangling for decimal floating
147 point and fixed point types.
148 (write_type): Pass FIXED_POINT_TYPE along.
150 2008-12-09 Mark Mitchell <mark@codesourcery.com>
153 * class.c (resolve_address_of_overloaded_function): Check
154 accessibility of member functions unless FLAGS indicates
156 * call.c (standard_conversion): Adjust flags passed to
158 (convert_default_arg): Do not perform access checks.
159 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
161 2008-12-08 Steve Ellcey <sje@cup.hp.com>
163 * decl2.c (mark_used): Remove assemble_external call.
165 2008-12-08 Dodji Seketeli <dodji@redhat.com>
168 * name-lookup.c (kept_level_p): Don't forget the case of levels
169 having using directives.
171 2008-12-08 Richard Henderson <rth@redhat.com>
174 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
175 * decl.c (record_unknown_type): Likewise.
176 (start_enum, finish_enum): Likewise.
178 2008-12-05 Jakub Jelinek <jakub@redhat.com>
181 * error.c (dump_expr): Handle BIT_FIELD_REF.
183 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
186 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
189 2008-12-04 Jason Merrill <jason@redhat.com>
192 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
194 * class.c (check_bases_and_members): Rather than assuming any
195 user-declared default constructor is complex here.
197 2008-12-04 Richard Guenther <rguenther@suse.de>
200 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
201 pointer access with TREE_NO_WARNING.
203 2008-12-03 Jason Merrill <jason@redhat.com>
206 * init.c (build_value_init): Do initial zero-initialization
207 of a class with an implicitly-defined constructor using
208 build_zero_init rather than in build_value_init.
209 (build_value_init_1): Fold into build_value_init.
212 * parser.c (cp_parser_conversion_type_id): Diagnose
213 'operator auto' here.
214 * decl.c (grokdeclarator): Not here.
217 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
218 on explicit constructors.
219 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
220 CONSTRUCTOR_IS_DIRECT_INIT.
222 2008-12-02 Jason Merrill <jason@redhat.com>
224 PR c++/35782, c++/37860
225 * call.c (build_user_type_conversion_1): Remember
227 (convert_like_real): Likewise.
228 (build_over_call): Don't require the copy constructor
229 for copy-list-initialization.
230 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
233 * decl.c (cp_finish_decl): Handle =default and =delete for
236 2008-12-01 Jakub Jelinek <jakub@redhat.com>
239 * parser.c (cp_parser_omp_for_loop): Handle auto.
240 * pt.c (tsubst_omp_for_iterator): Likewise.
242 2008-11-28 Jason Merrill <jason@redhat.com>
245 * init.c (perform_member_init): Fix value-initialization.
246 (build_value_init_1): Add assert to catch cases that will break
248 (build_default_init): Remove.
249 * cp-tree.h: Remove its prototype.
250 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
251 value-initialization.
254 * parser.c (cp_parser_class_name): Only call
255 maybe_note_name_used_in_class if we actually found a class name.
257 2008-11-25 Jason Merrill <jason@redhat.com>
260 * decl2.c (check_classfn): Error rather than abort on parameter
263 2008-11-20 Jason Merrill <jason@redhat.com>
266 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
269 * call.c (build_over_call): Take the address of the function even
271 (build_new_method_call): Remember the type of the called function
274 2008-11-19 Dodji Seketeli <dodji@redhat.com>
277 * pt.c (coerce_template_template_parm): Use the more robust
278 uses_template_parms instead of dependent_type_p.
280 2008-11-19 Dodji Seketeli <dodji@redhat.com>
283 * pt.c (lookup_template_class): Check pointers before dereferencing
285 * error.c (dump_template_decl): Likewise.
287 2008-11-19 Jason Merrill <jason@redhat.com>
290 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
291 that names a class for linkage purposes.
294 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
295 name is not a declaration.
298 * pt.c (instantiate_decl): Don't require a definition of
299 a template that is explicitly instantiated 'extern'.
301 2008-11-18 Jason Merrill <jason@redhat.com>
302 Jakub Jelinek <jakub@redhat.com>
305 * parser.c (cp_parser_type_id): Complain about auto.
306 * decl.c (grokdeclarator): Complain about parameters and
307 conversion functions declared with auto.
309 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
311 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
313 2008-11-17 Jakub Jelinek <jakub@redhat.com>
316 * init.c (constant_value_1): Handle TREE_LIST init.
318 2008-11-15 Jakub Jelinek <jakub@redhat.com>
321 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
322 argtype instead of result_type.
324 2008-11-14 Jason Merrill <jason@redhat.com>
327 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
328 for a non-dependent call.
331 * call.c (build_aggr_conv): Increment i.
333 2008-11-13 Jason Merrill <jason@redhat.com>
336 * typeck2.c (process_init_constructor_record): Update bitfield
338 (check_narrowing): Update bitfield handling, print source type.
340 2008-11-12 Jakub Jelinek <jakub@redhat.com>
344 2007-05-07 Mike Stump <mrs@apple.com>
345 * parser.c (check_empty_body): Add.
346 (cp_parser_iteration_statement): Add call to check_empty_body.
348 2008-11-12 Jason Merrill <jason@redhat.com>
351 * typeck.c (cp_build_modify_expr): Update bitfield handling.
353 2008-11-12 Jakub Jelinek <jakub@redhat.com>
356 * parser.c (cp_parser_simple_declaration): Don't commit
357 to tentative parse if parse errors were seen.
360 * error.c (dump_expr): Handle COMPLEX_EXPR.
362 2008-11-10 Jakub Jelinek <jakub@redhat.com>
365 * parser.c (cp_parser_enum_specifier): After parsing :,
366 parse definitely. Don't return early if type specifier
369 2008-11-06 David Edelsohn <edelsohn@gnu.org>
372 * g++spec.c (LIBSTDCXX_STATIC): New.
373 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
376 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
379 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
382 2008-11-05 Richard Guenther <rguenther@suse.de>
385 * decl.c (start_preparsed_function): Use the correct type for
386 building the RESULT_DECL.
388 2008-10-31 Jakub Jelinek <jakub@redhat.com>
391 * decl.c (grokdeclarator): Diagnose auto function decl without
392 late return type and late return type function decl where type
396 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
399 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
402 * class.c (check_bitfield_decl): Rename min_precision to
403 tree_int_cst_min_precision.
404 * decl.c (finish_enum): Likewise.
406 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
409 * parser.c (cp_parser_token_starts_cast_expression): New.
410 (cp_parser_cast_expression): Peek the next token to decide whether
411 this could be a parenthesized constructor or is definitely an
414 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
417 * typeck.c (build_x_binary_op): Update call to
418 warn_about_parentheses.
419 * parser.c (cp_parser_binary_expression): Add note about passing
420 the correct code for unary expressions.
422 2008-10-24 Jakub Jelinek <jakub@redhat.com>
424 * Make-lang.in (check-c++-subtargets): New alias for
425 check-g++-subtargets.
426 (lang_checks_parallelized): Add check-g++.
427 (check_g++_parallelize): New variable.
429 2008-10-21 Richard Guenther <rguenther@suse.de>
431 * semantics.c (simplify_aggr_init_exprs_r): Remove.
432 (expand_or_defer_fn): Do not walk the function body to
433 simplify aggr_init_exprs.
435 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
438 * typeck.c (cp_common_type): New. The same as
439 type_after_usual_arithmetic_conversions but without promotions.
440 (type_after_usual_arithmetic_conversions): Do the promotions and
442 (common_type): Make it behave like the C version of this
443 function. Do not handle pointer types.
444 (common_pointer_type): Move handling of pointer types from
446 (cp_build_binary_op): Use common_pointer_type instead of
447 common_type in call to pointer_diff.
448 Use cp_common_type instead of common_type.
449 * cp-tree.h (common_pointer_type): Declare.
451 2008-10-14 Jakub Jelinek <jakub@redhat.com>
454 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
455 arguments if they don't already have COND_EXPR's type.
457 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
460 * pt.c (push_template_decl_real): Check that current_template_parms
462 (process_partial_specialization): Assert current_template_parms not
465 2008-10-13 Doug Evans <dje@google.com>
467 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
469 2008-10-10 Jakub Jelinek <jakub@redhat.com>
472 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
475 2008-10-09 Jakub Jelinek <jakub@redhat.com>
478 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
479 setting it to error_mark_node.
481 2008-10-07 Steve Ellcey <sje@cup.hp.com>
483 * decl.c (start_cleanup_fn): Declare as inline.
485 2008-10-06 Jason Merrill <jason@redhat.com>
487 PR c++/37376, other mangling issues
488 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
489 (write_member_name): Break out from...
490 (write_expression): ...here. Handle dependent COMPONENT_REF.
491 (write_template_arg): Wrap an argument pack in 'I'/'E'.
492 (write_builtin_type): Update char16/32_t mangling.
493 (write_nested_name, write_prefix): Don't forget template args
495 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
498 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
500 * typeck.c (build_x_indirect_ref): Add location argument.
501 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
502 (cp_build_unary_op): Add location argument.
503 (cp_build_modify_expr): Same.
504 * class.c (build_base_path): Pass location to build_indirect_ref.
505 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
508 2008-10-05 Dodji Seketeli <dodji@redhat.com>
511 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
512 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
513 of the innermost containing BLOCK.
515 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
518 * error.c (dump_function_decl): Save the exceptions in case of
519 error about incompatible specifications in a specialization.
521 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
523 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
525 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
528 * parser.c (cp_parser_selection_statement): Fix uninitialized
531 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
535 * decl.c (grokdeclarator): Set the type for typedefs to a
536 nested-name-specifier to error_mark_node.
538 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
540 * parser.c (cp_parser_selection_statement): Implement here the
541 -Wempty-body warning for `if' and `else' statements.
542 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
544 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
547 * name-lookup.c (maybe_process_template_type_declaration): Check
548 return value of push_template_decl_real for error_mark_node.
550 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
552 * semantics.c (finish_fname): Pass location to fname_decl.
554 2008-09-23 Jakub Jelinek <jakub@redhat.com>
557 * semantics.c (finish_omp_for): If processing_template_decl, just build
558 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
560 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
562 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
563 (get_member_function_from_ptrfunc): Same.
564 (build_x_binary_op): Same.
565 (build_binary_op): Same.
566 (cp_build_binary_op): New location argument.
567 (pointer_diff): Pass location to cp_build_binary_op.
568 (cp_truthvalue_conversion): Pass location to build_binary_op.
569 (convert_ptrmem): Pass location to cp_build_binary_op.
570 (cp_build_modify_expr): Same.
571 (build_ptrmemfunc): Same.
572 * init.c (expand_cleanup_for_base): Pass location to
573 c_common_truthvalue_conversion.
574 (build_new_1): Pass location to cp_build_binary_op.
575 (build_vec_delete_1): Pass location to *build_binary_op,
576 c_common_truthvalue_conversion.
577 (build_vec_init): Same.
578 (build_delete): Same.
579 * decl.c (compute_array_index_type): Same.
580 * call.c (build_new_op): Same.
581 * rtti.c (build_dynamic_cast_1): Same.
582 * cp-tree.h: Add argument to cp_build_binary_op.
583 * semantics.c (handle_omp_for_class_iterator): Pass location to
584 *build_binary_op, c_common_truthvalue_conversion.
585 * decl2.c (get_guard_cond): Same.
587 2008-09-17 Richard Guenther <rguenther@suse.de>
590 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
591 result to the correct type.
593 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
596 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
597 parameter for duplicate.
599 2008-09-17 Jason Merrill <jason@redhat.com>
602 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
604 2008-09-17 Jakub Jelinek <jakub@redhat.com>
607 * typeck.c (build_array_ref): Use protected_set_expr_location instead
608 of SET_EXPR_LOCATION when ret might not be an expression.
610 2008-09-17 Jan Hubicka <jh@suse.cz>
613 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
615 2008-09-16 Jakub Jelinek <jakub@redhat.com>
618 * semantics.c (finish_compound_literal): Return error_mark_node if
622 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
625 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
627 * decl.c (duplicate_decls): Call error_at.
628 (grokfndecl): New location argument. Use location if available.
629 (grokdeclarator): Pass declarator location to grokfndecl.
630 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
631 * decl2.c (check_classfn): Use error_at.
632 * parser.c (cp_parser_init_declarator): Set function_start_locus
634 (cp_parser_member_declaration): Set id_loc for function declarators.
636 2008-09-09 Jan Hubicka <jh@suse.cz>
639 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
641 2008-09-09 Jakub Jelinek <jakub@redhat.com>
644 * tree.c (array_type_nelts_top): Add size_one_node instead of
647 2008-09-09 Jason Merrill <jason@redhat.com>
650 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
653 2008-09-09 Jakub Jelinek <jakub@redhat.com>
656 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
657 being error_operand_p. Don't clear value if it was error_mark_node.
659 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
661 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
662 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
663 * semantics.c (anon_aggr_type_p): Remove.
665 2008-09-06 Jason Merrill <jason@redhat.com>
668 * parser.c (cp_parser_parameter_declaration_list): Process the
669 PARM_DECLs as we go and push them. Return a TREE_LIST.
670 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
671 (cp_parser_direct_declarator): Create a binding level and
672 suppress deprecated warnings in the parameter list.
673 (make_call_declarator): PARMS is now a tree.
674 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
675 * decl.h (enum deprecated_states, deprecated_state): Move here.
677 (type_is_deprecated): New fn.
678 (grokparms): PARMLIST is a tree now. Warn about parms that
679 use deprecated types.
680 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
682 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
683 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
685 * name-lookup.c (pushtag): Look through function parameter scopes.
686 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
687 when we're parsing a function declarator.
689 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
692 * tree.c (cp_build_qualified_type_real): Deal with sharing of
693 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
696 2008-09-04 Ian Lance Taylor <iant@google.com>
698 * parser.c (check_no_duplicate_clause): Change code parameter to
699 enum omp_clause_code.
701 2008-09-03 Jakub Jelinek <jakub@redhat.com>
704 * decl.c (cp_finish_decl): Only set
705 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
708 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
710 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
711 deferred_mark_used_calls vector and exit early.
712 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
714 (finish_function): Set defer_mark_used_calls for the duration of the
715 function. Call mark_used on any queued decls.
717 2008-09-02 Jason Merrill <jason@redhat.com>
720 * call.c (build_over_call): Make =delete work with SFINAE.
721 * class.c (resolve_address_of_overloaded_function): Likewise.
723 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
724 threadprivate_or_deleted_p.
725 (CP_DECL_THREADPRIVATE_P): Adjust.
726 (DECL_DELETED_FN): Likewise.
727 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
728 (SD_DELETED): New macro.
729 * parser.c (cp_parser_init_declarator): Use them.
730 * decl.c (start_decl): Use them.
732 * decl2.c (mark_used): Give =deleted error even in sizeof.
734 * typeck2.c (check_narrowing): Downgrade narrowing error to
737 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
739 * typeck.c (build_array_ref): Use new location argument.
740 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
741 * call.c (build_new_op): Same.
742 * decl2.c (grok_array_decl): Same.
743 * cp-tree.h (build_array_ref): Add location argument to prototype.
745 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
747 * typeck.c (build_x_indirect_ref): Add location argument.
748 * class.c (build_base_path): Pass location to build_indirect_ref.
749 * pt.c (tsubst_copy_and_build): Pass location to
750 finish_label_address_expr.
751 * parser.c (cp_parser_unary_expression): Same.
753 2008-08-31 Jason Merrill <jason@redhat.com>
755 Implement late-specified return type using 'auto'.
756 * cp-tree.h (struct cp_declarator): Add late_return_type field to
758 * parser.c (cp_parser_late_return_type_opt): New fn.
759 (cp_parser_direct_declarator): Use it.
760 (make_call_declarator): Put it in the declarator.
761 * decl.c (grokdeclarator): Splice in late-specified return type.
762 * pt.c (splice_late_return_type): New fn.
764 2008-08-29 Michael Meissner <gnu@the-meissners.org>
766 * decl.c (builtin_function_1): Take a bool argument to decide
767 whether to use pushdecl or pushdecl_top_level.
768 (duplicate_decls): Copy function specific target and optimization
769 options on duplicate declarations.
770 (cxx_builtin_function): Update builtin_function_1 call.
771 (cxx_builtin_function_ext_scope): New function, guarantee that the
772 declaration is done at global scope.
774 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
775 macro, define builtin function hook for delayed machine specific
778 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
780 2008-08-30 Jason Merrill <jason@redhat.com>
783 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
785 2008-08-29 Jason Merrill <jason@redhat.com>
787 Implement C++0x 'auto' semantics.
788 * decl.c (start_decl_1): Don't complain about auto being incomplete.
789 (cp_finish_decl): Deduce auto.
790 * init.c (build_new): Handle 'new auto'.
791 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
792 message for auto than for normal template type parms.
793 * pt.c (type_dependent_expression_p): Handle { }.
794 (make_auto): New function.
795 (listify_autos): New function.
796 (do_auto_deduction): New function.
797 (is_auto): New function.
798 (type_uses_auto): New function.
799 * cp-tree.h: Declare them.
800 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
801 treat auto as a declspec.
802 (cp_parser_simple_type_specifier): It's a type-specifier.
804 2008-08-29 Mark Mitchell <mark@codesourcery.com>
806 * mangle.c (write_type): Add target-specific manglings for
807 non-fundamental types to the substitution table.
810 2008-08-29 Jakub Jelinek <jakub@redhat.com>
814 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
815 Adjust debug_hooks->imported_module_or_decl callers.
817 2008-08-29 Jan Hubicka <jh@suse.cz>
819 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
821 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
824 * decl.c (reshape_init_r): Check init for error_mark_node.
826 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
829 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
830 (finish_return_stmt): Likewise.
831 (finish_switch_condition): Likewise.
833 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
835 * cp-tree.h: Fix #error directive.
837 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
839 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
840 usual arithmetic conversions on scoped enumeration types.
841 (common_type): Ditto.
842 (default_conversion): Don't perform integral promotions on scoped
844 (build_array_ref): Scoped enumeration types can't be used as
846 * decl.c (start_enum): If building a C++0x scoped enumeration,
847 enter its scope. If provided with an underlying type, check that
848 underlying type and set up the enumeration type accordingly.
849 (finish_enum): Only compute an underlying type if the underlying
850 type isn't already fixed, and only convert the enumerator values
851 now if we've just computed the underlying type. Finish the scope
852 of C++0x scoped enumerations.
853 (build_enumerator): For enumerations with a fixed underlying type,
854 check the enumerator values when the enumerator is defined.
855 (lookup_enumerator): New.
856 * call.c (standard_conversion): Don't allow assignment from
857 integers to scoped enumeration types, even with -fpermissive.
858 Don't convert from scoped enumerations to bool or any arithmetic
860 (build_conditional_expr): Don't per the usual arithmetic
861 conversions for scoped enumeration types.
862 (convert_like_real): Check complain to see if we should
864 * error.c (class_key_or_enum_as_string): Print scoped enums.
865 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
867 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
868 (SCOPED_ENUM_P): New.
869 (UNSCOPED_ENUM_P): New.
870 (SET_SCOPED_ENUM_P): New.
871 (ENUM_UNDERLYING_TYPE): New.
872 * pt.c (lookup_template_class): Update the instantiation of enum
873 types to deal with C++0x scoped enumerations and underlying
875 * name-lookup.c (begin_scope): Deal with scoped enumeration
877 (lookup_qualified_name): Deal with lookup into enumeration types.
878 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
879 * parser.c (cp_parser_class_or_namespace_name): Rename to...
880 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
881 parse a type-name that can be an enumeration type.
882 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
883 (cp_parser_elaborated_type_specifier): Parse the
884 optional `struct' or `class' following enum (in C++0x).
885 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
888 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
890 * typeck.c: Update all calls to pedwarn.
895 * name-lookup.c: Likewise.
896 * parser.c: Likewise.
898 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
901 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
904 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
906 * parser.c: Update all calls to inform.
907 * typeck.c: Likewise.
911 * method.c: Likewise.
912 * friend.c: Likewise.
913 * typeck2.c: Likewise.
915 * name-lookup.c: Likewise.
918 2008-08-19 Jakub Jelinek <jakub@redhat.com>
921 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
923 2008-08-18 Tomas Bily <tbily@suse.cz>
925 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
927 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
929 * typeck.c: Update all callers of permerror.
934 * except.c: Likewise.
936 * typeck2.c: Likewise.
938 * semantics.c: Likewise.
939 * name-lookup.c: Likewise.
942 * parser.c: Likewise.
944 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
947 * pt.c (check_template_shadow): Change to return a bool.
948 * name-lookup.c (push_class_level_binding): Early return if
949 check_template_shadow returns false.
950 * cp-tree.h (check_template_shadow): Adjust declaration.
952 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
955 * decl.c (grokdeclarator): In case of extern and initializer, return
956 error_mark_node after the error.
958 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
961 * decl.c (grokfndecl): Call check_main_parameters_type only if
964 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
967 * parser.c (cp_parser_class_head): Early return error_mark_node in
968 case of global qualification of class name or qualified name that
969 does not name a class.
971 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
974 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
976 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
979 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
980 Delete forward declarations. Check that toplev.h has not been
981 included before this file. Include toplev.h and diagnostic.h.
982 * error.c (cp_cpp_error): Use DK_PEDWARN.
983 (cxx_incomplete_type_diagnostic): Update declaration.
984 (cxx_incomplete_type_error): Use DK_ERROR.
985 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
986 as argument. Use emit_diagnostic.
987 (cxx_incomplete_type_error): Use DK_ERROR.
988 (add_exception_specifier): Use diagnostic_t instead of custom
990 * typeck.c (complete_type_or_else): Update call to
991 cxx_incomplete_type_diagnostic.
992 * init.c (build_delete): Likewise.
993 * call.c (diagnostic_fn_t): Remove unused typedef.
994 (build_temp): Pass a pointer to diagnostic_t.
995 (convert_like_real): Use emit_diagnostic.
996 (joust): Check return value of warning before giving informative
998 * friend.c (do_friend): Check return value of warning
999 before giving informative note.
1000 * parser.c (cp_parser_template_id): Likewise.
1002 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1005 * class.c (check_bases_and_members): Warn with -Wuninitialized
1008 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1011 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1012 and make sure it is not a union.
1014 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1016 * semantics.c (finish_decltype_type): Initialize type.
1018 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1020 * semantics.c (finish_decltype_type): Handle calls to function
1021 pointers and references to functions properly.
1023 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1026 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1027 following a type-id is an error when in C++0x mode.
1029 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1032 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1034 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1037 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1039 2008-08-05 Jason Merrill <jason@redhat.com>
1042 * decl.c (build_ptrmemfunc_type): Don't require structural
1043 comparison of PMF types.
1044 * tree.c (cp_build_qualified_type_real): Don't clear
1045 a valid TYPE_PTRMEMFUNC_TYPE.
1046 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1049 2008-08-04 Jason Merrill <jason@redhat.com>
1052 * typeck2.c (check_narrowing): Allow narrowing conversion
1053 from an explicit floating-point constant.
1056 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1059 2008-08-04 Simon Baldwin <simonb@google.com>
1062 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1063 the declaration's id is followed by a semicolon.
1065 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1068 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1069 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1071 2008-07-31 Jason Merrill <jason@redhat.com>
1074 * init.c (build_new_1): Don't convert pointer to the data type
1075 until we're actually going to treat it as that type.
1078 * tree.c (build_aggr_init_expr): Split out...
1079 (build_cplus_new): ...from here.
1080 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1081 * init.c (build_new_1): new T() means value-initialization,
1082 not default-initialization.
1083 (build_vec_init): Likewise.
1084 (build_value_init_1): Use build_aggr_init_expr.
1086 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1089 * decl2.c (fix_temporary_vars_context_r): New function.
1090 (one_static_initialization_or_destruction): Make sure temporary
1091 variables part of the initialiser have their DECL_CONTEXT()
1094 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1097 * typeck.c (build_binary_op): Encapsulate code into
1100 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1103 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1104 TYPE_UID instead of pointers.
1106 2008-07-29 Jan Hubicka <jh@suse.cz>
1108 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1109 * decl.c (duplicate_decls): Likewise.
1110 (grokfndecl): Likewise.
1111 (start_method): Likewise.
1112 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1114 * pt.c (register_specialization, regenerate_decl_from_template):
1116 * decl2.c (grokfield): Likewise.
1118 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1121 * decl.c (duplicate_decls): Merge USED flags.
1123 2008-07-27 Jason Merrill <jason@redhat.com>
1126 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1128 2008-07-28 Richard Guenther <rguenther@suse.de>
1130 Merge from gimple-tuples-branch.
1132 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1134 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1137 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1139 * decl.c (finish_function): Call gimple_body after cp_genericize.
1141 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1143 * optimize.c: Include gimple.h instead of tree-gimple.h.
1144 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1145 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1148 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1150 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1152 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1154 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1156 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1158 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1160 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1161 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1162 (cxx_omp_clause_copy_ctor): Same.
1163 (cxx_omp_clause_assign_op): Same.
1165 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1167 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1168 (cp_gimplify_expr): Adjust caller.
1170 2008-05-11 Doug Kwan <dougkwan@google.com>
1172 * init.c (build_vec_delete): Add type conversion for argument
1173 0 of POINTER_PLUS_EXPR.
1175 2008-04-29 Doug Kwan <dougkwan@google.com>
1177 * decl2 (File): Include "gimple.h"
1178 (cp_write_global_declarations): Use gimple_body instead of
1180 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1182 2008-04-10 Diego Novillo <dnovillo@google.com>
1184 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1186 * optimize.c (maybe_clone_body): Re-enable call to
1188 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1189 code with call to gimple_unreachable.
1190 (cp_genericize): Fix handling of clone bodies.
1192 2008-04-04 Diego Novillo <dnovillo@google.com>
1194 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1196 * optimize.c (maybe_clone_body): Re-enable.
1198 2008-02-19 Diego Novillo <dnovillo@google.com>
1199 Oleg Ryjkov <olegr@google.com>
1201 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1203 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1204 argument to gimple_seq *. Update all users.
1205 (gimplify_must_not_throw_expr): Likewise.
1207 2008-02-04 Oleg Ryjkov <olegr@google.com>
1209 * except.c: Include gimple.h
1210 (cp_protect_cleanup_actions): Convert to tuples.
1211 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1213 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1215 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1216 instead of annotating each block manually.
1218 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1220 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1221 (gimplify_for_stmt): Same.
1222 (gimplify_switch_stmt): Same.
1223 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1225 [WHILE_STMT]: Return GS_OK.
1226 [SWITCH_STMT]: Same.
1227 [CONTINUE_STMT]: Same.
1229 (cp_genericize): Set gimple_body() of cloned functions when needed.
1231 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1233 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1234 (cp_gimplify_init_expr): Convert to tuples.
1235 (gimplify_must_not_throw_expr): Make function return a
1236 gimplify_status and convert to tuples.
1238 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1240 * cp-gimplify.c (genericize_try_block): Enable and do not call
1242 (genericize_catch_block): Same.
1243 (genericize_eh_spec_block): Same.
1244 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1245 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1247 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1249 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1250 * decl.c (finish_function): Use gimple_body instead of
1252 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1253 * cp-gimplify.c (genericize_try_block): Comment out.
1254 (genericize_catch_block): Same.
1255 (genericize_eh_spec_block): Same.
1256 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1257 (gimplify_for_stmt): Comment out.
1258 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1259 (cp_gimplify_omp_for): Same.
1260 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1261 Comment out call to gimplify_stmt and append_to_statement_list.
1262 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1263 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1264 (cp_gimplify_expr): Same.
1265 Comment out calls to genericize_*_block. Comment out call to
1268 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1271 * class.c (type_has_user_provided_default_constructor): Handle
1274 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1276 * decl.c (push_library_fn): Add a parameter for the exceptions that
1277 the function may throw.
1278 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1280 (build_library_fn): Change to static.
1281 * cp-tree.h: Adjust declarations.
1282 * except.c (declare_nothrow_library_fn): New.
1283 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1284 do_allocate_exception): Use the latter, adjust the declarations
1285 (ie, add empty exception-specification), consistently with the
1286 actual implementation in libsupc++.
1288 2008-07-25 Jan Hubicka <jh@suse.cz>
1290 * typeck.c (inline_conversion): Remove.
1291 (cp_build_function_call): Do not use inline_conversion.
1292 * decl.c (duplicate_decls): Do not insist on inline being declared
1294 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1295 from being output. We now remove static functions always.
1296 (finish_function): Do return warning on all static functions.
1297 * call.c (build_over_call): Do not use inline_conversion.
1298 * cp-tree.h (possibly_inlined_p): Declare.
1299 (inline_conversion): Remove.
1300 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1301 * decl2.c (cp_write_global_declarations): Likewise.
1302 (mark_used): Likewise.
1303 (possibly_inlined_p): New functions.
1305 2008-07-25 Jason Merrill <jason@redhat.com>
1307 * class.c (type_has_user_provided_default_constructor): Handle
1310 2008-07-23 Jan Hubicka <jh@suse.cz>
1312 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1313 (grogfndecl): Drop flag_inline_trees code.
1314 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1315 * lex.c (cxx_init): Do not set unit-at-a-time.
1317 2008-07-23 Jason Merrill <jason@redhat.com>
1319 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1320 trying to mangle a decl with no name.
1322 Implement defaulted/deleted functions as per N2346
1323 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1324 (DECL_DELETED_FN): New macro.
1325 (DECL_DEFAULTED_FN): New macro.
1326 * class.c (user_provided_p): New fn.
1327 (defaultable_fn_p): New fn.
1328 (type_has_user_provided_constructor): New fn.
1329 (type_has_user_provided_default_constructor): New fn.
1330 (check_methods): A defaulted fn is still trivial.
1331 (check_bases_and_members): Likewise.
1332 * decl.c (grok_special_member_properties): Likewise.
1333 (duplicate_decls): Complain about redeclaring a function as deleted.
1334 (start_decl): initialized==2 means deleted.
1335 (cp_finish_decl): Handle deleted/defaulted semantics.
1336 * decl2.c (grokfield): Likewise.
1337 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1338 Complain about using a deleted fn.
1339 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1340 (perform_member_init): Check for a user-provided default constructor
1341 even if TYPE_NEEDS_CONSTRUCTING.
1342 (build_new_1): Likewise.
1343 * call.c (build_over_call): Don't call mark_used twice.
1344 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1345 * search.c (check_final_overrider): Check for deleted mismatch.
1346 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1347 (cp_parser_pure_specifier): Handle =default and =delete.
1349 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1351 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1354 * typeck.c: All calls to pedwarn changed.
1355 * decl.c: All calls to pedwarn changed.
1356 * call.c: All calls to pedwarn changed.
1357 * error.c: All calls to pedwarn changed.
1358 * typeck2.c: All calls to pedwarn changed.
1359 * pt.c: All calls to pedwarn changed.
1360 * name-lookup.c: All calls to pedwarn changed.
1361 * parser.c: All calls to pedwarn changed.
1363 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1365 * call.c: Fix comment typos.
1366 * class.c: Likewise.
1367 * cp-tree.h: Likewise.
1368 * cxx-pretty-print.c: Likewise.
1371 * name-lookup.c: Likewise.
1372 * operators.def: Likewise.
1373 * parser.c: Likewise.
1376 * typeck.c: Likewise.
1378 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1382 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1383 copy constructors and copy assignment operators proper.
1385 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1387 * parser.c (cp_token): Remove in_system_header.
1388 (eof_token): Remove in_system_header.
1389 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1390 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1391 (cp_parser_member_declaration): Use in_system_header_at.
1392 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1393 (pop_tinst_level): Don't set in_system_header.
1394 (instantiate_class_template): Don't set in_system_header.
1395 (instantiate_decl): Don't set in_system_header.
1396 (instantiate_pending_templates): Don't set in_system_header.
1398 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1401 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1402 TYPE_NOTHROW_P, not TREE_NOTHROW.
1403 (trait_expr_value): Likewise.
1405 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1408 * call.c (convert_like_real): Don't take the error code path
1409 when a rvalue or base conversion has the bad_p field set.
1411 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1413 * rtti.c (emit_support_tinfos): Add char16_type_node and
1415 * typeck2.c (digest_init): Support char16_t and char32_t.
1417 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1419 * cvt.c (convert_to_void): Avoid C++ keywords.
1420 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1422 * friend.c (is_friend): Likewise.
1423 * init.c (perform_member_init): Likewise.
1424 * mangle.c (write_template_prefix, write_template_template_param):
1426 * name-lookup.c (do_namespace_alias, do_using_directive,
1427 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1428 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1429 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1431 * pt.c (is_specialization_of_friend, lookup_template_class,
1432 push_tinst_level, instantiate_class_template,
1433 tsubst_copy_and_build): Likewise.
1434 * tree.c (add_stmt_to_compound): Likewise.
1435 * typeck.c (finish_class_member_access_expr): Likewise.
1437 2008-07-17 Julian Brown <julian@codesourcery.com>
1438 Mark Mitchell <mark@codesourcery.com>
1440 * decl2.c (determine_visibility): Allow target to override
1441 visibility of class data.
1443 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1446 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1447 semantics to the current WP (N2691).
1449 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1452 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1453 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1454 complies with exception specification constraints.
1456 2008-07-14 Jason Merrill <jason@redhat.com>
1458 * lex.c (init_reswords): Always set D_OBJC.
1460 2008-07-11 Tom Tromey <tromey@redhat.com>
1461 Ian Lance Taylor <iant@google.com>
1463 * lex.c (struct resword, reswords): Don't define.
1464 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1465 (init_reswords): Clarify mask code. Use c_common_reswords rather
1468 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1471 * decl.c (grokdeclarator): Warn about initializing variables
1472 of storage class 'extern' only after the type of the declarator
1473 has been properly computed.
1475 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1478 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1479 carries the location of the primary type.
1480 * parser.c (cp_parser_check_type_definition): Update documentation.
1481 (cp_parser_check_for_definition_in_return_type,
1482 cp_parser_check_for_invalid_template_id,
1483 cp_parser_set_decl_spec_type,
1484 cp_parser_check_for_definition_in_return_type,
1485 cp_parser_diagnose_invalid_type_name,
1486 cp_parser_new_expression, cp_parser_explicit_instantiation,
1487 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1488 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1491 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1495 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1496 Add a location_t parameter so that
1497 error message can have a more accurate location.
1498 * cp-tree.h: Updated prototype
1499 * pt.c (tsubst_qualified_id): Use location in error messages.
1500 * parser.c (cp_parser_postfix_expression,
1501 cp_parser_objc_statement, cp_parser_trait_expr,
1502 cp_parser_token_is_class_key,
1503 cp_parser_uncommitted_to_tentative_parse_p,
1504 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1505 cp_parser_error, cp_parser_name_lookup_error,
1506 cp_parser_simulate_error, cp_parser_check_decl_spec,
1507 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1508 cp_parser_diagnose_invalid_type_name,
1509 cp_parser_parse_and_diagnose_invalid_type_name,
1510 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1511 cp_parser_string_literal, cp_parser_primary_expression,
1512 cp_parser_primary_expression, cp_parser_unqualified_id,
1513 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1514 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1515 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1516 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1517 cp_parser_jump_statement, cp_parser_block_declaration,
1518 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1519 cp_parser_function_specifier_opt, cp_parser_decltype,
1520 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1521 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1522 cp_parser_type_parameter, cp_parser_template_id,
1523 cp_parser_template_name, cp_parser_template_argument): Likewise.
1525 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1528 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1529 on function return type.
1531 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1534 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1535 on function return type in case of system header.
1537 2008-07-09 Raksit Ashok <raksit@google.com>
1539 * parser.c (cp_parser_postfix_expression): New warning based on flag
1540 warn_disallowed_functions.
1542 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1545 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1546 functions declared with a storage class qualifier.
1548 2008-07-03 Richard Guenther <rguenther@suse.de>
1551 * typeck.c (cp_build_function_call): Move code to verify
1552 builtin function arguments ...
1553 * call.c (build_cxx_call): ... here.
1555 2008-07-02 Jason Merrill <jason@redhat.com>
1557 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1559 Implement WG21 N2672, Initializer List proposed wording
1560 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1561 (struct lang_type_class): Add has_list_ctor bitfield.
1562 (TYPE_HAS_LIST_CTOR): New macro.
1563 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1564 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1565 (LOOKUP_NO_NARROWING): New macro.
1566 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1567 * parser.c (cp_parse_braced_list): Split out from...
1568 (cp_parser_initializer_clause): ...here.
1569 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1571 (cp_lexer_next_token_is_not_keyword): New fn.
1572 (cp_parser_parenthesized_expression_list): Handle { }.
1573 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1574 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1575 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1576 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1577 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1578 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1579 (cp_parser_save_member_function_body): Likewise.
1580 * call.c (conversion_kind): Add ck_list, ck_aggr.
1581 (struct conversion): Add check_narrowing bitfield, conversion list.
1582 (build_list_conv): New fn.
1583 (build_aggr_conv): New fn.
1584 (implicit_conversion): Call them.
1585 (standard_conversion): Set check_narrowing if appropriate.
1586 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1587 (build_user_type_conversion_1): When converting from an init list,
1588 we allow additional conversions except when calling a copy ctor.
1589 (convert_like_real): Calling an explicit ctor for an init list is
1590 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1591 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1592 class doesn't have a list ctor, break the {} into a TREE_LIST.
1593 (compare_ics): ck_list is better than other UDCs.
1594 (set_up_extended_ref_temp): Split out from initialize_reference.
1595 (is_std_init_list): New fn.
1596 (is_list_ctor): New fn.
1597 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1598 (reshape_init_array_1): Pass it to build_constructor.
1599 (reshape_init_class): Ditto.
1600 (initialize_artificial_var): Pass the appropriate type.
1601 (build_aggr_init_full_exprs): Split out from...
1602 (check_initializer): ...here. Handle new semantics.
1603 (build_init_list_var_init): New subroutine of check_initializer.
1604 (grokdeclarator): Converting constructors can have more than one parm.
1605 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1606 * init.c (expand_default_init): Only do digest_init for aggregates.
1607 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1608 build_constructor_from_list.
1609 (generic_initializer, ptr_initializer): Ditto.
1610 (ptm_initializer, class_initializer): Ditto.
1611 (get_pseudo_ti_init): Ditto.
1612 * error.c (dump_type): Handle init_list_type_node.
1613 (maybe_warn_cpp0x): New fn.
1614 (maybe_varn_variadic_templates): Call it.
1615 * cvt.c (ocp_convert): Handle conversion from { }.
1616 * tree.c (build_array_of_n_type): New fn.
1617 * typeck2.c (store_init_value): Use init_list_type_node.
1618 (digest_init): Likewise.
1619 (check_narrowing): New fn.
1620 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1621 of vector of constructor elts. Handle non-aggregate types. Make
1622 constant literals static.
1623 * pt.c: (tsubst_copy_and_build): Adjust.
1624 (unify): Handle { }.
1625 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1627 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1629 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1630 (comp_ptr_ttypes_const): Likewise.
1632 2008-07-01 Andrew Haley <aph@redhat.com>
1634 * decl.c (finish_constructor_body): Don't set the return value of
1635 the constructor if the constructor is that of a Java type.
1637 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1640 * decl2.c (is_late_template_attribute): If the first attribute
1641 argument is IDENTIFIER_NODE, don't consider it when checking
1642 if arguments are value or type dependent.
1644 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1647 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1650 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1652 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1654 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1657 * repo.c (repo_emit_p): Put const static data members initialized
1658 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1661 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1664 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1667 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1670 * typeck.c (cp_build_function_call): Show example syntax in
1673 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1675 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1676 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1677 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1678 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1679 pedwarn to permerror.
1680 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1681 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1682 * identify_goto, check_previous_goto_1, check_goto, define_label,
1683 check_tag_decl, start_decl, check_class_member_definition_namespace,
1684 grokfndecl, grokdeclarator): Likewise.
1685 * except.c (check_handlers): Likewise.
1686 * typeck2.c (digest_init): Likewise.
1687 * pt.c (check_specialization_namespace,
1688 check_explicit_instantiation_namespace,
1689 maybe_process_partial_specialization, check_explicit_specialization,
1690 convert_template_argument, do_decl_instantiation,
1691 do_type_instantiation, instantiate_decl): Likewise.
1692 * semantics.c (finish_template_type_parm): Likewise.
1693 * name-lookup.c (pushdecl_maybe_friend,
1694 check_for_out_of_scope_variable): Likewise.
1695 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1696 coerce_new_type): Likewise.
1697 * parser.c (cp_parser_nested_name_specifier_opt,
1698 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1699 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1700 (cp_parser_parameter_declaration): Check flag_permissive instead of
1701 flag_pedantic_errors.
1702 * call.c (joust): Change pedwarn to warning.
1703 * friend.c (make_friend_class): Likewise.
1705 2008-06-16 Jan Hubicka <jh@suse.cz>
1707 * method.c: Include cgraph.h.
1708 (use_thunk): Use cgraph_add_new_function instead of calling backend
1711 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1713 * parser.c: Fix comment typo.
1715 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1718 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1719 grokdeclarator and apply it to the created declaration.
1720 * cp-tree.h (grokbitfield): Update prototype.
1721 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1722 since they are now applied in grokbitfield. Adjusted the call to
1724 (cp_parser_objc_class_ivars): Likewise.
1726 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1729 * class.c (type_requires_array_cookie): Do not consider delete[]
1730 operators with an ellipsis as second argument.
1732 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1735 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1738 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1741 * pt.c (maybe_process_partial_specialization): Check the tree
1742 returned by push_template_decl for error_mark_node.
1743 * parser.c (cp_parser_class_head): Likewise, check the tree
1744 returned by the latter.
1746 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1749 * decl.c (grokdeclarator): In case of wrong return type return
1750 immediately error_mark_node.
1752 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1754 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1755 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1756 finish_omp_taskwait): New prototypes.
1757 (cxx_omp_clause_default_ctor): Add outer argument.
1758 (finish_omp_for): Add new clauses argument.
1759 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1760 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1761 (cxx_omp_clause_default_ctor): Add outer argument.
1762 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1763 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1764 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1765 Add par_clauses argument. If decl is present in parallel's
1766 lastprivate clause, change that clause to shared and add
1767 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1768 Fix wording of error messages. Adjust finish_omp_for caller.
1769 Add clauses argument. Parse loops with random access iterators.
1770 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1772 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1773 cp_parser_omp_for_loop callers.
1774 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1776 (cp_parser_omp_clause_name): Handle collapse and untied
1778 (cp_parser_omp_clause_schedule): Handle auto schedule.
1779 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1780 and PRAGMA_OMP_CLAUSE_UNTIED.
1781 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1782 (OMP_TASK_CLAUSE_MASK): Define.
1783 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1784 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1785 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1786 PRAGMA_OMP_TASKWAIT.
1787 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1788 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1789 (tsubst_omp_for_iterator): New function.
1790 (dependent_omp_for_p): New function.
1791 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1792 loops. Adjust finish_omp_for caller. Handle loops with random
1793 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1794 (tsubst_expr): Handle OMP_TASK.
1795 * semantics.c (cxx_omp_create_clause_info): New function.
1796 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1797 OMP_CLAUSE_COLLAPSE.
1798 (cxx_omp_predetermined_sharing): Removed.
1799 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1800 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1801 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1802 clauses argument. Fix check for type dependent cond or incr.
1803 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1804 fold_convert to convert incr amount to difference_type. Only
1805 fold if not in template. If decl is mentioned in lastprivate
1806 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1807 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1809 (finish_omp_threadprivate): Allow static class members of the
1811 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1812 finish_omp_taskwait): New functions.
1814 * parser.c (cp_parser_binary_expression): Add prec argument.
1815 (cp_parser_assignment_expression): Adjust caller.
1816 * cp-tree.h (outer_curly_brace_block): New prototype.
1817 * decl.c (outer_curly_brace_block): No longer static.
1819 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1822 * pt.c (push_template_decl_real): Consistently return error_mark_node
1825 2008-06-02 Tomas Bily <tbily@suse.cz>
1827 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1828 (cp_build_unary_op): Likewise.
1829 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1830 (maybe_warn_about_returning_address_of_local): Likewise.
1832 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1835 * pt.c (tsubst_initializer_list): Consistently check the tree
1836 returned by tsubst_pack_expansion for error_mark_node.
1838 2008-05-27 Michael Matz <matz@suse.de>
1841 * call.c (build_new_op): Make warning conditional on
1844 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1847 * call.c (convert_like_real): Convert bitfield to desired type
1848 before creating temporary.
1850 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1852 * Makefile.in: Adjusted dependencies on c-incpath.o.
1854 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1857 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1858 fold_build_cleanup_point_expr on build_call_a results.
1861 * semantics.c (omp_clause_info_fndecl): New function.
1862 (finish_omp_clauses): Use it.
1864 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1867 * cp-tree.h (check_array_initializer): New prototype.
1868 * decl.c (check_array_initializer): New function.
1869 (check_initializer): Call it.
1870 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1872 2008-05-21 Tom Tromey <tromey@redhat.com>
1874 * mangle.c (save_partially_mangled_name): Remove.
1875 (restore_partially_mangled_name): Likewise.
1876 (write_encoding): Update.
1877 (write_unqualified_name): Likewise.
1878 (start_mangling): Always use name_obstack. Remove 'ident_p'
1880 (get_identifier_nocopy): Remove.
1881 (finish_mangling_internal): Rename from finish_mangling.
1882 (finish_mangling): New function.
1883 (finish_mangling_get_identifier): Likewise.
1884 (partially_mangled_name, partially_mangled_name_len): Remove.
1885 (mangle_decl_string): Change return type. Update.
1886 (mangle_decl, mangle_type_string, mangle_special_for_type,
1887 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1888 mangle_ref_init_variable): Update.
1890 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1893 * semantics.c (begin_class_definition): Extend checks on the first
1896 2008-05-12 Tomas Bily <tbily@suse.cz>
1898 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1899 * call.c (build_over_call): Likewise.
1900 * error.c (dump_expr): Use CASE_CONVERT.
1901 * class.c (fixed_type_or_null): Likewise.
1903 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1905 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1907 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1910 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1912 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1913 DECL_LOOPING_CONST_OR_PURE_P attributes.
1914 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1917 2008-05-02 Simon Baldwin <simonb@google.com>
1920 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1922 2008-05-01 Simon Baldwin <simonb@google.com>
1924 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1926 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1929 * pt.c (more_specialized_fn): Stop the loop even if there are no
1930 arguments before ellipsis.
1932 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1935 * parser.c (cp_parser_lookup_name): Look through single function
1939 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1940 COMPOUND_EXPR if the second argument would be error_mark_node.
1942 2008-04-28 Jason Merrill <jason@redhat.com>
1943 Liu Guanwei <liu_gw@163.com>
1946 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1947 in default arguments.
1949 2008-04-25 Jan Hubicka <jh@suse.cz>
1951 * typeck.c (check_return_expr): Update.
1952 * decl.c (start_preparsed_function): Update.
1953 * method.c (use_thunk): Update.
1955 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1958 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1959 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1960 * decl2.c (is_late_template_attribute): Only make vector_size
1961 late tmpl attribute if argument is type or value dependent.
1962 (cp_reconstruct_complex_type): New function.
1964 2008-04-24 Richard Guenther <rguenther@suse.de>
1966 * typeck.c (cp_build_function_call): Call
1967 check_builtin_function_arguments.
1969 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1971 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1972 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1973 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1974 * class.c (build_base_path): Don't set TREE_INVARIANT.
1975 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1976 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1977 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1978 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1979 (generic_initializer): Don't set TREE_INVARIANT.
1980 (ptr_initializer): Don't set TREE_INVARIANT.
1981 (ptm_initializer): Don't set TREE_INVARIANT.
1982 (class_initializer): Don't set TREE_INVARIANT.
1983 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1984 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1985 (build_template_parm_index): Don't set TREE_INVARIANT.
1986 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1987 (process_template_parm): Don't set TREE_INVARIANT.
1989 2008-04-22 Jason Merrill <jason@redhat.com>
1992 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1993 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1994 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1996 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1999 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2000 expression is errorneous.
2002 2008-04-21 Jason Merrill <jason@redhat.com>
2005 * tree.c (cp_tree_equal): Handle FIXED_CST.
2008 * pt.c (template_template_parm_bindings_ok_p): Set
2009 processing_template_decl while in this function.
2011 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2013 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2014 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2015 char16_t and char32_t.
2016 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2017 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2018 extended builtin type "u8char{16,32}_t".
2019 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2021 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2022 (cp_parser_is_string_literal): Idem.
2023 (cp_parser_string_literal): Idem.
2024 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2026 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2027 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2028 * typeck.c (string_conv_p): Support char16_t and char32_t.
2030 2008-04-17 Jason Merrill <jason@redhat.com>
2033 * call.c (build_user_type_conversion_1): Represent second step of
2034 copy-init with an rvalue conversion.
2035 (convert_like_real) [ck_user]: Don't implicitly add it here.
2037 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2040 * decl.c (layout_var_decl): If extern or static var has variable
2041 size, set TREE_TYPE (decl) to error_mark_node.
2043 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2046 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2049 2008-04-09 Jason Merrill <jason@redhat.com>
2052 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2053 not a pushed variable.
2055 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2057 * call.c (build_op_delete_call): Fix quotation in warning message.
2058 * decl.c (grokdeclarator): Quote keyword in error message.
2059 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2062 * parser.c (cp_parser_check_type_definition): Print error string
2063 directly rather than using "%s".
2064 (cp_parser_postfix_expression): Fix quotation.
2065 (cp_parser_decltype): Likewise.
2066 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2068 * parser.c (cp_parser_non_integral_constant_expression): Build error
2069 message with CONCAT rather than using "%s".
2070 (cp_parser_primary_expression): Fix quotation.
2071 (cp_parser_postfix_expression): Likewise.
2072 (cp_parser_postfix_dot_deref_expression): Likewise.
2073 (cp_parser_unary_expression): Likewise.
2074 (cp_parser_new_expression): Likewise.
2075 (cp_parser_delete_expression): Likewise.
2077 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2078 as `)', not as `('. Fix quotation.
2079 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2080 (cp_parser_primary_expression): Likewise.
2081 (cp_parser_nested_name_specifier_opt): Likewise.
2082 (cp_parser_postfix_expression): Likewise.
2083 (cp_parser_postfix_open_square_expression): Likewise.
2084 (cp_parser_parenthesized_expression_list): Likewise.
2085 (cp_parser_pseudo_destructor_name): Likewise.
2086 (cp_parser_new_expression): Likewise.
2087 (cp_parser_direct_new_declarator): Likewise.
2088 (cp_parser_delete_expression): Likewise.
2089 (cp_parser_cast_expression): Likewise.
2090 (cp_parser_question_colon_clause): Likewise.
2091 (cp_parser_builtin_offsetof): Likewise.
2092 (cp_parser_trait_expr): Likewise.
2093 (cp_parser_label_for_labeled_statement): Likewise.
2094 (cp_parser_compound_statement): Likewise.
2095 (cp_parser_selection_statement): Likewise.
2096 (cp_parser_condition): Likewise.
2097 (cp_parser_iteration_statement): Likewise.
2098 (cp_parser_already_scoped_statement): Likewise.
2099 (cp_parser_simple_declaration): Likewise.
2100 (cp_parser_linkage_specification): Likewise.
2101 (cp_parser_static_assert): Likewise.
2102 (cp_parser_decltype): Likewise.
2103 (cp_parser_conversion_function_id): Likewise.
2104 (cp_parser_operator_function_id): Likewise.
2105 (cp_parser_operator): Likewise.
2106 (cp_parser_type_parameter): Likewise.
2107 (cp_parser_template_id): Likewise.
2108 (cp_parser_explicit_instantiation): Likewise.
2109 (cp_parser_explicit_specialization): Likewise.
2110 (cp_parser_enum_specifier): Likewise.
2111 (cp_parser_namespace_definition): Likewise.
2112 (cp_parser_namespace_alias_definition): Likewise.
2113 (cp_parser_using_declaration): Likewise.
2114 (cp_parser_using_directive): Likewise.
2115 (cp_parser_asm_definition): Likewise.
2116 (cp_parser_direct_declarator): Likewise.
2117 (cp_parser_ptr_operator): Likewise.
2118 (cp_parser_parameter_declaration_clause): Likewise.
2119 (cp_parser_initializer_clause): Likewise.
2120 (cp_parser_class_specifier): Likewise.
2121 (cp_parser_member_specification_opt): Likewise.
2122 (cp_parser_member_declaration): Likewise.
2123 (cp_parser_pure_specifier): Likewise.
2124 (cp_parser_constant_initializer): Likewise.
2125 (cp_parser_base_clause): Likewise.
2126 (cp_parser_exception_specification_opt): Likewise.
2127 (cp_parser_try_block): Likewise.
2128 (cp_parser_function_try_block): Likewise.
2129 (cp_parser_handler): Likewise.
2130 (cp_parser_throw_expression): Likewise.
2131 (cp_parser_asm_operand_list): Likewise.
2132 (cp_parser_attributes_opt): Likewise.
2133 (cp_parser_label_declaration): Likewise.
2134 (cp_parser_constructor_declarator_p): Likewise.
2135 (cp_parser_template_declaration_after_export): Likewise.
2136 (cp_parser_single_declaration): Likewise.
2137 (cp_parser_objc_message_expression): Likewise.
2138 (cp_parser_objc_message_args): Likewise.
2139 (cp_parser_objc_encode_expression): Likewise.
2140 (cp_parser_objc_defs_expression): Likewise.
2141 (cp_parser_objc_protocol_expression): Likewise.
2142 (cp_parser_objc_selector_expression): Likewise.
2143 (cp_parser_objc_protocol_refs_opt): Likewise.
2144 (cp_parser_objc_typename): Likewise.
2145 (cp_parser_objc_method_keyword_params): Likewise.
2146 (cp_parser_objc_superclass_or_category): Likewise.
2147 (cp_parser_objc_try_catch_finally_statement): Likewise.
2148 (cp_parser_objc_synchronized_statement): Likewise.
2149 (cp_parser_objc_throw_statement): Likewise.
2150 (cp_parser_omp_var_list_no_open): Likewise.
2151 (cp_parser_omp_clause_default): Likewise.
2152 (cp_parser_omp_clause_if): Likewise.
2153 (cp_parser_omp_clause_num_threads): Likewise.
2154 (cp_parser_omp_clause_reduction): Likewise.
2155 (cp_parser_omp_clause_schedule): Likewise.
2156 (cp_parser_omp_critical): Likewise.
2157 (cp_parser_omp_for_loop): Likewise.
2158 (cp_parser_omp_sections_scope): Likewise.
2160 * parser.c (cp_parser_template_parameter_list): Simplify.
2162 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2164 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2166 2008-04-07 Jason Merrill <jason@redhat.com>
2169 * class.c (type_has_user_nondefault_constructor): A template
2170 counts as a nondefault constructor.
2172 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2174 * decl.c (cxx_push_function_context): Delete.
2175 (cxx_pop_function_context): Delete.
2176 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2178 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2179 LANG_HOOKS_FUNCTION_FINAL): Delete.
2180 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2181 LANG_HOOKS_MISSING_NORETURN_OK_P.
2182 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2184 * semantics.c (current_stmt_tree): Fix comment.
2186 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2189 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2190 before calling fold_offsetof.
2192 2008-04-03 Tom Tromey <tromey@redhat.com>
2194 * Make-lang.in (c++_OBJS): New variable.
2196 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2198 * optimize.c (clone_body): New, from tree-inline.c.
2200 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2202 * method.c (synthesize_method): Use {push,pop}_function_context.
2203 * name-lookup.c (push_to_top_level): Likewise.
2204 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2206 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2209 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2212 2008-03-27 Tom Tromey <tromey@redhat.com>
2214 * Make-lang.in: Revert automatic dependency patch.
2216 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2219 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2220 (build_compound_expr): New, for compatibility with C
2221 build_compound_expr.
2222 (cp_build_compound_expr): Renamed from build_compound_expr.
2223 (build_c_cast): New, for compatibility with C build_c_cast.
2224 (cp_build_c_cast): Renamed from build_c_cast.
2225 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2226 * decl.c (cxx_maybe_build_cleanup): Ditto.
2227 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2228 (cp_build_compound_expr): Renamed from build_compound_expr.
2229 (build_c_cast): Add C-compatible prototype.
2230 (cp_build_c_cast): Renamed from build_c_cast.
2231 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2232 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2234 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2236 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2237 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2238 ending in a pack expansion, both of which can occur when
2239 substituting into a nested template.
2240 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2241 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2242 * parser.c (cp_parser_template_parameter): Deal with unnamed
2243 non-type template parameter packs identified by pack expansions in
2246 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2249 * pt.c (apply_late_template_attributes): Don't call tsubst on
2250 first attribute argument if it is IDENTIFIER_NODE.
2253 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2254 and LTGT_EXPR to pp_expression.
2256 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2258 * pt.c (coerce_template_template_parm): Moved the body of the loop
2259 of coerce_template_template_parms here, to make iteration over a
2260 template argument pack simpler.
2261 Also, allow matching of a template parameter pack in the template
2262 template parameter to a template parameter in the template
2264 (coerce_template_template_parms): Deal with variadic template
2265 template parameters. Use coerce_template_template_parm.
2266 (unify): Make sure we coerce the template template argument's
2267 template arguments to the template template parameter's template
2268 parameters, not the other way around.
2270 2008-03-25 Tom Tromey <tromey@redhat.com>
2272 * Make-lang.in: Remove .o targets.
2273 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2275 (c++_OBJS): New variable.
2276 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2278 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2280 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2281 (composite_pointer_type): Ditto.
2282 (common_type): Fix call to composite_pointer_type.
2283 (cxx_sizeof_nowarn): New; used to be a macro.
2284 (cxx_sizeof_expr): Add SFINAE support.
2285 (cxx_alignof_expr): Ditto.
2286 (decay_conversion): Fix calls for SFINAE support.
2287 (rationalize_conditional_expr): Add SFINAE support.
2288 (build_class_member_access_expr): Ditto.
2289 (finish_class_member_access_expr): Ditto.
2290 (build_x_indirect_ref): Ditto.
2291 (build_indirect_ref): Original version renamed to
2292 cp_build_indirect_ref; new version provides a bridge from
2294 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2296 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2297 (build_function_call): Original version renamed to
2298 cp_build_function_call; new version provides a bridge from
2300 (cp_build_function_call): Was build_function_call; added SFINAE
2302 (convert_arguments): Add SFINAE support.
2303 (build_x_binary_op): Ditto.
2304 (build_binary_op): Original version renamed to cp_build_binary_op;
2305 new version provides a bridge from c-common.
2306 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2307 (pointer_diff): Fix calls for SFINAE.
2308 (build_x_unary_op): Add SFINAE support.
2309 (condition_conversion): Fix calls for SFINAE.
2310 (build_unary_op): Original version renamed to cp_build_unary_op;
2311 new version provides a bridge from c-common.
2312 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2313 (unary_complex_lvalue): Fix calls for SFINAE.
2314 (build_x_conditional_expr): Add SFINAE support.
2315 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2316 (build_x_compound_expr): Add SFINAE support.
2317 (convert_ptrmem): Fix calls for SFINAE.
2318 (build_static_cast_1): Add SFINAE support.
2319 (build_static_cast): Ditto.
2320 (build_reinterpret_cast_1): Ditto.
2321 (build_reinterpret_cast): Ditto.
2322 (build_const_cast_1): Ditto.
2323 (build_const_cast): Ditto.
2324 (build_c_cast): Ditto.
2325 (build_modify_expr): Original version renamed to
2326 cp_build_modify_expr; new version provides a bridge from c-common.
2327 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2329 (build_x_modify_expr): Add SFINAE support.
2330 (build_ptrmemfunc): Fix calls for SFINAE.
2331 (convert_for_assignment): Add SFINAE support.
2332 (convert_for_initialization): Ditto.
2333 (check_return_expr): Fix calls for SFINAE.
2334 (lvalue_or_else): Add SFINAE support.
2335 * init.c (perform_member_init): Fix calls for SFINAE.
2336 (emit_mem_initializers): Ditto.
2337 (expand_virtual_init): Ditto.
2338 (expand_cleanup_for_base): Ditto.
2339 (build_aggr_init): Add SFINAE support.
2340 (expand_default_init): Ditto.
2341 (expand_aggr_init_1): Fix calls for SFINAE.
2342 (build_offset_ref): Ditto.
2343 (build_new_1): Add SFINAE support.
2345 (build_vec_delete_1): Fix calls for SFINAE.
2346 (get_temp_regvar): Ditto.
2347 (build_vec_init): Add SFINAE support.
2348 (build_dtor_call): Fix calls for SFINAE.
2349 (build_delete): Ditto.
2350 (push_base_cleanups): Ditto.
2351 (build_vec_delete_1): Ditto.
2352 * class.c (build_base_path): Fix calls for SFINAE.
2353 (build_simple_base_path): Ditto.
2354 (convert_to_base_statically): Ditto.
2355 (build_vfn_ref): Ditto.
2356 (resolve_address_of_overloaded_function): Ditto.
2357 * decl.c (check_initializer): Fix calls for SFINAE.
2358 (register_dtor_fn): Ditto.
2359 (compute_array_index_type): Ditto.
2360 (finish_enum): Ditto.
2361 (start_preparsed_function): Ditto.
2362 (cxx_maybe_build_cleanup): Ditto.
2363 * call.c (convert_like): Add COMPLAIN argument.
2364 (convert_like_with_context): Ditto.
2365 (build_this): Fix calls for SFINAE.
2366 (build_user_type_conversion): Ditto.
2367 (resolve_args): Ditto.
2368 (build_new_function_call): Add SFINAE support.
2369 (build_operator_new_call): Fix calls for SFINAE.
2370 (build_object_call): Add SFINAE support.
2371 (build_conditional_expr): Ditto.
2372 (build_new_op): Ditto.
2373 (build_op_delete_call): Fix calls for SFINAE.
2374 (build_temp): Ditto.
2375 (convert_like_real): Add SFINAE support.
2376 (build_x_va_arg): Fix calls for SFINAE.
2377 (convert_default_arg): Ditto.
2378 (build_over_call): Add SFINAE support.
2379 (build_java_interface_fn_ref): Fix calls for SFINAE.
2380 (build_special_member_call): Add SFINAE support.
2381 (build_new_method_call): Ditto.
2382 (perform_implicit_conversion): Ditto.
2383 (perform_direct_initialization_if_possible): Ditto.
2384 (initialize_reference): Fix calls for SFINAE.
2385 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2386 * rtti.c (build_headof): Fix calls for SFINAE.
2387 (get_tinfo_decl_dynamic): Ditto.
2388 (get_typeid): Ditto.
2389 (build_dynamic_cast_1): Add SFINAE support.
2390 (build_dynamic_cast): Ditto.
2391 (tinfo_base_init): Fix calls for SFINAE.
2392 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2393 (do_end_catch): Ditto.
2394 (initialize_handler_parm): Ditto.
2395 (expand_start_catch_block): Ditto.
2396 (do_allocate_exception): Ditto.
2397 (do_free_exception): Ditto.
2398 (build_throw): Ditto.
2399 * cvt.c (build_up_reference): Fix calls for SFINAE.
2400 (convert_to_reference): Ditto.
2401 (ocp_convert): Ditto.
2402 (convert_to_void): Add SFINAE support.
2403 * tree.c (build_dummy_object): Fix calls for SFINAE.
2404 (stabilize_expr): Ditto.
2405 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2407 (build_new_method_call): Ditto.
2408 (build_special_member_call): Ditto.
2409 (build_new_op): Ditto.
2410 (perform_implicit_conversion): Ditto.
2411 (perform_direct_initialization_if_possible): Ditto.
2412 (convert_to_void): Ditto.
2413 (build_aggr_init): Ditto.
2415 (build_vec_init): Ditto.
2416 (build_dynamic_cast): Ditto.
2417 (finish_call_expr): Ditto
2418 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2419 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2420 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2421 (finish_class_member_access_expr): Ditto.
2422 (build_x_indirect_ref): Ditto.
2423 (cp_build_indirect_ref): New.
2424 (cp_build_function_call): Add tsubst_flags_t parameter.
2425 (build_x_unary_op): Ditto.
2426 (cp_build_unary_op): New.
2427 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2428 (build_x_compound_expr): Ditto.
2429 (build_compound_expr): Ditto.
2430 (build_static_cast): Ditto.
2431 (build_reinterpret_cast): Ditto.
2432 (build_const_cast): Ditto.
2433 (build_c_cast): Ditto.
2434 (build_x_modify_expr): Ditto.
2435 (cp_build_modify_expr): New.
2436 (convert_for_initialization): Add tsubst_flags_t parameter.
2437 (cp_build_binary_op): Remove macro; add function declaration.
2438 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2439 (lvalue_or_else): Ditto.
2440 (build_functional_cast): Ditto.
2441 * typeck2.c (digest_init): Fix calls for SFINAE.
2442 (process_init_constructor_array): Ditto.
2443 (process_init_constructor_record): Ditto.
2444 (build_x_arrow): Ditto.
2445 (build_m_component_ref): Ditto.
2446 (build_functional_cast): Add SFINAE support.
2447 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2448 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2449 (finish_expr_stmt): Ditto.
2450 (finish_for_expr): Ditto.
2451 (finish_asm_stmt): Ditto.
2452 (finish_non_static_data_member): Ditto.
2453 (finish_qualified_id_expr): Ditto.
2454 (finish_call_expr): Add SFINAE support.
2455 (finish_increment_expr): Fix calls for SFINAE.
2456 (finish_unary_op_expr): Ditto.
2457 (simplify_aggr_init_expr): Ditto.
2458 (finish_omp_clauses): Ditto.
2459 (finish_omp_for): Ditto.
2460 (finish_omp_barrier): Ditto.
2461 (finish_omo_flush): Ditto.
2462 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2463 (build_anon_union_vars): Ditto.
2464 (get_guard_cond): Ditto.
2466 (one_static_initialization_or_destruction): Ditto.
2467 (do_static_initialization_or_destruction): Ditto.
2468 (generate_ctor_or_dtor_function): Ditto.
2469 (build_offset_ref_call_from_tree): Ditto.
2470 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2471 (cp_parser_postfix_dot_deref_expression): Ditto.
2472 (cp_parser_unary_expression): Ditto.
2473 (cp_parser_new_expression): Ditto.
2474 (cp_parser_cast_expression): Ditto.
2475 (cp_parser_binary_expression): Ditto.
2476 (cp_parser_question_colon_clause): Ditto.
2477 (cp_parser_assignment_expression): Ditto.
2478 (cp_parser_expression): Ditto.
2479 (cp_parser_builtin_offsetof): Ditto.
2480 (cp_parser_template_argument): Ditto.
2481 (cp_parser_functional_cast): Ditto.
2483 2008-03-24 Tom Tromey <tromey@redhat.com>
2485 * lex.c (handle_pragma_interface): Don't copy the filename.
2486 (handle_pragma_implementation): Copy filename using xstrdup.
2488 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2490 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2491 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2492 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2493 (PROMOTES_TO_AGGR_TYPE): Remove.
2494 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2495 * typeck.c (unary_complex_lvalue, build_modify_expr,
2496 convert_for_initialization): Adjust.
2497 * init.c (is_aggr_type): Remove.
2498 (is_class_type): Add.
2499 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2500 build_delete): Adjust.
2501 * lex.c (make_aggr_type): Remove.
2502 (make_class_type): Add.
2503 (cxx_make_type): Adjust.
2504 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2506 * decl.c (build_typename_type, make_typename_type,
2507 make_unbound_class_template, cxx_init_decl_processing,
2508 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2509 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2510 grok_op_properties, xref_tag, check_function_type): Adjust.
2511 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2512 add_builtin_candidate, add_builtin_candidates,
2513 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2514 is_subseq, compare_ics): Adjust.
2515 * method.c (use_thunk): Adjust.
2516 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2517 create_tinfo_types): Adjust.
2518 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2519 build_up_reference, convert_to_reference, convert_from_reference,
2520 ocp_convert, build_expr_type_conversion): Adjust.
2521 * tree.c (bind_template_template_parm, error_type): Adjust.
2522 * dump.c (cp_dump_tree): Adjust.
2523 * search.c (lookup_member): Adjust.
2524 * friend.c (make_friend_class, do_friend): Adjust.
2525 * typeck2.c (store_init_value, process_init_constructor_array,
2526 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2527 build_functional_cast): Adjust.
2528 * pt.c (finish_member_template_decl, process_template_parm,
2529 lookup_template_class, tsubst_function_type, tsubst,
2530 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2532 * semantics.c (begin_class_definition, finish_base_specifier,
2533 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2535 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2536 do_class_using_decl, lookup_qualified_name,
2537 maybe_process_template_type_declaration): Adjust.
2538 * decl2.c (grok_array_decl, check_member_template,
2539 constrain_class_visibility): Adjust.
2540 * parser.c (cp_parser_class_name): Adjust.
2542 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2544 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2546 2008-03-17 Jason Merrill <jason@redhat.com>
2549 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2550 a temp directly to a reference as per DR391.
2552 2008-03-12 Richard Guenther <rguenther@suse.de>
2556 2008-02-04 Richard Guenther <rguenther@suse.de>
2559 * decl.c (record_builtin_java_type): Make jboolean a
2560 integer type again where its mode doesn't match that of bool.
2562 2008-01-25 Richard Guenther <rguenther@suse.de>
2565 * decl.c (record_builtin_java_type): Make __java_boolean
2567 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2568 after TYPE_MAIN_VARIANT check.
2570 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2573 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2577 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2578 DECL_P in not a variable and appears more than once error messages.
2580 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2584 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2588 * typeck.c (structural_comptypes): Call cp_comptypes.
2589 (comptypes): New; called from the C/C++ common bits to perform
2591 (cp_comptypes): Renamed from comptypes, which is already used,
2592 with a different signature, by the C++ front end.
2593 (build_reinterpret_cast_1): Call cp_comptypes.
2594 (ptr_reasonably_similar): Ditto.
2595 * decl.c (decls_match): Ditto.
2596 * cvt.c (convert_to_reference): Ditto.
2597 * cp-tree.h (same_type_p): Ditto.
2598 (same_or_base_type_p): Ditto.
2599 (comptypes): Rename to cp_comptypes.
2600 * pt.c (canonical_type_parameter): Call cp_comptypes.
2602 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2604 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2605 test for equivalence between pointer and references.
2607 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2610 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2611 (check_field_decls): Likewise.
2612 (note_name_declared_in_class): Likewise.
2613 * call.c (build_new_op): Likewise.
2614 (convert_like_real): Likewise.
2615 (build_over_call): Likewise.
2616 * lex.c (unqualified_fn_lookup_error): Likewise.
2617 * parser.c (cp_parser_template_id): Likewise.
2618 * cvt.c (warn_ref_binding): Likewise.
2619 (convert_to_reference): Likewise.
2620 (ocp_convert): Likewise.
2621 (convert_to_void): Use error instead of pedwarn.
2622 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2623 * decl.c (compute_array_index_type): Use constant_expression_error.
2625 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2627 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2628 that auto is either a storage class or a simple type specifier,
2629 depending on the dialect.
2630 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2631 specifier in C++98 mode, error in C++0x mode (since we don't
2632 support auto as a type specifier, yet).
2633 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2634 storage specifier in C++0x mode.
2635 (cp_parser_simple_type_specifier): Parse `auto' as a
2636 simple-type-specifier, but error because we don't support it yet.
2638 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2640 * parser.c (cp_parser_nonclass_name): New.
2641 (cp_parser_pseudo_destructor_name): Use it instead of
2642 cp_parser_type_name.
2643 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2645 2008-02-29 Tom Tromey <tromey@redhat.com>
2647 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2648 (cp_lexer_get_preprocessor_token): Update.
2649 (cp_lexer_set_source_position_from_token): Don't call
2650 restore_input_file_stack.
2651 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2653 2008-02-28 Richard Guenther <rguenther@suse.de>
2656 2008-02-26 Richard Guenther <rguenther@suse.de>
2658 * decl.c (duplicate_decls): Remove decl from global mapping
2659 before ggc_freeing it.
2661 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2664 * rtti.c: Include c-pragma.h.
2665 (push_abi_namespace, pop_abi_namespace): New functions.
2666 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2667 create_tinfo_types, emit_support_tinfos): Use them.
2668 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2670 2008-02-26 Jason Merrill <jason@redhat.com>
2673 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2674 to name the struct for linkage purposes even if it has attributes.
2675 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2677 2008-02-26 Tom Tromey <tromey@redhat.com>
2679 * parser.c (eof_token): Remove old location code.
2680 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2681 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2683 (cp_write_global_declarations): Likewise.
2684 * lex.c (cxx_init): Remove old location code.
2685 (handle_pragma_implementation): Remove test of
2686 USE_MAPPED_LOCATION.
2687 * pt.c (tsubst): Remove old location code.
2688 * error.c (cp_print_error_function): Remove test of
2689 USE_MAPPED_LOCATION.
2690 * decl.c (pop_label): Remove old location code.
2691 (finish_function): Likewise.
2693 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2696 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2698 2008-02-26 Richard Guenther <rguenther@suse.de>
2700 * decl.c (duplicate_decls): Remove decl from global mapping
2701 before ggc_freeing it.
2703 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2706 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2708 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2710 * typeck.c (build_class_member_access_expr): Add appropriate
2711 OPT_W* parameter to warning.
2712 (build_reinterpret_cast_1): Likewise.
2713 * name-lookup.c (push_overloaded_decl): Likewise.
2715 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2718 * error.c (dump_expr): Handle CONJ_EXPR.
2720 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2723 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2724 (dump_expr): Handle FIXED_CST.
2726 2008-02-24 Jason Merrill <jason@redhat.com>
2728 * parser.c (cp_parser_declaration): Handle "inline namespace".
2729 (cp_parser_namespace_definition): Likewise.
2732 * name-lookup.c (arg_assoc_namespace): Look down into inline
2735 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2737 * typeck.c (check_for_casting_away_constness): Use 1 single
2738 argument, the type of cast, to decide what diagnostics generate.
2739 (build_static_cast_1): Remove unused code. Update call to
2740 check_for_casting_away_constness.
2741 (build_reinterpret_cast_1): Update call to
2742 check_for_casting_away_constness.
2743 (build_const_cast_1): Likewise.
2745 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2747 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2748 VEC_NEW_EXPR), forward to pp_expression.
2749 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2751 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2754 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2756 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2759 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2760 template decls' function decl.
2762 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2766 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2769 * pt.c (determine_specialization): In case of function templates,
2770 when the type of DECL does not match FN there is no match.
2772 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2775 * typeck.c (build_binary_op): Warn about floating point
2776 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2778 2008-02-19 Jason Merrill <jason@redhat.com>
2781 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2782 while we look for possible bindings.
2784 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2787 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2791 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2792 vars. Afterwards ensure v is VAR_DECL.
2795 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2796 call cp_finish_decl.
2797 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2800 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2805 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2806 is error_mark_node, return an error early.
2807 (find_parameter_packs_r): Pass the pointer set along to recursive
2808 calls of cp_walk_subtrees; don't try to manage the pointer set
2810 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2811 (make_pack_expansion): Ditto.
2812 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2813 a second pass through the tree with find_parameter_packs_r; that
2814 second pass no longer does anything.
2815 (push_template_decl_real): If we have an erroneous declaration,
2816 set its type to error_mark_node before returning an error.
2818 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2821 * pt.c (tsubst_initializer_list): Deal with the use of
2822 VOID_TYPE_NODE to indicate value-initialization of the bases.
2824 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2825 Jason Merrill <jason@redhat.com>
2829 * class.c (type_has_user_nondefault_constructor): New fn.
2830 * cp-tree.h: Declare it.
2831 * init.c (emit_mem_initializers): Use it for -W warning about
2832 missing base initializer.
2834 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2837 * pt.c (determine_specialization): In case of function templates,
2838 when the type of DECL does not match FN there is no match.
2840 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2841 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2844 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2845 are not identifier :: ~, return before calling cp_parser_type_name.
2847 2008-02-13 Jason Merrill <jason@redhat.com>
2849 PR c++/34962, c++/34937, c++/34939
2850 * decl2.c (is_late_template_attribute): Always defer attributes
2851 vector_size and weak.
2854 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2855 of enumerators, too.
2857 2008-02-12 Jason Merrill <jason@redhat.com>
2860 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2861 if we're doing conversions to call a user-defined conversion function.
2863 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2866 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2869 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2872 * init.c (build_new_1): Don't create placement_expr before
2873 constructing alloc_call. Verify that the pointer is passed by
2874 value to operator new.
2876 2008-02-11 Jason Merrill <jason@redhat.com>
2879 * pt.c (tsubst): Don't look up a template typedef in an explicit
2882 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2885 * tree.c (cp_build_qualified_type_real): When building a
2886 cv-qualified array type, build it as a unique type with
2887 build_cplus_array_type_1 and then adopt the unqualified type's
2890 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2893 * decl.c (groktypename): Check grokdeclarator return.
2895 2008-02-10 Jason Merrill <jason@redhat.com>
2898 * decl2.c (cp_write_global_declarations): Don't write out static
2899 data members with DECL_IN_AGGR_P set.
2901 2008-02-08 Jason Merrill <jason@redhat.com>
2904 * tree.c (build_target_expr_with_type): Handle void initializer.
2905 (bot_manip): Remap slot before recursing.
2907 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2910 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2912 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2915 * tree.c: Include tree-flow.h.
2916 (build_target_expr): Check type compatibility.
2917 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2918 * call.c (convert_like_real): Convert bitfield to expected type.
2920 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2924 * typeck.c (structural_comptypes): Call cp_comptypes.
2925 (comptypes): New; called from the C/C++ common bits to perform
2927 (cp_comptypes): Renamed from comptypes, which is already used,
2928 with a different signature, by the C++ front end.
2929 (build_reinterpret_cast_1): Call cp_comptypes.
2930 (ptr_reasonably_similar): Ditto.
2931 * decl.c (decls_match): Ditto.
2932 * cvt.c (convert_to_reference): Ditto.
2933 * cp-tree.h (same_type_p): Ditto.
2934 (same_or_base_type_p): Ditto.
2935 (comptypes): Rename to cp_comptypes.
2936 * pt.c (canonical_type_parameter): Call cp_comptypes.
2938 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2941 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2942 value dependent expression.
2944 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2947 * decl2.c (save_template_attributes): When we're modifying the
2948 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2949 all of the other variants to add those same attributes. Otherwise,
2950 the main variant will be inconsistent with those other variants.
2952 2008-02-04 Richard Guenther <rguenther@suse.de>
2955 * decl.c (record_builtin_java_type): Make jboolean a
2956 integer type again where its mode doesn't match that of bool.
2958 2008-02-02 Jason Merrill <jason@redhat.com>
2959 Mark Mitchell <mark@codesourcery.com>
2962 * init.c (build_value_init_1): New function.
2963 (build_value_init): New function.
2964 * typeck2.c (build_functional_cast): Call it.
2965 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2967 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2968 TYPE_HAS_CONSTRUCTOR.
2969 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2970 add_implicitly_declared_members): Adjust.
2971 (check_field_decls): Adjust. Remove warnings about reference/const
2972 in class without constructor.
2973 (check_bases_and_members): Adjust. Give those warnings here instead.
2974 * decl.c (fixup_anonymous_aggr): Adjust.
2975 (check_initializer): Adjust, clarify logic slightly.
2976 (grok_special_member_properties): Adjust, only set if user-provided.
2977 * rtti.c (create_tinfo_types): Don't set.
2978 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2979 Use same_type_ignoring_top_level_qualifiers_p.
2980 * pt.c (check_explicit_specialization): Adjust.
2981 (instantiate_class_template): Adjust.
2983 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2984 Jakub Jelinek <jakub@redhat.com>
2988 * typeck.c (structural_comptypes): Handle comparisons of
2989 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2991 * mangle.c (write_builtin_type): Map down to the canonical type,
2992 which will be one of the predefined type nodes.
2994 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2997 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2998 bits to allow for expansion of the number of middle end tree
3001 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3012 * typeck.c (check_return_expr): Tweak call to
3013 check_for_bare_parameter_packs.
3014 * class.c (add_method): Be careful with error_mark_nodes.
3015 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3017 * pt.c (struct find_parameter_pack_data): Remove
3019 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3020 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3021 (make_pack_expansion): Ditto.
3022 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3024 (process_template_parm): Tweak call to
3025 check_for_bare_parameter_packs.
3026 (push_template_decl_real): Tweak calls to
3027 check_for_bare_parameter_packs. If bare parameter packs are found
3028 in the list of exceptions, clear out that list after giving an
3030 * semantics.c (finish_cond): Tweak call to
3031 check_for_bare_parameter_packs.
3032 (finish_expr_stmt): Ditto.
3033 (finish_for_expr): Ditto.
3034 (finish_switch_cond): Ditto.
3035 (finish_mem_initializers): Ditto.
3036 (finish_member_declaration): Ditto.
3037 (finish_static_assert): Check for bare parameter packs in the
3039 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3040 attributes of a declaration.
3041 * parser.c (cp_parser_using_declaration): Tweak call to
3042 check_for_bare_parameter_packs.
3043 (cp_parser_base_clause): Ditto.
3045 2008-01-28 Jason Merrill <jason@redhat.com>
3048 * class.c (build_base_path): Fix !want_pointer case.
3050 2008-01-27 Jason Merrill <jason@redhat.com>
3053 * class.c (build_base_path): Fix previous change.
3055 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3058 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3061 2008-01-26 Richard Guenther <rguenther@suse.de>
3064 * typeck.c (build_binary_op): Remove code to shorten compares.
3066 2008-01-25 Richard Guenther <rguenther@suse.de>
3069 * decl.c (record_builtin_java_type): Make __java_boolean
3071 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3072 after TYPE_MAIN_VARIANT check.
3074 2008-01-25 Jason Merrill <jason@redhat.com>
3077 * class.c (build_base_path): Don't mess with virtual access if
3079 * call.c (standard_conversion): Don't check whether source type
3082 * decl2.c (is_late_template_attribute): Don't defer attribute
3083 visibility just because the type is dependent.
3085 2008-01-25 Jason Merrill <jason@redhat.com>
3086 Mark Mitchell <mark@codesourcery.com>
3089 * call.c (standard_conversion): Allow conversion from integer/real
3091 (compare_ics): Such a conversion is worse than a normal arithmetic
3094 2008-01-25 Richard Guenther <rguenther@suse.de>
3097 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3100 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3103 * pt.c (push_template_decl_real): Return error_mark_node in case
3104 of template definition of non-template.
3106 2008-01-24 Jason Merrill <jason@redhat.com>
3109 * decl2.c (is_late_template_attribute): Defer any attribute with
3110 dependent args. Also defer type attributes if the type is dependent.
3112 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3113 Alexandre Oliva <aoliva@redhat.com>
3116 * call.c (reference_binding): For bitfields use the declared bitfield
3118 (add_builtin_candidates): Likewise.
3119 * class.c (layout_class_type): For bitfields copy over the
3120 original type quals.
3122 2008-01-22 Jason Merrill <jason@redhat.com>
3125 * decl.c (groktypename): Also ignore attributes on dependent
3126 possibly-class types.
3129 * friend.c (do_friend): Check for prior declaration of a friend
3130 function of a local class.
3131 * name-lookup.c (lookup_name_innermost_nonclass_level):
3133 * name-lookup.h: Declare it.
3135 2008-01-22 Tom Tromey <tromey@redhat.com>
3138 * init.c (build_new_1): Only disallow Java aggregates.
3140 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3143 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3144 if decl or init is error_mark_node.
3147 * error.c (dump_expr): Handle VECTOR_CST.
3149 2008-01-21 Jason Merrill <jason@redhat.com>
3152 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3155 * pt.c (retrieve_local_specialization): Robustify.
3156 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3159 * pt.c (tsubst): Only call retrieve_local_specialization if the
3160 original typedef was in a function template.
3163 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3165 2008-01-21 Richard Guenther <rguenther@suse.de>
3168 * error.c (cp_print_error_function): Deal with recursive
3171 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3174 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3176 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3180 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3181 on non-IS_AGGR_TYPE scope.
3182 (constructor_name_p): Assert IS_AGGR_TYPE.
3184 2008-01-18 Ian Lance Taylor <iant@google.com>
3187 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3188 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3189 DECL_IS_OPERATOR_NEW flag.
3191 2008-01-16 Richard Guenther <rguenther@suse.de>
3194 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3195 for conversions to type variants.
3197 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3199 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3200 declaration and code. Update copyright year.
3202 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3205 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3206 know we have a class type.
3208 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3211 * pt.c (coerce_template_parameter_pack): When substituting into
3212 the type of a non-type template parameter pack. use the
3213 deduced/substituted arguments.
3214 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3215 can be a parameter pack with the ellipsis following it. When we
3216 have an erroneous declaration, allow it to be a parameter pack.
3217 (cp_parser_template_parameter): Complain about default
3218 arguments on non-type template parameter packs, and parse them
3219 using the new cp_parser_default_argument.
3220 (cp_parser_parameter_declaration): Complain about parameter packs
3221 with default arguments. Move parsing of default arguments into a
3222 new function, cp_parser_default_argument.
3223 (cp_parser_default_argument): New; extracted from
3224 cp_parser_parameter_declaration.
3226 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3232 * typeck.c (check_return_expr): If there are bare parameter packs
3233 in the return value, set it to error_mark_node.
3234 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3235 * pt.c (find_parameter_packs_r): Look at the type of
3236 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3237 (check_for_bare_parameter_packs): Flip the result: now returns
3238 TRUE when there were bare parameter packs, FALSE otherwise.
3239 (push_template_decl_real): Deal with flipped result of
3240 check_for_bare_parameter_packs.
3241 * semantics.c (finish_cond): If there are bare parameter packs in
3242 the conditional, set it to error_mark_node.
3243 (finish_expr_stmt): If there are bare parameter packs in the
3244 expression, set it to error_mark_node.
3245 (finish_for_expr): Ditto.
3246 (finish_switch_cond): If there are bare parameter packs in
3247 the conditional, set it to error_mark_node.
3248 (finish_mem_initializers): If there are bare parameter packs in
3249 the member initializer, set it to error_mark_node.
3250 (finish_member_declaration): Check the attributes of the
3251 declaration for bare parameter packs, and remove the attributes if
3252 any have bare parameter packs.
3253 * parser.c (cp_parser_using_declaration): Check the using
3254 declaration for bare parameter packs.
3255 (cp_parser_base_clause): If there are bare parameter packs in a
3256 base specifier, don't add it to the chain.
3258 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3261 * error.c (dump_simple_decl): Display ellipsis for template
3262 non-type parameter packs.
3263 (dump_decl): Display ellipsis for template type parameter packs.
3264 (dump_template_decl): Display ellipsis for template template
3266 * pt.c (redeclare_class_template): When redeclaring a class
3267 template, check for collisions between template parameters and
3268 template parameter packs.
3270 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3273 * pt.c (process_partial_specialization): Don't mark template
3274 parameters that occur in non-deduced contexts.
3275 (struct pair_fn_data): Add include_nondeduced_p.
3276 (for_each_template_parm_r): Only visit non-deduced contexts if
3277 include_nondeduced_p is set.
3278 (for_each_template_parm): Added parameter include_nondeduced_p,
3279 which states whether template parameters found in non-deduced
3280 contexts should be visited.
3281 (uses_template_parms): Visit all template parameters, even those
3282 in non-deduced contexts.
3284 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3287 * pt.c (check_default_tmpl_args): Check for parameter packs that
3288 aren't at the end of a primary template.
3289 (push_template_decl_real): Remove check for parameter packs that
3290 aren't at the end of a primary template; that now happens in
3291 check_default_tmpl_args.
3292 * semantics.c (finish_template_template_parm): Use
3293 check_default_tmpl_args to check for errors in the template
3296 2008-01-12 Doug Kwan <dougkwan@google.com>
3298 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3299 instead of OPT_Wreturn_type in warning due to ignored return type
3301 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3302 instead of OPT_Wreturn_type in warning due to ignored return type
3305 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3308 * semantics.c (finish_omp_for): Don't call
3309 fold_build_cleanup_point_expr if processing_template_decl.
3311 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3312 Jakub Jelinek <jakub@redhat.com>
3315 * error.c (dump_template_argument): Deal with TREE_LIST.
3317 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3319 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3320 long" in C++0x mode; change the warning to note that "long long"
3321 is only unsupported in C++98 mode.
3323 2007-12-20 Jason Merrill <jason@redhat.com>
3326 * call.c (standard_conversion): Derived-to-base is considered a
3327 standard conversion.
3329 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3332 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3333 call cp_parser_statement rather than
3334 cp_parser_already_scoped_statement.
3336 2007-12-18 Jason Merrill <jason@redhat.com>
3339 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3341 (dependent_type_p_r): Handle the domain of an array.
3343 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3344 Jakub Jelinek <jakub@redhat.com>
3349 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3350 bindings of template template parameters after all template
3351 arguments have been deduced.
3352 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3354 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3355 (unify): Deal with variadic, bound template template parameters.
3356 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3358 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3361 * decl.c (grokdeclarator): Reject friend sfk_constructor
3364 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3367 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3370 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3373 * cp-lang.c (cp_classify_record): New.
3374 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3376 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3379 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3382 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3383 dynamic_cast in a template.
3385 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3388 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3389 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3391 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3394 * error.c (dump_type_prefix, dump_type_suffix): Handle
3395 TYPE_PACK_EXPANSION.
3398 * error.c (dump_expr): Handle ABS_EXPR.
3400 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3404 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3405 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3406 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3407 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3408 flag_use_repository and repo_emit_p returned 2.
3410 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3413 * tree.c (stabilize_call, stabilize_init): Do nothing if
3414 processing_template_decl.
3416 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3419 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3420 error instead of assertion failure.
3421 * parser.c (cp_parser_decltype): If closing paren is not found,
3422 return error_mark_node.
3424 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3427 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3429 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3430 since arg_assoc_template_arg will deal with them (better).
3432 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3435 * pt.c (tsubst_exception_specification): Handle substitutions into
3436 member templates, where tsubst_pack_expansion returns a
3437 TYPE_PACK_EXPANSION.
3439 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3442 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3443 bindings for the template parameter pack, don't try to keep the
3444 empty deduced arguments.
3445 (unify): If a parameter is a template-id whose template argument
3446 list contains a pack expansion that is not at the end, then we
3447 cannot unify against that template-id.
3449 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3452 * pt.c (current_template_args): Use error_operand_p.
3454 2007-12-02 Paolo Carlini <pcarlini@suse.de>