1 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
6 2007-10-23 Jason Merrill <jason@redhat.com>
9 * call.c (struct conversion): Remove check_copy_constructor_p.
10 (reference_binding): Always bind a reference directly to a
11 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
13 (check_constructor_callable): Remove.
14 (convert_like_real): Don't call it.
15 (initialize_reference): Don't call check_constructor_callable.
16 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
17 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
18 conversions if LOOKUP_NO_TEMP_BIND.
19 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
20 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
22 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
24 2007-10-22 Jakub Jelinek <jakub@redhat.com>
27 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
28 before checking if its type is integral.
30 2007-10-22 Jason Merrill <jason@redhat.com>
33 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
34 * pt.c (apply_late_template_attributes): Splice out dependent
35 attributes from DECL_ATTRIBUTES.
37 * decl.c (cxx_maybe_build_cleanup): Use build_address.
39 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
41 * typeck.c (build_binary_op) : Use appropriate warning option
42 instead of unnamed warning.
44 2007-10-16 Paolo Carlini <pcarlini@suse.de>
47 * pt.c (current_template_args): Do not change TREE_LIST elements
48 with a TREE_VALUE of error_mark_node.
50 2007-10-16 Mark Mitchell <mark@codesourcery.com>
52 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
53 * decl.c (start_decl): Tidy.
54 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
56 (grokdeclarator): Clarify comment.
58 2007-10-14 Andrew Pinski <pinskia@gmail.com>
61 * decl.c (grokfndecl): Return NULL after the "definition of
62 implicitly-declared" error happened.
64 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
67 * call.c (build_user_type_conversion_1): Do not consider conversion
68 functions to convert a (possibly cv-qualified) object to the (possibly
69 cv-qualified) same object type (or a reference to it), to a (possibly
70 cv-qualified) base class of that type (or a reference to it).
72 2007-10-12 Paolo Carlini <pcarlini@suse.de>
74 * pt.c (tsubst): Use template_parm_level_and_index.
76 2007-10-12 Jakub Jelinek <jakub@redhat.com>
79 * parser.c (cp_parser_compound_statement): Handle label-declarations
80 at the beginning of the compound statement.
81 (cp_parser_block_declaration): Issue diagnostics about __label__
82 not at the beginning of a block.
84 2007-10-11 Paolo Carlini <pcarlini@suse.de>
87 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
88 to convert_template_argument.
89 (coerce_template_parms): Return error_mark_node after fixed-length
91 (tsubst_decl): Check for error_mark_node the return value of the
92 first tsubst in 'case VAR_DECL'.
94 2007-10-08 Ollie Wild <aaw@google.com>
96 * typeck2.c (digest_init): Call cplus_expand_constant after
97 convert_for_initialization.
98 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
99 * expr.c (cplus_expand_constant): Updated function description.
101 2007-10-04 Jason Merrill <jason@redhat.com>
104 * call.c (initialize_reference): Handle local static reference
107 2007-10-03 Jason Merrill <jason@redhat.com>
110 * name-lookup.c (push_namespace_with_attrs): Fold back into...
111 (push_namespace): Here.
112 (handle_namespace_attrs): New fn for the attr code.
113 (leave_scope): Don't pop_visibility.
114 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
115 * parser.c (cp_parser_namespace_definition): Call
116 handle_namespace_attrs and pop_visibility as appropriate.
119 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
121 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
123 * decl.c (duplicate_decls): Preserve linkage flags for mere
124 redeclarations of gnu_inline definitions.
126 2007-10-03 Jason Merrill <jason@redhat.com>
129 * decl.c (wrap_cleanups_r): New fn.
130 (wrap_temporary_cleanups): New fn.
131 (initialize_local_var): Call it.
133 2007-09-29 Jason Merrill <jason@redhat.com>
136 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
137 constant to not have DECL_EXTERNAL if it's file-local.
139 2007-09-28 Ollie Wild <aaw@google.com>
142 2007-09-27 Ollie Wild <aaw@google.com>
144 * typeck2.c (digest_init): Call cplus_expand_constant after
145 convert_for_initialization.
146 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
147 * expr.c (cplus_expand_constant): Updated function description.
149 2007-09-28 Jason Merrill <jason@redhat.com>
152 * class.c (layout_empty_base): Take rli parameter, update
153 rli->record_align if empty base has user-specified alignment.
154 (build_base_field): Pass rli to it.
156 2007-09-28 Paolo Carlini <pcarlini@suse.de>
159 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
161 2007-09-28 Paolo Carlini <pcarlini@suse.de>
164 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
165 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
166 (dump_parameters): Just call dump_type for argument packs too.
168 2007-09-28 Jakub Jelinek <jakub@redhat.com>
171 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
172 qualification by creating qualified PACK_EXPANSION_PATTERN and
173 then calling make_pack_expansion on it.
175 2007-09-27 Ollie Wild <aaw@google.com>
177 * typeck2.c (digest_init): Call cplus_expand_constant after
178 convert_for_initialization.
179 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
180 * expr.c (cplus_expand_constant): Updated function description.
182 2007-09-27 Jason Merrill <jason@redhat.com>
185 * decl2.c (is_late_template_attribute): Don't crash on unknown
188 2007-09-27 Paolo Carlini <pcarlini@suse.de>
191 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
192 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
193 spaces in the formatting.
194 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
196 2007-09-27 Jakub Jelinek <jakub@redhat.com>
198 * error.c (cxx_print_error_function): Add third argument, pass
199 it over to lhd_print_error_function.
200 (cp_print_error_function): If diagnostic->abstract_origin, print
202 * cp-tree.h (struct diagnostic_info): New forward decl.
203 (cxx_print_error_function): Add third argument.
205 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
208 * name-lookup.c (pushtag): Do not create an implicit typedef before
209 the associated type declaration is known to be valid.
211 2007-09-25 Jakub Jelinek <jakub@redhat.com>
213 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
214 rather than pointers.
216 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
219 * search.c (check_final_overrider): Fail if
220 targetm.comp_type_attributes returns 0.
222 2007-09-24 Jason Merrill <jason@redhat.com>
225 * pt.c (resolve_typename_type): Don't look things up in the original
226 template if it would mean losing template arguments.
228 2007-09-24 Jakub Jelinek <jakub@redhat.com>
231 * cp-tree.h (cxx_type_hash_eq): New prototype.
232 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
233 * tree.c (cxx_type_hash_eq): New function.
235 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
238 * tree.c (cp_build_qualified_type_real): Build a canonical
239 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
241 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
245 * tree.c (cplus_array_compare): Compare pointers, not types.
246 (build_cplus_array_type_1): Store new array type into the hash
247 table before building the canonical type; build the canonical type
249 (cp_build_qualified_type_real): Put all of the array types with
250 cv-qualified element types into the C++ array hash table, built as
251 variants of the unqualified versions.
253 2007-09-23 Jason Merrill <jason@redhat.com>
256 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
257 for deprecation warnings.
259 2007-09-22 Jason Merrill <jason@redhat.com>
262 * call.c (build_over_call): Warn about deprecated virtuals.
265 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
266 (MAYBE_TAGGED_TYPE_P): Remove.
267 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
268 instead of calling is_late_template_attribute again.
269 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
270 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
271 Don't crash on typedefs from non-template classes.
272 * decl2.c (grokfield): Don't sorry about attrs on template parms.
273 (is_late_template_attribute): All attributes applied to template
274 parms or typename types are dependent. Static.
275 (splice_template_attributes): Pass decl through.
276 (save_template_attributes): Likewise.
278 2007-09-20 Jakub Jelinek <jakub@redhat.com>
281 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
282 returned from tsubst_pack_expansion.
283 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
284 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
286 2007-09-20 Paolo Carlini <pcarlini@suse.de>
289 * semantics.c (finish_id_expression): Use consistently
290 context_for_name_lookup.
291 * decl.c (fixup_anonymous_aggr): Fix error message for
292 anonymous struct (vs union).
294 2007-09-19 Jason Merrill <jason@redhat.com>
297 * pt.c (tsubst): Handle typedefs by looking for the specialization.
298 (retrieve_specialization): Only tagged types use
299 DECL_TEMPLATE_INSTANTIATIONS.
300 (instantiate_class_template): Push nested classes too.
301 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
303 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
304 * init.c (is_aggr_type): Remove redundant tests.
305 * class.c (push_nested_class): Use CLASS_TYPE_P.
307 2007-09-20 Paolo Carlini <pcarlini@suse.de>
310 * init.c (build_zero_init): If, recursively, build_zero_init
311 returns a NULL_TREE, do not append it to the VEC of constructors.
313 2007-09-18 Jason Merrill <jason@redhat.com>
316 * pt.c (apply_late_template_attributes): Set processing_template_decl.
317 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
318 ATTR_FLAG_TYPE_IN_PLACE.
319 (tsubst): Do unqualified lookup to find typedefs from current class.
320 [ARRAY_TYPE]: Propagate alignment info.
321 * decl2.c (is_late_template_attribute): Only defer handling of
322 attribute aligned if the expression is dependent.
323 (save_template_attributes): If we're deferring any attributes,
324 make this a naming typedef.
326 2007-09-18 Paolo Carlini <pcarlini@suse.de>
329 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
330 va_arg instead of __builtin_va_arg.
332 2007-09-18 Paolo Carlini <pcarlini@suse.de>
335 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
336 (pp_cxx_primary_expression): Use it.
337 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
338 * error.c (dump_expr): Use it.
340 2007-09-18 Paolo Carlini <pcarlini@suse.de>
343 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
344 out case TYPEID_EXPR to...
345 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
346 and pp_cxx_right_paren.
347 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
348 * error.c (dump_expr): Use it.
350 2007-09-18 Paolo Carlini <pcarlini@suse.de>
353 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
354 (pp_cxx_primary_expression): Use it.
355 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
356 * error.c (dump_expr): Use it.
358 2007-09-16 Paolo Carlini <pcarlini@suse.de>
361 * init.c (build_new): Remove warning for zero-element
364 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
367 * call.c (maybe_handle_implicit_object): Set this_p, clear
368 rvaluedness_matches_p.
369 (compare_ics): Do not compare rvaluedness matching when one of the
370 operands is an implicit object.
372 2007-09-14 Jason Merrill <jason@redhat.com>
374 PR c++/17743, c++/19163
375 * decl2.c (is_late_template_attribute): New fn.
376 (splice_template_attributes, save_template_attributes): New fns.
377 (cplus_decl_attributes): Call save_template_attributes.
378 * pt.c (apply_late_template_attributes): New fn.
379 (instantiate_class_template, tsubst_decl): Use it.
380 * cp-tree.h: Declare is_late_template_attribute.
382 2007-09-13 Tom Tromey <tromey@redhat.com>
384 * parser.c (cp_lexer_new_main): Don't use
385 c_lex_return_raw_strings.
386 (cp_lexer_get_preprocessor_token): Update. Add special case when
389 2007-09-11 Jan Hubicka <jh@suse.cz>
391 * method.c (use_thunk): Use tree_rest_of_compilation
392 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
393 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
394 * cp-tree.h (expand_body): Kill.
395 (emit_associated_thunks): Declare.
396 * semantics.c (emit_associated_thunks): Export.
399 2007-09-09 David Daney <ddaney@avtrex.com>
402 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
403 to calculate cookie_ptr.
405 2007-09-08 Jason Merrill <jason@redhat.com>
408 * pt.c (most_specialized_class): Set processing_template_decl
409 while tsubsting partial spec args.
411 2007-09-06 Jason Merrill <jason@redhat.com>
413 * decl2.c (get_guard): Copy visibility from the guarded variable.
415 2007-09-06 Jan Hubicka <jh@suse.cz>
417 * semantics.c (expand_body): Do not mark arguments of clones used.
419 2007-09-06 Paolo Carlini <pcarlini@suse.de>
422 * decl.c (cp_finish_decl): When processing_template_decl,
423 deal correctly with init as TREE_LIST.
425 2007-09-06 Tom Tromey <tromey@redhat.com>
427 * decl.c (finish_function): Put return's location on line zero of
430 2007-09-05 Jason Merrill <jason@redhat.com>
433 * except.c (prepare_eh_type): Use type_decays_to.
436 * init.c (build_delete): Use build_headof to get the address of the
437 complete object if we aren't using the deleting destructor.
438 * rtti.c (build_headof): No longer static.
439 * cp-tree.h: Declare it.
441 2007-09-06 Jakub Jelinek <jakub@redhat.com>
443 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
444 decl if a prototype for XX is provided with throw().
447 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
448 on __*_chk non-__builtin_* decls.
450 2007-09-05 Paolo Carlini <pcarlini@suse.de>
453 * semantics.c (finish_id_expression): Use context_for_name_lookup
454 insted of DECL_CONTEXT, to see through anonymous structs and unions.
455 * class.c (finish_struct_anon): Deal correctly with anonymous
456 structs (vs unions, as GNU extension) in error messages.
458 2007-09-05 Jan Hubicka <jh@suse.cz>
460 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
461 call, DECL_EXTERNAL checks and current_function_decl saving.
463 2007-09-05 Paolo Carlini <pcarlini@suse.de>
466 * parser.c (cp_parser_primary_expression): Return error_mark_node
467 when a statement-expression is found in a template-argument list.
469 2007-09-04 Jason Merrill <jason@redhat.com>
471 * except.c (initialize_handler_parm): Use
472 fold_build_cleanup_point_expr.
475 * call.c (reference_binding): Don't look for user-defined conversions
479 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
480 the MUST_NOT_THROW_EXPR.
482 2007-09-04 Richard Sandiford <richard@codesourcery.com>
484 * decl.c (cp_finish_decl): Call determine_visibility before
485 make_rtl_for_nonlocal_decl.
487 2007-09-04 Jason Merrill <jason@redhat.com>
490 * pt.c (most_specialized_class): Substitute outer template
491 arguments into the arguments of a member template partial
493 (strip_innermost_template_args): New fn.
495 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
497 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
499 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
501 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
502 * decl.c (cp_make_fname_decl): Likewise,
503 * parser.c (cp_parser_string_literal): Likewise,
504 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
505 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
508 2007-09-02 Paolo Carlini <pcarlini@suse.de>
511 * typeck.c (build_unary_op): Fix error message for
512 Boolean expression as operand to operator--.
514 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
516 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
517 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
520 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
523 * init.c (build_default_init): Make extern.
524 * cp-tree.h (build_default_init): Declare here.
525 * pt.c (tsubst_expr): When the instantiation of the initializer of
526 a variable results in an empty list, default-initialize the
528 (tsubst_copy_and_build): When the instantiation of the initializer
529 in a new expression results in an empty initializer list,
530 default-initialize it.
532 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
534 * mangle.c (write_type): Change mangling of rvalue reference from
537 2007-08-31 Jakub Jelinek <jakub@redhat.com>
539 * decl.c (duplicate_decls): Remove duplicated line.
541 2007-08-31 Paolo Carlini <pcarlini@suse.de>
544 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
545 BOUND_TEMPLATE_TEMPLATE_PARM.
547 2007-08-31 Paolo Carlini <pcarlini@suse.de>
550 * search.c (lookup_member): Check the name argument for
553 2007-08-31 Paolo Carlini <pcarlini@suse.de>
556 * parser.c (cp_parser_trait_expr): Check rerurn value of
559 2007-08-30 Ollie Wild <aaw@google.com>
561 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
562 convert_ptrmem for pointer to member conversions.
563 (convert_to_pointer_force): Update cp_convert_to_pointer call.
564 (ocp_convert): Update cp_convert_to_pointer call.
565 * typeck.c (convert_ptrmem): Add conditional for null pointers to
567 (build_static_cast_1): Check can_convert for conversions in either
569 (get_delta_difference_1): New function.
570 (get_delta_difference): Refactor to call get_delta_difference_1.
572 2007-08-30 Jakub Jelinek <jakub@redhat.com>
574 * decl.c (start_preparsed_function): Set
575 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
577 2007-08-28 Paolo Carlini <pcarlini@suse.de>
580 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
581 BOUND_TEMPLATE_TEMPLATE_PARM.
583 2007-08-28 Jakub Jelinek <jakub@redhat.com>
587 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
588 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
590 2007-08-27 Jason Merrill <jason@redhat.com>
593 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
594 Look inside STMT_EXPR.
595 * semantics.c (stmt_expr_value_expr): New fn.
596 * cp-tree.h: Declare it.
599 * decl.c (groktypename): Ignore attributes applied to class type.
601 2007-08-28 Richard Guenther <rguenther@suse.de>
603 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
605 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
607 * error.c (dump_expr): Handle COMPLEX_CST.
608 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
609 (pp_cxx_expression): Likewise.
611 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
613 * decl.c (GNU_INLINE_P): New.
614 (duplicate_decls): Handle gnu_inline. Merge attributes and
615 some flags in overriding definitions.
616 (redeclaration_error_message): Handle gnu_inline.
617 (start_preparsed_function): Likewise.
619 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
621 * call.c (sufficient_parms_p): Constify.
622 * class.c (same_signature_p): Likewise.
623 * cp-gimplify.c (is_invisiref_parm,
624 cxx_omp_privatize_by_reference): Likewise.
625 * cp-objcp-common.c (has_c_linkage): Likewise.
626 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
627 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
628 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
629 num_artificial_parms_for, comp_template_parms,
630 template_parameter_pack_p, any_dependent_template_arguments_p,
631 any_type_dependent_arguments_p, any_value_dependent_elements_p,
632 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
633 zero_init_p, member_p, cp_lvalue_kind,
634 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
635 varargs_function_p, is_dummy_object, special_function_kind,
636 string_conv_p, type_unknown_p, comp_except_specs, compparms,
637 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
638 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
639 cp_has_mutable_p, at_least_as_qualified_p,
640 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
641 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
642 * except.c (nothrow_libfn_p): Likewise.
643 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
645 * pt.c (comp_template_parms, template_parameter_pack_p,
646 any_type_dependent_arguments_p, any_value_dependent_elements_p,
647 any_dependent_template_arguments_p): Likewise.
648 * repo.c (repo_export_class_p): Likewise.
649 * semantics.c (anon_aggr_type_p): Likewise.
650 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
651 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
652 varargs_function_p, member_p, is_dummy_object, pod_type_p,
653 zero_init_p, special_function_p): Likewise.
654 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
655 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
656 compparms, invalid_nonstatic_memfn_p,
657 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
658 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
659 cp_has_mutable_p, lvalue_or_else): Likewise.
661 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
663 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
664 * cp-objcp-common.c (cp_tree_size): Ditto.
665 * tree.c (cp_walk_subtrees): Ditto
666 * cp-tree.def (TINST_LEVEL): Go away.
667 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
668 move together with other non-tree structs.
669 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
670 (union lang_tree_node): Eliminate tinst_level field.
671 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
672 (current_instantiation, outermost_tinst_level): Return
673 a "struct tinst_level *".
675 * error.c (print_instantiation_partial_context): Change second
676 parameter to a "struct tinst_level *". Replace accessor macros
678 (print_instantiation_full_context): Likewise.
679 * lex.c (in_main_input_context): Likewise.
681 * pt.c (struct pending_templates): New.
682 (pending_templates, last_pending_template): Use it as a type.
683 (current_tinst_level): Change typo to "struct tinst_level *"
684 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
685 (add_pending_template): Construct a "struct pending_template".
686 Replace TINST_LEVEL accessor macros with field access.
687 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
688 (pop_tinst_level): Likewise.
689 (instantiate_pending_templates): Likewise. Factor common code used
690 when an instantiation has been done.
691 (outermost_tinst_level): Replace tree_last with loop.
692 (current_instantiation): Return a "struct tinst_level *".
694 2007-08-24 Ollie Wild <aaw@google.com>
696 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
697 * name-lookup.h (cp_binding_level): Remove vtables member.
699 2007-08-24 Richard Guenther <rguenther@suse.de>
701 * tree.c (cp_cannot_inline_tree_fn): Remove.
702 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
703 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
706 2007-08-24 Jakub Jelinek <jakub@redhat.com>
709 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
710 error_mark_node right away if build_expr_type_conversion
714 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
715 is error_mark_node rather than NULL_TREE.
716 * pt.c (check_explicit_specialization): Likewise.
719 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
720 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
722 2007-08-22 Jason Merrill <jason@redhat.com>
725 * pt.c (outermost_tinst_level): New function.
726 * lex.c (in_main_input_context): New function.
727 * cp-tree.h: Declare it.
728 * decl2.c (constrain_class_visibility): Use it to avoid warning
729 about uses of the anonymous namespace in the main input file.
731 2007-08-21 Jakub Jelinek <jakub@redhat.com>
733 * init.c (build_new_1): Use get_target_expr instead of save_expr.
735 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
738 * class.c (finish_struct_1): Warn when a class has virtual
739 functions and accessible non-virtual destructor.
741 2007-08-20 Richard Guenther <rguenther@suse.de>
745 * call.c (build_new_method_call): Convert initializer to
747 * init.c (build_aggr_init): Do not fiddle with types.
748 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
749 * except.c (build_throw): Do not drop qualifiers for the
751 * typeck.c (get_member_function_from_ptrfunc): Do not
752 fiddle with types, instead convert.
753 (build_ptrmemfunc1): Convert to the target type for
755 (gfc_trans_allocate): Convert result to target type.
756 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
757 pointer-to-member structures shall have alias set zero as well.
759 2007-08-20 Richard Guenther <rguenther@suse.de>
761 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
763 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
764 (nonstatic_local_decl_p): Likewise.
765 * tree.c (cp_auto_var_in_fn_p): Remove.
766 * decl.c (nonstatic_local_decl_p): Remove.
768 2007-08-20 Richard Guenther <rguenther@suse.de>
770 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
772 * tree.h (cp_walk_tree): New define to walk_tree_1 with
773 cp_walk_subtrees lh parameter.
774 (cp_walk_tree_without_duplicates): New define to
775 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
776 * tree.c (count_trees): Call
777 cp_walk_tree_without_duplicates.
778 (verify_stmt_tree): Call cp_walk_tree.
779 (break_out_target_exprs): Likewise.
780 (WALK_SUBTREE): Likewise.
781 * cp-gimplify.c (cp_genericize): Likewise.
782 * cp-pt.c (find_parameter_packs_r): Likewise.
783 (uses_parameter_packs): Likewise.
784 (make_pack_expansion): Likewise.
785 (check_for_bare_parameter_packs): Likewise.
786 (for_each_template_parm): Likewise.
787 * decl.c (check_default_argument): Call
788 cp_walk_tree_without_duplicates.
789 * except.c (build_throw): Likewise.
790 * decl2.c (type_visibility): Likewise.
791 * semantics.c (expand_or_defer_fn): Likewise.
792 (finalize_nrv): Call cp_walk_tree.
794 2007-08-20 Jakub Jelinek <jakub@redhat.com>
797 * init.c (build_new_1): Rename placement_var variable to placement_expr.
798 Initialize it with save_expr rather than get_temp_regvar.
800 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
803 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
806 2007-08-17 Ollie Wild <aaw@google.com>
809 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
810 declarations into appropriate slots for comparison. Fix type
813 2007-08-17 Paolo Carlini <pcarlini@suse.de>
816 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
817 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
819 2007-08-17 Paolo Carlini <pcarlini@suse.de>
822 * parser.c (cp_parser_class_head): Improve error message.
824 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
826 * pt.c (instantiate_decl): Set input_location
827 for the function end.
829 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
831 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
833 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
834 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
835 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
836 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
837 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
838 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
839 * typeck.c (cp_type_quals): Likewise.
840 * typeck2.c (cxx_incomplete_type_diagnostic,
841 cxx_incomplete_type_error): Likewise.
843 2007-08-16 Paolo Carlini <pcarlini@suse.de>
846 * pt.c (tsubst_friend_function): When check_classfn
847 returns error_mark_node likewise return it.
849 2007-08-15 Jakub Jelinek <jakub@redhat.com>
852 * typeck.c (check_return_expr): Don't NRV optimize vars in
854 * decl.c (finish_function): Comment fix.
856 2007-08-15 Paolo Carlini <pcarlini@suse.de>
859 * pt.c (push_template_decl_real): Depending on TYPE_P
860 use either TYPE_CONTEXT or DECL_CONTEXT.
862 2007-08-14 Mark Mitchell <mark@codesourcery.com>
864 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
865 constructors and destructors return this.
867 2007-08-14 Paolo Carlini <pcarlini@suse.de>
870 * decl2.c (check_classfn): Return error_mark_node in case of error;
871 in that case, do not call add_method.
872 * decl.c (start_decl): Deal with check_classfn returning
874 (grokfndecl): Likewise.
875 * pt.c (tsubst_friend_function): Likewise.
877 2007-08-14 Andrew Pinski <pinskia@gmail.com>
880 * typeck.c (build_binary_op): Disallow vector float types with
881 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
883 2007-08-11 Ian Lance Taylor <iant@google.com>
885 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
887 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
889 2007-08-10 Ollie Wild <aaw@google.com>
891 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
893 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
895 (unqualified_namespace_lookup): Fix ambiguous_decl call.
896 (lookup_using_namespace): Fix ambiguous_decl call.
897 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
899 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
901 * call.c (name_as_c_string): Use CONST_CAST.
902 * decl.c (build_decl): Likewise.
903 * parser.c (cp_parser_string_literal): Likewise.
905 2007-08-10 Paolo Carlini <pcarlini@suse.de>
908 * error.c (dump_expr): Consistently use the *_cxx_*
909 variants of the pretty-print functions.
911 2007-08-10 Paolo Carlini <pcarlini@suse.de>
914 * decl.c (check_special_function_return_type): Just error
915 on return type specified for conversion operator.
917 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
919 * typeck2.c (readonly_error): Handle general expressions.
920 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
922 2007-08-06 Dan Hipschman <dsh@google.com>
924 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
925 access function name.
927 2007-08-04 Alfred Minarik <a.minarik@aon.at>
930 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
931 * g++spec.c (lang_specific_driver): Check them.
933 2007-08-06 Paolo Carlini <pcarlini@suse.de>
936 * pt.c (inline_needs_template_parms): Fix comment; change return type
939 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
942 2007-03-26 Dirk Mueller <dmueller@suse.de>
944 * parser.c (cp_parser_member_declaration): Pedwarn
945 about stray semicolons after member declarations.
947 2007-08-02 Lee Millward <lee.millward@gmail.com>
952 * parser.c (cp_parser_asm_definition): Detect and discard asm
953 statements with invalid inputs or outputs.
954 (cp_parser_asm_operand_list): Return error mark node if any
955 of the operands are invalid. Adjust documentation.
957 2007-08-02 Nick Clifton <nickc@redhat.com>
959 * typeck.c: Change copyright header to refer to version 3 of the
960 GNU General Public License and to point readers at the COPYING3
961 file and the FSF's license web page.
962 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
963 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
964 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
965 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
966 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
967 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
968 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
969 name-lookup.h, parser.c: Likewise.
971 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
974 * call.c (magic_varargs_p): Honor the "type generic" attribute.
976 2007-07-30 Paolo Carlini <pcarlini@suse.de>
979 * semantics.c (finish_label_stmt): Reject the __label__
980 extension outside function scopes.
982 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
984 * parser.c (eof_token): Un-constify.
985 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
986 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
989 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
991 * pt.c, tree.c, typeck2.c: Fix comment typos.
993 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
994 Mark Mitchell <mark@codesourcery.com>
997 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
998 hidden due to friend declarations in local classes.
1000 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
1002 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
1003 * cp-tree.def (DECLTYPE_TYPE): New.
1004 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
1005 (dump_type_prefix): Ditto.
1006 (dump_type_suffix): Ditto.
1007 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
1008 * mangle.c (write_type): Handle DECLTYPE_TYPE.
1009 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
1011 (DECLTYPE_TYPE_EXPR): New.
1012 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
1013 (finish_declared_type): Declare.
1014 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
1015 DECLTYPE_TYPE nodes.
1016 (pp_cxx_type_id): Ditto.
1017 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
1018 (tsubst): Substitute into a DECLTYPE_TYPE node.
1019 (tsubst_copy): Ditto.
1020 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
1022 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
1023 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
1024 structural equality (because we can't hash the expressions).
1025 (finish_declared_type): New.
1026 * lex.c (reswords): Add "decltype" keyword.
1027 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
1028 (cp_parser_postfix_expression): Add member_access_only_p to
1029 restrict postfix expression to member access expressions.
1030 (cp_parser_unary_expression): Update call to
1031 cp_parser_postfix_expression to reflect new parameter.
1032 (cp_parser_declared_type): New.
1033 (cp_parser_simple_type_specifier): Parse decltype types.
1035 2007-07-27 Mark Mitchell <mark@codesourcery.com>
1038 * call.c (convert_for_arg_passing): Only widen bitfields to their
1039 declared types if necessary.
1041 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1043 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
1046 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1048 * decl.c (typename_hash, typename_compare): Constify.
1049 * mangle.c (hash_type, compare_type): Likewise.
1050 * pt.c (eq_local_specializations, hash_local_specialization):
1052 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
1053 list_hash): Likewise.
1054 * typeck2.c (pat_compare): Likewise.
1056 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
1058 * method.c (implicitly_declare_fn): Increase alignment if member
1059 function pointer format requires it.
1061 2007-07-24 Paolo Carlini <pcarlini@suse.de>
1064 * typeck.c (check_return_expr): Do not pass a null argument
1067 2007-07-24 Paolo Carlini <pcarlini@suse.de>
1070 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
1073 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
1076 * typeck.c (convert_arguments): Only use default args if we have
1080 * typeck.c (structural_comptypes): No need to check
1081 resolve_typename_type return value here.
1082 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
1083 * pt.c (resolve_typename_type): Follow typename typedefs. Return
1084 original type rather than error_mark_node in case of failure.
1085 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
1086 resolve_typename_type result check.
1087 (cp_parser_direct_declarator, cp_parser_head,
1088 cp_parser_constructor_declarator_p): Likewise.
1090 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
1092 * pt.c (template_parms_variadic_p): Remove.
1093 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
1095 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1098 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
1099 argument to dump_aggr_init_expr_args instead of false.
1101 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
1103 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
1104 canonical types; otherwise, fall back to structural type
1105 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
1106 internal compiler error if the canonical types are wrong.
1108 2007-07-11 Paolo Carlini <pcarlini@suse.de>
1111 * parser.c (cp_parser_make_indirect_declarator): When the
1112 the code argument is ERROR_MARK return cp_error_declarator.
1114 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1117 * decl.c (cxx_init_decl_processing): Don't set
1118 force_align_functions_log.
1119 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
1120 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
1121 FUNCTION_DECL, return its alignment.
1123 2007-07-09 Richard Guenther <rguenther@suse.de>
1125 * decl.c (start_preparsed_function): Do not promote return type.
1127 2007-07-08 Paolo Carlini <pcarlini@suse.de>
1130 * pt.c (unify): Never pass error_mark_node to template_decl_level.
1132 2007-07-07 Mark Mitchell <mark@codesourcery.com>
1135 * pt.c (resolve_overloaded_unification): Robustify. Return a
1137 (type_unification_real): Adjust accordingly.
1139 2007-07-06 Richard Guenther <rguenther@suse.de>
1141 * init.c (build_new_1): Use the correct pointer type.
1142 * typeck2.c (build_m_component_ref): Likewise.
1144 2007-07-05 Mark Mitchell <mark@codesourcery.com>
1147 * init.c (build_zero_init): Always build an initializer for
1149 * typeck2.c (build_functional_cast): Use build_zero_init.
1152 * init.c (build_new_1): Always pass the allocation function to
1153 build_op_delete_call.
1154 * call.c (build_op_delete_call): Handle operator delete with a
1155 variable-argument list. Do not issue an error when no matching
1156 deallocation function is available for a new operator.
1159 * cp-tree.h (any_value_dependent_elements_p): Declare it.
1160 * decl.c (value_dependent_init_p): New function.
1161 (cp_finish_decl): Use it.
1162 * pt.c (value_dependent_expression_p): Use
1163 any_value_dependent_elements_p.
1164 * parser.c (cp_parser_primary_expression): Add comment about
1165 treating dependent qualified names as integral
1166 constant-expressions.
1168 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
1170 * decl.c (build_ptrmemfunc_type): Always use structural equality
1171 tests when comparing pointer-to-member-function types, because the
1172 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
1175 2007-07-03 Mark Mitchell <mark@codesourcery.com>
1177 * init.c (build_new): Tweak comment.
1179 2007-06-29 Dave Brolley <brolley@redhat.com>
1182 * parser.c (cp_parser_new_type_id): Don't reduce a named array
1183 type to its base type and number of elements here.
1184 * init.c (build_new): Call complete_type_or_else to ensure that the
1185 type is complete and to issue a diagnostic if it is not.
1186 (build_new_1): Don't call complete_type_or_else here.
1188 2007-07-03 Richard Guenther <rguenther@suse.de>
1191 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
1194 2007-07-02 Simon Baldwin <simonb@google.com>
1196 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
1197 for inner-style nested forward declarations that don't declare
1200 2007-07-02 Jakub Jelinek <jakub@redhat.com>
1203 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1204 DECL_P in not a variable and appears more than once error messages.
1206 2007-07-01 Ollie Wild <aaw@google.com>
1208 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1209 (select_decl): Remove function.
1210 (unqualified_namespace_lookup): Populate binding by calling
1211 ambiguous_decl. Remove select_decl call.
1212 (lookup_qualified_name): Remove select_decl call.
1213 * decl.c (lookup_and_check_tag): Check for ambiguous references.
1214 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1215 generation when name lookup is ambiguous.
1217 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
1220 * init.c (build_new_1): Use structural equality on the copy of the
1223 2007-06-28 Geoffrey Keating <geoffk@apple.com>
1225 * decl2.c (determine_visibility): Implement
1226 flag_visibility_ms_compat effect on type info.
1227 * decl.c (cxx_init_decl_processing): Implement
1228 global effect of flag_visibility_ms_compat.
1230 2007-06-28 Geoffrey Keating <geoffk@apple.com>
1232 * decl2.c (start_objects): Mark constructor-running function
1235 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
1238 * decl.c (grokdeclarator): Reset friendp for member functions declared
1239 friend of their own class.
1241 2007-06-23 Mark Mitchell <mark@codesourcery.com>
1243 * decl2.c (determine_visibility): Don't look for dllexport here.
1244 (determine_visibility_from_class): Tidy.
1246 2007-06-18 Simon Baldwin <simonb@google.com>
1249 * parser.c (cp_parser_single_declaration): Added check for storage
1250 class other than sc_none in parsed declaration, and a flag to indicate
1251 if the call is part of an explicit template specialization parse.
1252 * (cp_parser_explicit_specialization): Specialization check flag added
1253 to call to cp_parser_single_declaration(), set true.
1254 * (cp_parser_template_declaration_after_export): Specialization check
1255 flag added to call to cp_parser_single_declaration(), set false.
1256 * pt.c (check_explicit_specialization): Added code to copy visiblity
1257 and linkage from the templated function to the explicit specialization.
1259 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1261 * typeck.c (build_binary_op): For templates build the
1262 expression in pieces to avoid the assert in build2_stat.
1263 (get_member_function_from_ptrfunc):
1264 Change over to using POINTER_PLUS_EXPR and convert
1265 the second operand to sizetype.
1266 * typeck2.c (build_m_component_ref): Likewise.
1267 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1268 instead of PLUS_EXPR for pointers.
1269 (build_new_1): Likewise.
1270 (build_vec_delete_1): Likewise.
1271 (build_vec_delete): Likewise.
1272 * class.c (build_base_path): Likewise.
1273 (build_base_path): Likewise.
1274 (convert_to_base_statically): Likewise.
1275 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1276 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1277 instead of PLUS_EXPR.
1278 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1279 instead of PLUS_EXPR for pointers.
1280 * call.c (build_special_member_call): Likewise.
1281 * rtti.c (build_headof): Likewise.
1282 Use sizetype instead of ptrdiff_type_node.
1283 (tinfo_base_init): Create a POINTER_PLUS_EXPR
1284 instead of PLUS_EXPR for pointers.
1285 * except.c (expand_start_catch_block): Do a
1286 NEGATIVE and then a POINTER_PLUS_EXPR instead
1288 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1289 PLUS_EXPR on pointer types over to use
1290 POINTER_PLUS_EXPR and remove the conversion
1291 to the pointer types.
1292 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1293 adding to a pointer type. Use size_int instead of
1294 ssize_int. Convert the index to sizetype before
1295 adding it to the pointer.
1297 2007-06-15 Mark Mitchell <mark@codesourcery.com>
1299 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1300 (DECL_ANON_UNION_VAR_P): New macro.
1301 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
1302 than DECL_VAR_MARKED_P, to keep track of which variables we have
1304 * decl.c (redeclaration_error_message): Complain about redeclaring
1305 anonymous union members at namespace scope.
1306 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1308 2007-06-14 Geoff Keating <geoffk@apple.com>
1310 * decl2.c (determine_visibility): Ensure that functions with
1311 hidden types as parameters are hidden.
1314 * decl2.c (determine_visibility): Remove duplicate code for
1317 2007-06-12 Ian Lance Taylor <iant@google.com>
1320 * init.c (avoid_placement_new_aliasing): New static function.
1321 (build_new_1): Call it.
1323 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1325 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1326 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1328 2007-06-08 Jakub Jelinek <jakub@redhat.com>
1331 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1332 on init, the non-decl cond operand and increment value.
1334 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
1337 * decl.c (check_initializer): Report an error when a brace enclosed
1338 initializer is used for a non-aggregate type in C++98.
1339 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1341 (grokdeclarator): Likewise.
1342 (move_fn_p): Likewise.
1343 * typeck.c (check_return_expr): Likewise.
1344 * call.c (reference_binding): Likewise.
1345 * error.c (cp_cpp_error): Likewise.
1346 * pt.c (check_default_tmpl_args): Likewise.
1348 * lex.c (init_reswords): Likewise.
1349 * parser.c (p_parser_primary_expression): Likewise.
1350 (TOKEN_PRECEDENCE): Likewise.
1351 (cp_parser_init_declarator): Likewise.
1352 (cp_parser_ptr_operator): Likewise.
1353 (cp_parser_parameter_declaration): Likewise.
1354 (cp_parser_enclosed_template_argument_list): Likewise.
1355 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1356 (cp_parser_next_token_ends_template_argument_p): Likewise.
1358 2007-06-04 Simon Baldwin <simonb@google.com>
1360 * decl.c (grokdeclarator): Readability change. Moved case labels
1361 into direct switch statement scope.
1363 2007-06-04 Paolo Carlini <pcarlini@suse.de>
1365 * call.c (convert_like_real): Remove pointless code.
1367 2007-05-31 Mark Mitchell <mark@codesourcery.com>
1369 * decl.c (get_atexit_fn_ptr_type): New function.
1370 (get_atexit_node): Use it.
1371 (start_cleanup_fn): Likewise.
1372 (register_dtor_fn): Use the object's destructor, instead of a
1373 separate cleanup function, where possible.
1374 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1375 (atexit_fn_ptr_type_node): New macro.
1376 * decl2.c (build_cleanup): Use build_address.
1378 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
1380 * typeck.c (build_binary_op): Include types in error.
1382 2007-05-31 Jakub Jelinek <jakub@redhat.com>
1385 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1386 needs runtime initialization.
1388 2007-05-31 Paolo Carlini <pcarlini@suse.de>
1391 * semantics.c (finish_trait_expr): Complete the types.
1393 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
1394 Douglas Gregor <doug.gregor@gmail.com>
1395 Pedro Lamarao <pedro.lamarao@mndfck.org>
1396 Howard Hinnant <howard.hinnant@gmail.com>
1400 * typeck.c (comptypes): Don't consider rvalue and lvalue
1401 reference types to be equivalent.
1402 (check_return_expr): Move from certain lvalues when returning
1404 * decl.c (grokdeclarator): Implement reference collapsing.
1405 (copy_fn_p): Don't consider constructors taking rvalue references
1406 to be copy constructors.
1408 * call.c (conversion): New "rvaluedness_matches_p" member.
1409 (convert_class_to_reference): Require reference type as first
1410 parameter instead of base type.
1411 (reference_binding): Add logic to handle rvalue references.
1412 (implicit_conversion): Update inaccurate comment.
1413 (convert_like_real): Disable creation of temporaries that are
1414 impossible to initialize for types with move constructors.
1415 (build_over_call): Elide move constructors when possible.
1416 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1417 (maybe_handle_ref_bind): Return conversion instead of type node.
1418 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1419 determine preferred conversion sequences.
1420 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1421 (LOOKUP_PREFER_RVALUE): New.
1422 (DECL_MOVE_CONSTRUCTOR_P): New.
1423 (struct cp_declarator): Add "reference" member for reference
1424 types, with new "rvalue_ref" flag.
1425 (cp_build_reference_type): Declare.
1426 (move_fn_p): Declare.
1427 * error.c (dump_type_prefix): Format rvalue reference types
1428 correctly in error messages.
1429 * except.c (build_throw): Move from certain lvalues when
1431 * mangle.c (write_type): Mangle rvalue references differently
1432 than regular references.
1433 * parser.c (make_reference_declarator): Add boolean parameter for
1435 (cp_parser_make_indirect_declarator): New.
1436 (cp_parser_new_declarator_opt): Call
1437 cp_parser_make_indirect_declarator.
1438 (cp_parser_conversion_declarator_opt): Ditto.
1439 (cp_parser_declarator): Ditto.
1440 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1442 * pt.c (tsubst): Implement reference collapsing.
1443 (maybe_adjust_types_for_deduction): Implement special template
1444 parameter deduction rule for rvalue references.
1445 (type_unification_real): Update calls to
1446 maybe_adjust_types_for_deduction.
1447 (try_one_overload): Ditto.
1448 (unify_pack_expansion): Ditto.
1449 * tree.c (lvalue_p_1): Handle rvalue reference types.
1450 (cp_build_reference_type): New.
1452 2007-05-30 Jakub Jelinek <jakub@redhat.com>
1455 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1456 variables that need runtime initialization.
1458 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
1461 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1462 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1463 case POSTDECREMENT_EXPR>): Return the error_mark_node
1464 if either the real or imaginary parts would an
1467 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
1468 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1471 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1472 token is a closing brace, false if there are no tokens left.
1473 (cp_parser_namespace_alias_definition): Only consume the next token if
1474 it is a closing brace.
1476 * parser.c (cp_parser_class_specifier): Likewise.
1478 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1480 * semantics.c (finish_member_declaration): Fix a typo in the
1483 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
1495 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1496 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1497 * pt.c (check_for_bare_parameter_packs): Return bool indicated
1498 whether everything was okay. Fix indentation.
1499 (push_template_decl_real): Check for bare parameter packs in
1500 function parameters; where errors occur, mark the parameter types
1501 with ERROR_MARK_NODEs to avert ICEs.
1502 (coerce_template_parameter_pack): New.
1503 (coerce_template_parms): Moved parameter pack coercion into
1504 coerce_template_parameter_pack, and permit it anywhere in the
1505 template parameter list (not just at the end). Parameter and
1506 argument indices can vary (somewhat) separately now, so add
1507 PARM_IDX and ARG_IDX.
1508 (fn_type_unification): Don't set an argument pack as incomplete if
1509 no argument pack was deduced.
1510 (type_unification_real): If a type parameter is a parameter pack
1511 and has not otherwise been deduced, it will be deduced to an empty
1513 (more_specialized_fn): Use the actual lengths of the argument
1514 lists when comparing against expansions.
1515 * semantics.c (finish_member_declaration): If a field's type has
1516 bare parameter packs, error and set its type to ERROR_MARK_NODE.
1518 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
1521 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1523 2007-05-22 Ollie Wild <aaw@google.com>
1525 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1526 (unqualified_namespace_lookup): Adds check for hidden types.
1528 2007-05-22 Ollie Wild <aaw@google.com>
1530 * decl.c (duplicate_decls): Verify namespace names are unique.
1532 2007-05-21 Mark Mitchell <mark@codesourcery.com>
1534 * decl.c (cxx_maybe_build_cleanup): Handle
1535 __attribute__((cleanup)).
1537 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1539 * cvt.c (cp_convert_and_check): Don't check warnings if the
1542 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1544 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1546 2007-05-14 Paolo Carlini <pcarlini@suse.de>
1549 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1550 type only if is a class type (5.2.8/4).
1552 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1554 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1555 * decl.c (grokdeclarator): Use unsigned_type_for instead of
1556 c_common_unsigned_type.
1558 2007-05-11 Silvius Rus <rus@google.com>
1560 * cp/typeck.c (build_indirect_ref): Add call to
1561 strict_aliasing_warning.
1562 (build_reinterpret_cast_1): Condition call to
1563 strict_aliasing_warning.
1565 2007-05-11 Jan Hubicka <jh@suse.cz>
1567 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1568 * decl2.c (start_objects): ctors and dtors are no longer public.
1569 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1571 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
1573 * typeck.c (build_unary_op): Remove code that used to
1574 handle non lvalue increments/decrements.
1576 2007-05-07 Mike Stump <mrs@apple.com>
1578 * parser.c (check_empty_body): Add.
1579 (cp_parser_iteration_statement): Add call to check_empty_body.
1581 2007-05-05 Geoffrey Keating <geoffk@apple.com>
1584 * mangle.c (write_mangled_name): Mangle static variable names.
1585 (write_unqualified_name): Use local-source-name for
1586 namespace-scope static variables.
1588 2007-05-04 Dirk Mueller <dmueller@suse.de>
1590 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1593 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
1596 * decl2.c (constrain_class_visibility):
1597 Use strip_pointer_or_array_types instead of strip_array_types.
1599 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1602 * decl.c (reshape_init_r): Don't reshape the first element if it
1603 is a pointer to member function.
1605 2007-04-27 Simon Baldwin <simonb@google.com>
1607 * decl.c (grokparms): Changed message format from %qD to %qE.
1609 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1611 * error.c (maybe_warn_variadic_templates): Variadic templates are
1612 now in C++0x, so only warn about them in C++98 mode.
1614 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1617 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1618 integeral types from vectors types.
1620 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1623 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1624 for type dependent OMP_CLAUSE_DECLs.
1626 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1629 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1630 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1631 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1632 * init.c (build_zero_init): Adjust, as
1633 COMPLEX_TYPE is now a SCALAR_TYPE.
1634 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1635 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1637 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1639 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1640 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1641 (trait_expr_value): Adjust.
1643 2007-04-23 Simon Baldwin <simonb@google.com>
1645 * decl.c (grokparms): Added new error for duplicate function
1646 parameters names in function prototypes, to match gcc behavior.
1648 2007-04-23 Jan Hubicka <jh@suse.cz>
1650 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1653 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1655 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1656 instead of checking GIMPLE_STMT_P in chain_next.
1658 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1661 * call.c (convert_for_arg_passing): Convert bitfields to their
1664 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1667 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1669 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1672 * cp/decl2.c (constrain_class_visibility):
1673 Do not warn about the use of anonymous namespace in the main input file.
1675 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1677 * cp-tree.h (current_template_parms): Fix typo in comment.
1679 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1681 * cp-tree.h, error.c: Fix comment typos.
1683 2007-04-13 Jason Merrill <jason@redhat.com>
1686 * call.c (reference_binding): Add c_cast_p parm. If true,
1687 add quals to TO as needed to make it reference-compatible.
1689 2007-04-11 Jan Hubicka <jh@suse.cz>
1691 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1692 that we are not processing template_decl.
1694 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1697 * class.c (build_base_path): Ensure that the converted pointer has
1698 the same cv-qualification as the input.
1700 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1702 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1704 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1706 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1708 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1709 * tree.c (cp_add_pending_fn_decls): Remove.
1710 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1712 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1714 Revert change removing staticp.
1716 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1718 * cp-objcp-common.c (cxx_staticp): Remove.
1719 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1720 * cp-tree.h (cxx_staticp):
1722 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1724 * class.c (check_for_override): Don't remove dllmport attribute
1727 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1730 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1731 type issue error and return early.
1733 2007-03-30 Jason Merrill <jason@redhat.com>
1736 * typeck.c (cp_type_readonly): New fn.
1737 * cp-tree.h: Declare it.
1738 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1739 (cp_finish_decl): Not here.
1741 2007-03-31 Richard Guenther <rguenther@suse.de>
1743 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1746 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1751 * parser.c (declarator_can_be_parameter_pack): New.
1752 (cp_parser_template_parameter): Only parse the `...' if the
1753 declarator can be a parameter pack.
1754 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1756 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1757 types (they could be used as array bounds).
1758 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1759 (tsubst_pack_expansion): Handle failure to expand parameter
1762 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1765 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1766 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1767 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1768 (CLASS_TYPE_NON_UNION_P): Add.
1769 (struct lang_type_class): Add has_complex_dflt.
1770 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1771 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1772 * cp-tree.def: Add TRAIT_EXPR.
1773 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1774 * lex.c (struct resword): Add __has_nothrow_assign,
1775 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1776 __has_trivial_constructor, __has_trivial_copy,
1777 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1778 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1779 __is_pod, __is_polymorphic, __is_union.
1780 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1781 (cp_parser_trait_expr): New.
1782 * semantics.c (finish_trait_expr, trait_expr_value
1783 classtype_has_nothrow_copy_or_assign_p): New.
1784 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1786 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1787 * class.c (check_bases, check_field_decl, check_bases_and_members):
1788 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1789 * pt.c (uses_template_parms, tsubst_copy_and_build,
1790 value_dependent_expression_p, type_dependent_expression_p): Deal with
1792 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1794 2007-03-29 Richard Guenther <rguenther@suse.de>
1796 * tree.c (cp_walk_subtrees): Do not set input_location.
1798 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1801 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1804 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1806 * parser.c (struct cp_parser): Update comment for
1807 greater_than_is_operator_p.
1808 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1809 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1810 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1811 !GREATER_THAN_IS_OPERATOR_P.
1812 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1813 `>>' operators that will become two `>' tokens in C++0x.
1814 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1815 mode, allowing it to terminate default arguments.
1816 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1817 `>>' like two consecutive `>' tokens.
1818 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1819 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1820 ends a template argument.
1822 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1824 * decl.c (redeclaration_error_message): Complain when redeclaring
1825 a friend function with default template arguments (C++0x mode only).
1826 * cp-tree.h (check_default_tmpl_args): Declare.
1827 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1828 template arguments in function templates. Add support for checking
1829 the default template arguments of friend templates.
1830 (push_template_decl_real): Fix call to check_default_tmpl_args.
1831 (type_unification_real): If a template parameter has not been
1832 deduced but provides a default template argument, substitute into
1833 that default template argument.
1834 * parser.c (cp_parser_init_declarator): When declaring (but not
1835 defining!) a function template in C++0x mode, check for default
1838 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1841 * decl.c (grokdeclarator): Deal with cv-qualified function type
1842 typedefs in the same way for member and non-member functions.
1844 2007-03-26 Dirk Mueller <dmueller@suse.de>
1846 * parser.c (cp_parser_member_declaration): Pedwarn
1847 about stray semicolons after member declarations.
1849 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1852 * pt.c (instantiate_decl): Set in_system_header.
1854 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1856 * cp-tree.h (current_tempalte_parms): Improve documentation.
1857 * pt.c (current_template_args): Likewise.
1860 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1861 not consume tokens when failing.
1863 2007-03-22 Jim Wilson <wilson@specifix.com>
1864 Mark Mitchell <mark@codesourcery.com>
1867 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1868 consistent with FROM.
1870 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1872 * error.c (dump_expr): Handle dependent names that designate types.
1873 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1875 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1877 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1879 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1881 * cvt.c (cp_convert_and_check) : Define.
1882 * cp-tree.h (cp_convert_and_check): Declare.
1883 * call.c (convert_conversion_warnings): Rename to
1884 conversion_null_warnings. The warning for floating-point to
1885 integer is handled by convert_and_check in convert_like_real.
1886 (convert_like_real): convert_conversion_warnings was renamed as
1887 conversion_null_warnings.
1888 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1889 overflow and changes of value during conversion.
1891 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1894 * parser.c (cp_parser_statement): If 'namespace' is found, this
1895 only can be a namespace alias definition, so parse it now.
1896 (cp_parser_namespace_alias_definition): if we find an open brace
1897 instead of '=', then this is actually a misplaced namespace
1900 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1903 * decl.c (cxx_init_decl_processing): Move command-line options
1904 processing to c-opts.c.
1906 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1908 * ptree.c (cxx_print_type): Use formatting markup for integers
1909 when printing template parameter index/level/orig level.
1910 (cxx_print_xnode): Ditto.
1911 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1912 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1913 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1915 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1916 rather than a HOST_WIDE_INT.
1917 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1918 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1920 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1921 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1922 IN_BASE_INITIALIZER bool bitfields.
1923 (struct cp_declarator): Make KIND a 4-bit field. Make
1924 PARAMETER_PACK_P a bool bitfield just after KIND.
1925 * pt.c (uses_parameter_packs): Destroy the pointer set.
1926 (make_pack_expansion): Ditto.
1927 (check_for_bare_parameter_packs): Ditto.
1928 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1930 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1933 * call.c (convert_default_arg): Instead of copying the node,
1936 2007-03-15 Dirk Mueller <dmueller@suse.de>
1939 * call.c (convert_conversion_warnings): New..
1940 (convert_like_real): .. factored out from here.
1941 (convert_conversion_warnings): Add warning about
1942 false being converted to NULL in argument passing.
1944 2007-03-14 Dirk Mueller <dmueller@suse.de>
1946 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1947 (finish_do_body): Warn about empty body in do/while statement.
1949 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1951 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1953 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1956 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1959 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1961 * cp/repo.c (init_repo): Initialize random_seed saved options.
1962 (finish_repo): Adjust.
1964 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1967 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1970 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1972 * decl.c (compute_array_index_type): New warning flag warn_vla.
1974 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1977 * call.c (convert_default_arg): Copy non-constant arguments.
1979 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1982 * parser.c (cp_parser_postfix_expression): Disallow compound
1983 literals in constant expressions.
1986 * semantics.c (finish_typeof): Use unlowered_expr_type.
1988 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1991 * cp-tree.h (unlowered_expr_type): New function.
1992 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1993 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1994 (unlowered_expr_type): New function.
1995 (build_unary_op): Disallow predecrements of bool bitfields.
1996 * call.c (build_conditional_expr): Use unlowered_expr_type.
1997 * pt.c (type_unification_real): Likewise.
1999 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
2002 * typeck.c (check_return_expr): Check for bare parameter packs.
2003 (comptypes): Compare template parameter packs and
2004 type pack expansions.
2005 * decl.c (grokdeclarator): Deal with the declaration of function
2007 (grokparms): Verify that the (optional) function parameter pack is
2008 at the end of the parameter list.
2009 (xref_basetypes): Handle pack expansions in the base class.
2010 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
2011 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
2012 (NONTYPE_ARGUMENT_PACK): New.
2013 (TYPE_PACK_EXPANSION): New.
2014 (EXPR_PACK_EXPANSION): New.
2015 (ARGUMENT_PACK_SELECT): New.
2016 * cp-objcp-common.c (cp_tree_size): Compute size of
2017 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
2018 ARGUMENT_PACK_SELECT.
2019 * error.c (dump_template_argument): Print template argument packs.
2020 (dump_template_argument_list): Ditto.
2021 (dump_template_parameter): Dump `...' for template type parameter
2023 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
2024 (dump_parameters): Print function parameter packs.
2025 (dump_template_parms): Print template argument packs.
2026 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
2027 (maybe_warn_variadic_templates): New.
2028 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
2029 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2030 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2032 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
2033 (write_template_arg): Write argument packs as separate arguments.
2034 * cp-tree.h (struct template_parm_index_s): Add flag that
2035 indicates that the template parameter is actually a parameter
2037 (struct tree_argument_pack_select): New.
2038 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
2039 (union lang_tree_node): Add argument_pack_select.
2040 (FUNCTION_PARAMETER_PACK_P): New.
2041 (PACK_EXPANSION_P): New.
2042 (PACK_EXPANSION_PATTERN): New.
2043 (SET_PACK_EXPANSION_PATTERN): New.
2044 (PACK_EXPANSION_PARAMETER_PACKS): New.
2045 (ARGUMENT_PACK_P): New.
2046 (ARGUMENT_PACK_ARGS): New.
2047 (SET_ARGUMENT_PACK_ARGS): New.
2048 (ARGUMENT_PACK_INCOMPLETE_P): New.
2049 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
2050 (TEMPLATE_PARM_PARAMETER_PACK): New.
2051 (TEMPLATE_TYPE_PARAMETER_PACK): New.
2052 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
2053 (ARGUMENT_PACK_SELECT_INDEX): New.
2054 (ARGUMENT_PACK_SELECT_ARG): New.
2055 (struct cp_declarator): Add parameter_pack_p flag.
2056 (maybe_warn_variadic_templates): Declare.
2057 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
2058 indicate a template parameter pack.
2059 (uses_parameter_packs): Declare.
2060 (template_parameter_pack_p): Declare.
2061 (template_parms_variadic_p): Declare.
2062 (make_pack_expansion): Declare.
2063 (check_for_bare_parameter_packs): Declare.
2064 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
2065 sizeof... expressions.
2066 (pp_cxx_expression): Print pack expansions and non-type argument
2068 (pp_cxx_exception_specification): Print pack expansions.
2069 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
2070 (pp_cxx_ctor_initializer): Print pack expansions.
2071 (pp_cxx_type_id): Print pack expansions.
2072 (pp_cxx_template_argument_list): Print argument packs.
2073 (pp_cxx_template_parameter): Print ellipsis for template parameter
2075 * pt.c (comp_template_parms): Compare template parameter packs.
2076 (template_parameter_pack_p): New.
2077 (template_parms_variadic_p): New.
2078 (template_args_variadic_p): New.
2079 (make_ith_pack_parameter_name): New.
2080 (struct find_parameter_pack_data): New.
2081 (find_parameter_packs_r): New.
2082 (uses_parameter_packs): New.
2083 (make_pack_expansion): New.
2084 (check_for_bare_parameter_packs): New.
2085 (expand_template_argument_pack): New.
2086 (reduce_template_parm_level): Propagate parameter pack flag.
2087 (process_template_parm): Add is_parameter_pack parameter to state
2088 when the parameter is actually a parameter pack. Create template
2089 parameter packs when is_parameter_pack is true.
2090 (current_template_args): The argument for a template parameter
2091 pack is an argument pack containing a single pack expansion.
2092 (process_partial_specialization): When checking that non-type
2093 argument expressions do not involve template parameters, loop over
2094 the arguments in argument packs separately.
2095 (push_template_decl_real): Check that the type of the declaration
2096 does not have any bare parameter packs. Check that primary
2097 templates have no more than one parameter pack, and that it comes
2098 at the end of the template parameter list.
2099 (convert_template_argument): Handle coercions for pack expansion
2100 expressions by coercing the pattern then rebuilding the expansion.
2101 (coerce_template_parms): When coercing the arguments for a
2102 variadic template, pack "extra" arguments into an argument pack.
2103 (coerce_template_template_parms): Cannot coerce between parameter
2104 packs and non-pack parameters.
2105 (template_args_equal): Compare PACK_EXPANSION_P expressions.
2106 (comp_template_args): Expand all template arguments packs before
2107 comparing template argument lists.
2108 (mangle_class_name_for_template): Make argument packs as separate
2110 (for_each_template_parm_r): No need to handle BASELINK.
2111 (instantiate_class_template): Handle pack expansions in the base
2113 (tsubst_pack_expansion): New.
2114 (tsubst_template_args): Handle substitutions of argument packs and
2115 pack expansion into template argument lists.
2116 (tsubst_decl): Expand function parameter packs into separate
2117 function parameters.
2118 (tsubst_arg_types): Expand a type pack expansion into separate
2120 (tsubst_exception_specification): Handle pack expansions in
2121 exception specifiers.
2122 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
2123 replacing a template parameter with its argument. If we encounter
2124 a substitution for an argument pack, just return the parameter
2126 (tsubst_copy): sizeof(X...) returns the number of elements in
2127 parameter pack X. See through ARGUMENT_PACK_SELECT when the
2128 PARM_DECL is a parameter pack.
2129 (tsubst_expr): Expression pack expansions and argument packs
2130 cannot show up here; they will all be handled through function
2131 calls, sizeof, and template argument lists.
2132 (tsubst_copy_and_build): sizeof(X...) returns the number of
2133 elements in parameter pack X. Handle pack expansions in TREE_LIST
2134 and CONSTRUCTOR nodes.
2135 (fn_type_unification): Handle "incomplete" explicit template
2136 argument lists that specify some of the arguments for a template
2138 (type_unification_real): Unify arguments against pack expansions.
2139 (template_parm_level_and_index): New, helper function.
2140 (unify_pack_expansion): New.
2141 (unify): Unify argument packs on an argument-by-argument basis,
2142 handling variadic argument packs as well.
2143 (more_specialized_fn): Handle unification of function parameter
2144 packs. All things being equal, prefer non-variadic function
2145 templates to variadic function templates.
2146 (more_specialized_class): Prefer the variadic class template
2147 partial specialization that binds fewer arguments to a parameter
2149 (regenerate_decl_from_template): Expand function parameter packs
2150 into separate parameters.
2151 (instantiate_decl): Ditto.
2152 (tsubst_initializer_list): Handle pack expansions for base-class
2154 (dependent_type_p_r): Determine dependent types in argument packs
2155 and pack expansions.
2156 (value_dependent_expression_p): Determine value-dependence of
2157 non-type argument packs.
2158 (dependent_template_arg_p): Handle argument packs.
2159 * semantics.c (finish_cond): Check for bare parameter packs.
2160 (finish_expr_stmt): Ditto.
2161 (finish_for_expr): Ditto.
2162 (finish_switch_cond): Ditto.
2163 (finish_mem_initializers): Ditto.
2164 * name-lookup.c (arg_assoc_type): Handle pack expansions and
2166 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
2167 * parser.c (make_declarator): Declarator is not an expansion.
2168 (make_pointer_declarator): Transfer parameter pack flag to outer
2170 (make_reference_declarator): Ditto.
2171 (make_ptrmem_declarator): Ditto.
2172 (make_call_declarator): Ditto.
2173 (make_array_declarator): Ditto.
2174 (cp_parser_postfix_expression): Allow pack expansion expressions
2175 in the argument list for a call expression.
2176 (cp_parser_parenthesized_expression_list): Add new parameter
2177 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
2178 into separate arguments."
2179 (cp_parser_new_placement): Allow pack expansion expressions.
2180 (cp_parser_new_initializer): Ditto.
2181 (cp_parser_mem_initializer_list): Allow ellipsis to create a
2182 base-class initializer expansion.
2183 (cp_parser_mem_initializer): Ditto.
2184 (cp_parser_template_parameter_list): Keep track of whether the
2185 template parameter is a template parameter pack.
2186 (cp_parser_template_parameter): Parse the ellipsis to indicate a
2187 template parameter pack.
2188 (cp_parser_type_parameter): Ditto.
2189 (cp_parser_template_argument_list): Parse the ellipsis to indicate
2191 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
2192 this declarator is a parameter pack.
2193 (cp_parser_parameter_declaration): The ellipsis does not end the
2194 parameter declaration, because it might be a parameter pack. Parse
2195 the ellipsis to indicate a parameter pack.
2196 (cp_parser_initializer): Allow pack expansions.
2197 (cp_parser_initializer_list): Allow ellipsis to create an
2198 initializer expansion.
2199 (cp_parser_base_clause): Allow ellipsis to create a base specifier
2201 (cp_parser_type_id_list): Allow ellipsis to create an exception
2202 specifier expansion.
2203 (cp_parser_attribute_list): Don't allow pack expansions.
2204 (cp_parser_functional_cast): Allow pack expansions.
2205 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2206 compute the length of a parameter pack.
2207 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2208 end a template argument.
2209 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2210 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2213 2007-03-09 Dirk Mueller <dmueller@suse.de>
2215 * cp/call.c (build_new_op): Call warn_logical_operator.
2217 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
2220 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2223 * pt.c (any_template_arguments_need_structural_equality_p):
2226 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
2228 * decl.c (grokdeclarator): Disable warnings for anonymous
2231 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
2233 * typeck2.c (readonly_error): Always emit a hard error.
2234 Remove last argument.
2235 * cp-tree.h (readonly_error): Adjust prototype.
2236 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2237 * typeck.c (build_unary_op): Likewise.
2238 (build_modify_expr): Likewise.
2240 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
2243 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2245 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2248 * parser.c (struct cp_parser): New IN_IF_STMT.
2249 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2250 returning if parsing the body of an 'if' statement or issuing an
2251 error and continuing.
2252 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2254 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2256 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
2259 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2262 2007-03-02 Geoffrey Keating <geoffk@apple.com>
2264 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2265 Objective-C++. Don't exit early if -shared-libgcc needs to be
2268 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2270 * typeck.c (common_base_type): Delete unused function.
2272 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2274 * Make-lang.in: Add dummy lang.install-pdf target.
2276 2007-03-01 Simon Baldwin <simonb@google.com>
2279 * decl.c (check_tag_decl): Added new warning for typedef ignored
2280 when it precedes an otherwise valid non-typedef declaration.
2282 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
2284 * typeck.c (build_function_call): Store converted arguments
2285 in a stack-allocated array instead of building a list.
2286 (convert_arguments): Store arguments in the array passed in as an
2287 argument, and return the actual number of arguments.
2288 * call.c (build_call): Delete, and replace with...
2289 (build_call_n, build_call_a): New.
2290 (build_op_delete_call): Rewrite to avoid constructing argument lists.
2291 (build_over_call): Store converted arguments in a stack-allocated
2292 array instead of building a list.
2293 (build_cxx_call): Pass arguments in an array instead of as a list.
2294 (build_java_interface_fn_ref): Rewrite to avoid constructing
2296 * tree.h: Update declarations to reflect above changes.
2297 * method.c (use_thunk): Use a stack-allocated array to hold
2298 the arguments instead of a list.
2299 * rtti.c (throw_bad_cast): Update call to cxx_call.
2300 (throw_bad_typeid): Likewise.
2301 (build_dynamic_cast_1): Likewise.
2302 * init.c (build_builtin_delete_call): Use build_call_n.
2303 * decl.c (expand_static_init): Likewise.
2304 * except.c (cp_protect_cleanup_actions): Likewise.
2305 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2306 (gimplify_must_not_throw_expr): Likewise.
2307 (cxx_omp_apply_fn): Use build_call_a.
2309 2007-02-26 Mark Mitchell <mark@codesourcery.com>
2311 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2312 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2314 2007-02-25 Mark Mitchell <mark@codesourcery.com>
2316 * cp-tree.h (static_ctors): Remove.
2317 * cp-tree.h (static_dtors): Likewise.
2318 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2319 refactoring of tree_map hierarchy.
2320 (decl_shadowed_for_var_insert): Likewise.
2321 * semantics.c (expand_body): Use c_expand_body.
2322 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2323 * decl2.c (static_ctors): Remove.
2324 (static_dtors): Likewise.
2325 (generate_ctor_or_dtor_function): Pass NULL_TREE to
2326 objc_generate_static_init_call. Do not call static_[cd]tors.
2327 (generate_ctor_and_dtor_functions_for_priority): Do not check for
2329 (cp_write_global_declarations): Likewise.
2331 2007-02-23 Richard Guenther <rguenther@suse.de>
2333 * class.c (note_name_declared_in_class): Make declaration
2334 changes meaning a pedwarn.
2336 2007-02-22 Michael Matz <matz@suse.de>
2339 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2340 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2341 dump_function_decl): Guard emitting outer scopes by new flag.
2342 * cp-lang.c (cxx_dwarf_name): New function.
2343 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2344 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2346 (push_template_decl_real, lookup_template_class): Remove calls
2349 2007-02-19 Mark Mitchell <mark@codesourcery.com>
2351 * call.c (build_new_method_call): Ensure that explicit calls of
2352 destructors have type "void".
2354 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2356 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2357 and -Walways-true with -Waddress.
2358 * cvt.c (convert_to_void): Replace unconditional warning with
2361 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2363 * decl.c, tree.c: Fix comment typos.
2365 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2368 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
2369 statement expression if we had an error mark node.
2371 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2372 Brooks Moses <brooks.moses@codesourcery.com>
2373 Lee Millward <lee.millward@codesourcery.com>
2375 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2376 Change class to tcc_vl_exp.
2378 * call.c (build_call): Use build_call_list instead
2380 (build_over_call): Likewise.
2381 (build_new_method_call): Use build_min_non_dep_call_list
2382 instead of build_min_non_dep.
2384 * error.c (dump_call_expr_args): New function.
2385 (dump_aggr_init_expr_args): New function.
2386 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
2387 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2389 * cvt.c (convert_to_void): Use build_call_array instead
2390 of build3; use new AGGR_INIT_EXPR accessor macros.
2392 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2393 instead of TREE_CODE_LENGTH.
2395 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2396 AGGR_INIT_EXPR accessor macros.
2398 * cp-gimplify.c (cp_gimplify_init_expr): Use
2399 AGGR_INIT_EXPR_SLOT to set the slot operand.
2401 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2402 (AGGR_INIT_EXPR_SLOT): New macro.
2403 (AGGR_INIT_EXPR_ARG): New macro.
2404 (aggr_init_expr_nargs): New macro.
2405 (AGGR_INIT_EXPR_ARGP): New macro.
2406 (aggr_init_expr_arg_iterator): New.
2407 (init_aggr_init_expr_arg_iterator): New.
2408 (next_aggr_init_expr_arg): New.
2409 (first_aggr_init_expr_arg): New.
2410 (more_aggr_init_expr_args_p): New.
2411 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2412 (stabilize_aggr_init): New declaration.
2413 (build_min_non_dep_call_list): Likewise.
2415 * tree.c (process_aggr_init_operands): New function.
2416 (build_aggr_init_array) New function.
2417 (build_cplus_new): Update to use new CALL_EXPR and
2418 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2419 build_aggr_init_array.
2420 (build_min_non_dep_call_list) New function.
2421 (build_min_nt): Assert input code parameter is not a variable
2422 length expression class.
2423 (build_min, build_min_non_dep): Likewise.
2424 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2425 to check for equality instead of recursing. Handle tcc_vl_exp
2427 (stabilize_call): Update to only handle CALL_EXPRs, not
2428 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2429 (stabilize_aggr_init): New function.
2430 (stabilize_init): Use it.
2432 * cxx-pretty-print.c (pp_cxx_postfix_expression)
2433 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2434 AGGR_INIT_EXPR accessor macros and argument iterators.
2436 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2437 build_vl_exp. Iterate through the operands, recursively
2438 processing each one.
2439 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2440 CALL_EXPR accessor macros.
2441 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2442 tree code classes. Use TREE_OPERAND_LENGTH instead of
2445 * semantics.c (finish_call_expr): Use build_nt_call_list
2446 instead of build_nt.
2447 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
2448 accessor macros. Use build_call_array to construct the
2449 CALL_EXPR node instead of build3
2451 * decl2.c (build_offset_ref_call_from_tree): Use
2452 build_nt_call_list and build_min_non_dep_call_list instead
2453 of build_min_nt and build_min_non_dep.
2455 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2456 Use build_nt_call_list instead of build_min_nt.
2458 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2461 * call.c (build_conditional_expr): Improve error message.
2463 2007-02-13 Dirk Mueller <dmueller@suse.de>
2465 * friend.c (do_friend): Annotate warning about friend
2466 declarations in templates with OPT_Wnon_template_friend.
2467 Convert informal message from warning() to inform().
2469 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
2470 Mark Mitchell <mark@codesourcery.com>
2473 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2474 instantiations for variables.
2476 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2479 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2480 Check warn_unused_value just once.
2482 2007-02-11 Mark Mitchell <mark@codesourcery.com>
2485 * pt.c (determine_specialization): Use skip_artificial_parms_for.
2486 (fn_type_unificiation): Likewise.
2487 (get_bindings): Likewise.
2489 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
2492 * decl.c (finish_function): Use DECL_REPLACEABLE.
2493 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2495 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2497 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2499 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2501 * decl.c (grokvardecl): Don't error if !have_tls.
2502 (grokdeclarator): Likewise.
2503 * parser.c (cp_parser_omp_threadprivate): Likewise.
2505 2007-02-07 Jakub Jelinek <jakub@redhat.com>
2508 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2509 parameters and result decls in omp clauses.
2510 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2513 2007-02-05 Dirk Mueller <dmueller@suse.de>
2516 * parser.c (cp_parser_class_specifier): Always initialize bases.
2518 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2520 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2521 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2522 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2524 * semantics.c (finish_omp_atomic): Store a whole expression node
2525 in operand 1, and integer_zero_node in operand 0, for dependent
2526 OMP_ATOMIC. Rewrite to make flow easier to understand.
2528 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2530 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2532 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
2534 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2535 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2537 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
2539 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2540 keyword warning to -Wc++0x-compat.
2542 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2544 * decl.c (grokdeclarator): Update documentation.
2546 2007-02-02 Jakub Jelinek <jakub@redhat.com>
2549 * decl.c (grokdeclarator): If __thread is used together with
2550 a storage class other than extern and static, clear thread_p
2551 after issuing diagnostics and fall through to checking the
2554 2007-01-30 Roger Sayle <roger@eyesopen.com>
2556 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2557 calculating the size of an array (to avoid recursive errors).
2559 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2562 * typeck.c (build_binary_op): Fix logic for warning. Move warning
2564 * call.c (convert_like_real): Don't warn when converting to
2567 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2569 * decl.c (pop_label): Replace warning with call to
2570 warn_for_unused_label.
2572 2007-01-28 Andrew Pinski <pinskia@gmail.com>
2575 * semantics.c (finish_pseudo_destructor_expr): Check the
2576 destrutor name by calling check_dtor_name.
2578 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
2580 * lex.c (D_CPP0X): Rename.
2582 (reswords): D_CPP0X -> D_CXX0X.
2583 (init_reswords): Ditto.
2584 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2585 of C++0x keywords as identifiers.
2587 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
2590 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2593 2007-01-23 Ian Lance Taylor <iant@google.com>
2595 * typeck.c (convert_for_assignment): Only warn about a = b = c
2596 when converting to bool.
2598 2007-01-23 Roger Sayle <roger@eyesopen.com>
2600 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2602 * typeck.c (ignore_overflows): Remove the remaining uses of
2603 TREE_CONSTANT_OVERFLOW.
2605 2007-01-20 Jan Hubicka <jh@suse.cz>
2607 * decl2.c (start_objects, start_static_storage_duration_function):
2608 Do not make the functions uninlinable.
2610 2007-01-17 Ian Lance Taylor <iant@google.com>
2612 * class.c (add_method): Call VEC_reserve_exact rather than passing
2613 a negative size to VEC_reserve.
2615 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2618 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2620 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2623 * decl.c (make_typename_type): If the qualified name is not a
2624 type, issue an error.
2625 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2628 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2630 * rtti.c: Include target.h.
2631 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2632 don't emit typeinfo for fundamental types as weak.
2633 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2635 2007-01-08 Richard Guenther <rguenther@suse.de>
2637 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2639 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2641 * call.c (standard_conversion): Pass flag to
2642 vector_types_convertible_p to disallow emission of note.
2643 * typeck.c (convert_for_assignment): Pass flag to
2644 vector_types_convertible_p to allow emission of note.
2645 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2646 to disallow emission of note.
2648 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2651 * typeck.c (build_binary_op): Call overflow_warning if
2652 TREE_OVERFLOW_P is true for the result and not for any of the
2655 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2658 * class.c (add_method): Don't wait until template
2659 instantiation time to complain about duplicate methods.
2661 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2664 * semantics.c (finish_unary_op_expr): Warn only if result
2665 overflowed and operands did not.
2667 2007-01-05 Ian Lance Taylor <iant@google.com>
2669 * typeck.c (build_binary_op): Warn about comparing a non-weak
2672 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2674 * pt.c (tsubst): Propagate the need for structural equality checks
2675 when reducing the level of template parameters.
2677 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2679 * pt.c: Fix a comment typo.
2681 2007-01-02 Ian Lance Taylor <iant@google.com>
2683 * semantics.c (maybe_convert_cond): Optionally warn when using an
2684 assignment as a condition.
2685 * typeck.c (convert_for_assignment): Optionally warn about
2686 assigning the result of an assignment to a bool.
2688 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2690 * pt.c (canonical_template_parms): Correct typo in comment.
2692 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2694 * typeck.c (structural_comptypes): Renamed from "comptypes".
2695 (comptypes): Use canonical type information to perform fast type
2696 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2697 canonical type comparison returns the same results as we would see
2698 from the current, structural check. Support COMPARE_STRUCTURAL
2699 when we need structural checks.
2700 * decl.c (typename_compare): Fix comment.
2701 (build_typename_type): TYPENAME_TYPE nodes require structural
2702 equality checks, because they resolve different based on the
2704 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2705 require structural equality checks (for now).
2706 (build_ptrmemfunc_type): Build the canonical pointer to member
2708 (compute_array_index_type): Whenever we build a new index type
2709 to represent the size of an array in a template, we need to mark
2710 this index type as requiring structural equality. This goes for
2711 arrays with value-dependent sizes with the current ABI, or all
2713 * tree.c (cplus_array_hash): New.
2714 (struct cplus_array_info): New.
2715 (cplus_array_compare): New.
2716 (cplus_array_htab): New.
2717 (build_cplus_array_type_1): Use a hash table to cache the array
2718 types we build. Build the canonical array type for each array
2720 (cp_build_qualified_type_real): When building a cv-qualified array
2721 type, use the hash table of array types and build canonical array
2723 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2724 use structural equality (for now).
2725 * cp-tree.h (COMPARE_STRUCTURAL): New.
2726 * pt.c (canonical_template_parms): New.
2727 (canonical_type_parameter): New.
2728 (process_template_parm): Find the canonical type parameter.
2729 (lookup_template_class): When we have named the primary template
2730 type, set the canonical type for our template class to the primary
2731 template type. If any of the template arguments need structural
2732 equality checks, the template class needs structural equality
2734 (tsubst): When reducing the level of a template template
2735 parameter, we require structural equality tests for the resulting
2736 parameter because its template parameters have not had their types
2737 canonicalized. When reducing a template type parameter, find the
2738 canonical reduced type parameter.
2739 (any_template_arguments_need_structural_equality_p): New.