1 2007-08-28 Richard Guenther <rguenther@suse.de>
3 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
5 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
7 * error.c (dump_expr): Handle COMPLEX_CST.
8 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
9 (pp_cxx_expression): Likewise.
11 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
13 * decl.c (GNU_INLINE_P): New.
14 (duplicate_decls): Handle gnu_inline. Merge attributes and
15 some flags in overriding definitions.
16 (redeclaration_error_message): Handle gnu_inline.
17 (start_preparsed_function): Likewise.
19 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21 * call.c (sufficient_parms_p): Constify.
22 * class.c (same_signature_p): Likewise.
23 * cp-gimplify.c (is_invisiref_parm,
24 cxx_omp_privatize_by_reference): Likewise.
25 * cp-objcp-common.c (has_c_linkage): Likewise.
26 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
27 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
28 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
29 num_artificial_parms_for, comp_template_parms,
30 template_parameter_pack_p, any_dependent_template_arguments_p,
31 any_type_dependent_arguments_p, any_value_dependent_elements_p,
32 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
33 zero_init_p, member_p, cp_lvalue_kind,
34 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
35 varargs_function_p, is_dummy_object, special_function_kind,
36 string_conv_p, type_unknown_p, comp_except_specs, compparms,
37 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
38 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
39 cp_has_mutable_p, at_least_as_qualified_p,
40 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
41 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
42 * except.c (nothrow_libfn_p): Likewise.
43 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
45 * pt.c (comp_template_parms, template_parameter_pack_p,
46 any_type_dependent_arguments_p, any_value_dependent_elements_p,
47 any_dependent_template_arguments_p): Likewise.
48 * repo.c (repo_export_class_p): Likewise.
49 * semantics.c (anon_aggr_type_p): Likewise.
50 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
51 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
52 varargs_function_p, member_p, is_dummy_object, pod_type_p,
53 zero_init_p, special_function_p): Likewise.
54 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
55 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
56 compparms, invalid_nonstatic_memfn_p,
57 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
58 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
59 cp_has_mutable_p, lvalue_or_else): Likewise.
61 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
63 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
64 * cp-objcp-common.c (cp_tree_size): Ditto.
65 * tree.c (cp_walk_subtrees): Ditto
66 * cp-tree.def (TINST_LEVEL): Go away.
67 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
68 move together with other non-tree structs.
69 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
70 (union lang_tree_node): Eliminate tinst_level field.
71 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
72 (current_instantiation, outermost_tinst_level): Return
73 a "struct tinst_level *".
75 * error.c (print_instantiation_partial_context): Change second
76 parameter to a "struct tinst_level *". Replace accessor macros
78 (print_instantiation_full_context): Likewise.
79 * lex.c (in_main_input_context): Likewise.
81 * pt.c (struct pending_templates): New.
82 (pending_templates, last_pending_template): Use it as a type.
83 (current_tinst_level): Change typo to "struct tinst_level *"
84 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
85 (add_pending_template): Construct a "struct pending_template".
86 Replace TINST_LEVEL accessor macros with field access.
87 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
88 (pop_tinst_level): Likewise.
89 (instantiate_pending_templates): Likewise. Factor common code used
90 when an instantiation has been done.
91 (outermost_tinst_level): Replace tree_last with loop.
92 (current_instantiation): Return a "struct tinst_level *".
94 2007-08-24 Ollie Wild <aaw@google.com>
96 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
97 * name-lookup.h (cp_binding_level): Remove vtables member.
99 2007-08-24 Richard Guenther <rguenther@suse.de>
101 * tree.c (cp_cannot_inline_tree_fn): Remove.
102 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
103 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
106 2007-08-24 Jakub Jelinek <jakub@redhat.com>
109 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
110 error_mark_node right away if build_expr_type_conversion
114 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
115 is error_mark_node rather than NULL_TREE.
116 * pt.c (check_explicit_specialization): Likewise.
119 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
120 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
122 2007-08-22 Jason Merrill <jason@redhat.com>
125 * pt.c (outermost_tinst_level): New function.
126 * lex.c (in_main_input_context): New function.
127 * cp-tree.h: Declare it.
128 * decl2.c (constrain_class_visibility): Use it to avoid warning
129 about uses of the anonymous namespace in the main input file.
131 2007-08-21 Jakub Jelinek <jakub@redhat.com>
133 * init.c (build_new_1): Use get_target_expr instead of save_expr.
135 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
138 * class.c (finish_struct_1): Warn when a class has virtual
139 functions and accessible non-virtual destructor.
141 2007-08-20 Richard Guenther <rguenther@suse.de>
145 * call.c (build_new_method_call): Convert initializer to
147 * init.c (build_aggr_init): Do not fiddle with types.
148 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
149 * except.c (build_throw): Do not drop qualifiers for the
151 * typeck.c (get_member_function_from_ptrfunc): Do not
152 fiddle with types, instead convert.
153 (build_ptrmemfunc1): Convert to the target type for
155 (gfc_trans_allocate): Convert result to target type.
156 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
157 pointer-to-member structures shall have alias set zero as well.
159 2007-08-20 Richard Guenther <rguenther@suse.de>
161 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
163 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
164 (nonstatic_local_decl_p): Likewise.
165 * tree.c (cp_auto_var_in_fn_p): Remove.
166 * decl.c (nonstatic_local_decl_p): Remove.
168 2007-08-20 Richard Guenther <rguenther@suse.de>
170 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
172 * tree.h (cp_walk_tree): New define to walk_tree_1 with
173 cp_walk_subtrees lh parameter.
174 (cp_walk_tree_without_duplicates): New define to
175 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
176 * tree.c (count_trees): Call
177 cp_walk_tree_without_duplicates.
178 (verify_stmt_tree): Call cp_walk_tree.
179 (break_out_target_exprs): Likewise.
180 (WALK_SUBTREE): Likewise.
181 * cp-gimplify.c (cp_genericize): Likewise.
182 * cp-pt.c (find_parameter_packs_r): Likewise.
183 (uses_parameter_packs): Likewise.
184 (make_pack_expansion): Likewise.
185 (check_for_bare_parameter_packs): Likewise.
186 (for_each_template_parm): Likewise.
187 * decl.c (check_default_argument): Call
188 cp_walk_tree_without_duplicates.
189 * except.c (build_throw): Likewise.
190 * decl2.c (type_visibility): Likewise.
191 * semantics.c (expand_or_defer_fn): Likewise.
192 (finalize_nrv): Call cp_walk_tree.
194 2007-08-20 Jakub Jelinek <jakub@redhat.com>
197 * init.c (build_new_1): Rename placement_var variable to placement_expr.
198 Initialize it with save_expr rather than get_temp_regvar.
200 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
203 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
206 2007-08-17 Ollie Wild <aaw@google.com>
209 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
210 declarations into appropriate slots for comparison. Fix type
213 2007-08-17 Paolo Carlini <pcarlini@suse.de>
216 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
217 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
219 2007-08-17 Paolo Carlini <pcarlini@suse.de>
222 * parser.c (cp_parser_class_head): Improve error message.
224 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
226 * pt.c (instantiate_decl): Set input_location
227 for the function end.
229 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
231 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
233 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
234 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
235 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
236 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
237 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
238 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
239 * typeck.c (cp_type_quals): Likewise.
240 * typeck2.c (cxx_incomplete_type_diagnostic,
241 cxx_incomplete_type_error): Likewise.
243 2007-08-16 Paolo Carlini <pcarlini@suse.de>
246 * pt.c (tsubst_friend_function): When check_classfn
247 returns error_mark_node likewise return it.
249 2007-08-15 Jakub Jelinek <jakub@redhat.com>
252 * typeck.c (check_return_expr): Don't NRV optimize vars in
254 * decl.c (finish_function): Comment fix.
256 2007-08-15 Paolo Carlini <pcarlini@suse.de>
259 * pt.c (push_template_decl_real): Depending on TYPE_P
260 use either TYPE_CONTEXT or DECL_CONTEXT.
262 2007-08-14 Mark Mitchell <mark@codesourcery.com>
264 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
265 constructors and destructors return this.
267 2007-08-14 Paolo Carlini <pcarlini@suse.de>
270 * decl2.c (check_classfn): Return error_mark_node in case of error;
271 in that case, do not call add_method.
272 * decl.c (start_decl): Deal with check_classfn returning
274 (grokfndecl): Likewise.
275 * pt.c (tsubst_friend_function): Likewise.
277 2007-08-14 Andrew Pinski <pinskia@gmail.com>
280 * typeck.c (build_binary_op): Disallow vector float types with
281 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
283 2007-08-11 Ian Lance Taylor <iant@google.com>
285 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
287 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
289 2007-08-10 Ollie Wild <aaw@google.com>
291 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
293 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
295 (unqualified_namespace_lookup): Fix ambiguous_decl call.
296 (lookup_using_namespace): Fix ambiguous_decl call.
297 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
299 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
301 * call.c (name_as_c_string): Use CONST_CAST.
302 * decl.c (build_decl): Likewise.
303 * parser.c (cp_parser_string_literal): Likewise.
305 2007-08-10 Paolo Carlini <pcarlini@suse.de>
308 * error.c (dump_expr): Consistently use the *_cxx_*
309 variants of the pretty-print functions.
311 2007-08-10 Paolo Carlini <pcarlini@suse.de>
314 * decl.c (check_special_function_return_type): Just error
315 on return type specified for conversion operator.
317 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
319 * typeck2.c (readonly_error): Handle general expressions.
320 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
322 2007-08-06 Dan Hipschman <dsh@google.com>
324 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
325 access function name.
327 2007-08-04 Alfred Minarik <a.minarik@aon.at>
330 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
331 * g++spec.c (lang_specific_driver): Check them.
333 2007-08-06 Paolo Carlini <pcarlini@suse.de>
336 * pt.c (template_class_depth): Fix comment; change return type
339 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
342 2007-03-26 Dirk Mueller <dmueller@suse.de>
344 * parser.c (cp_parser_member_declaration): Pedwarn
345 about stray semicolons after member declarations.
347 2007-08-02 Lee Millward <lee.millward@gmail.com>
352 * parser.c (cp_parser_asm_definition): Detect and discard asm
353 statements with invalid inputs or outputs.
354 (cp_parser_asm_operand_list): Return error mark node if any
355 of the operands are invalid. Adjust documentation.
357 2007-08-02 Nick Clifton <nickc@redhat.com>
359 * typeck.c: Change copyright header to refer to version 3 of the
360 GNU General Public License and to point readers at the COPYING3
361 file and the FSF's license web page.
362 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
363 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
364 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
365 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
366 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
367 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
368 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
369 name-lookup.h, parser.c: Likewise.
371 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
374 * call.c (magic_varargs_p): Honor the "type generic" attribute.
376 2007-07-30 Paolo Carlini <pcarlini@suse.de>
379 * semantics.c (finish_label_stmt): Reject the __label__
380 extension outside function scopes.
382 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
384 * parser.c (eof_token): Un-constify.
385 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
386 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
389 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
391 * pt.c, tree.c, typeck2.c: Fix comment typos.
393 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
394 Mark Mitchell <mark@codesourcery.com>
397 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
398 hidden due to friend declarations in local classes.
400 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
402 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
403 * cp-tree.def (DECLTYPE_TYPE): New.
404 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
405 (dump_type_prefix): Ditto.
406 (dump_type_suffix): Ditto.
407 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
408 * mangle.c (write_type): Handle DECLTYPE_TYPE.
409 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
411 (DECLTYPE_TYPE_EXPR): New.
412 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
413 (finish_declared_type): Declare.
414 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
416 (pp_cxx_type_id): Ditto.
417 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
418 (tsubst): Substitute into a DECLTYPE_TYPE node.
419 (tsubst_copy): Ditto.
420 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
422 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
423 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
424 structural equality (because we can't hash the expressions).
425 (finish_declared_type): New.
426 * lex.c (reswords): Add "decltype" keyword.
427 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
428 (cp_parser_postfix_expression): Add member_access_only_p to
429 restrict postfix expression to member access expressions.
430 (cp_parser_unary_expression): Update call to
431 cp_parser_postfix_expression to reflect new parameter.
432 (cp_parser_declared_type): New.
433 (cp_parser_simple_type_specifier): Parse decltype types.
435 2007-07-27 Mark Mitchell <mark@codesourcery.com>
438 * call.c (convert_for_arg_passing): Only widen bitfields to their
439 declared types if necessary.
441 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
443 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
446 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
448 * decl.c (typename_hash, typename_compare): Constify.
449 * mangle.c (hash_type, compare_type): Likewise.
450 * pt.c (eq_local_specializations, hash_local_specialization):
452 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
453 list_hash): Likewise.
454 * typeck2.c (pat_compare): Likewise.
456 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
458 * method.c (implicitly_declare_fn): Increase alignment if member
459 function pointer format requires it.
461 2007-07-24 Paolo Carlini <pcarlini@suse.de>
464 * typeck.c (check_return_expr): Do not pass a null argument
467 2007-07-24 Paolo Carlini <pcarlini@suse.de>
470 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
473 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
476 * typeck.c (convert_arguments): Only use default args if we have
480 * typeck.c (structural_comptypes): No need to check
481 resolve_typename_type return value here.
482 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
483 * pt.c (resolve_typename_type): Follow typename typedefs. Return
484 original type rather than error_mark_node in case of failure.
485 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
486 resolve_typename_type result check.
487 (cp_parser_direct_declarator, cp_parser_head,
488 cp_parser_constructor_declarator_p): Likewise.
490 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
492 * pt.c (template_parms_variadic_p): Remove.
493 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
495 2007-07-12 Jakub Jelinek <jakub@redhat.com>
498 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
499 argument to dump_aggr_init_expr_args instead of false.
501 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
503 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
504 canonical types; otherwise, fall back to structural type
505 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
506 internal compiler error if the canonical types are wrong.
508 2007-07-11 Paolo Carlini <pcarlini@suse.de>
511 * parser.c (cp_parser_make_indirect_declarator): When the
512 the code argument is ERROR_MARK return cp_error_declarator.
514 2007-07-09 Geoffrey Keating <geoffk@apple.com>
517 * decl.c (cxx_init_decl_processing): Don't set
518 force_align_functions_log.
519 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
520 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
521 FUNCTION_DECL, return its alignment.
523 2007-07-09 Richard Guenther <rguenther@suse.de>
525 * decl.c (start_preparsed_function): Do not promote return type.
527 2007-07-08 Paolo Carlini <pcarlini@suse.de>
530 * pt.c (unify): Never pass error_mark_node to template_decl_level.
532 2007-07-07 Mark Mitchell <mark@codesourcery.com>
535 * pt.c (resolve_overloaded_unification): Robustify. Return a
537 (type_unification_real): Adjust accordingly.
539 2007-07-06 Richard Guenther <rguenther@suse.de>
541 * init.c (build_new_1): Use the correct pointer type.
542 * typeck2.c (build_m_component_ref): Likewise.
544 2007-07-05 Mark Mitchell <mark@codesourcery.com>
547 * init.c (build_zero_init): Always build an initializer for
549 * typeck2.c (build_functional_cast): Use build_zero_init.
552 * init.c (build_new_1): Always pass the allocation function to
553 build_op_delete_call.
554 * call.c (build_op_delete_call): Handle operator delete with a
555 variable-argument list. Do not issue an error when no matching
556 deallocation function is available for a new operator.
559 * cp-tree.h (any_value_dependent_elements_p): Declare it.
560 * decl.c (value_dependent_init_p): New function.
561 (cp_finish_decl): Use it.
562 * pt.c (value_dependent_expression_p): Use
563 any_value_dependent_elements_p.
564 * parser.c (cp_parser_primary_expression): Add comment about
565 treating dependent qualified names as integral
566 constant-expressions.
568 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
570 * decl.c (build_ptrmemfunc_type): Always use structural equality
571 tests when comparing pointer-to-member-function types, because the
572 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
575 2007-07-03 Mark Mitchell <mark@codesourcery.com>
577 * init.c (build_new): Tweak comment.
579 2007-06-29 Dave Brolley <brolley@redhat.com>
582 * parser.c (cp_parser_new_type_id): Don't reduce a named array
583 type to its base type and number of elements here.
584 * init.c (build_new): Call complete_type_or_else to ensure that the
585 type is complete and to issue a diagnostic if it is not.
586 (build_new_1): Don't call complete_type_or_else here.
588 2007-07-03 Richard Guenther <rguenther@suse.de>
591 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
594 2007-07-02 Simon Baldwin <simonb@google.com>
596 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
597 for inner-style nested forward declarations that don't declare
600 2007-07-02 Jakub Jelinek <jakub@redhat.com>
603 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
604 DECL_P in not a variable and appears more than once error messages.
606 2007-07-01 Ollie Wild <aaw@google.com>
608 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
609 (select_decl): Remove function.
610 (unqualified_namespace_lookup): Populate binding by calling
611 ambiguous_decl. Remove select_decl call.
612 (lookup_qualified_name): Remove select_decl call.
613 * decl.c (lookup_and_check_tag): Check for ambiguous references.
614 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
615 generation when name lookup is ambiguous.
617 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
620 * init.c (build_new_1): Use structural equality on the copy of the
623 2007-06-28 Geoffrey Keating <geoffk@apple.com>
625 * decl2.c (determine_visibility): Implement
626 flag_visibility_ms_compat effect on type info.
627 * decl.c (cxx_init_decl_processing): Implement
628 global effect of flag_visibility_ms_compat.
630 2007-06-28 Geoffrey Keating <geoffk@apple.com>
632 * decl2.c (start_objects): Mark constructor-running function
635 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
638 * decl.c (grokdeclarator): Reset friendp for member functions declared
639 friend of their own class.
641 2007-06-23 Mark Mitchell <mark@codesourcery.com>
643 * decl2.c (determine_visibility): Don't look for dllexport here.
644 (determine_visibility_from_class): Tidy.
646 2007-06-18 Simon Baldwin <simonb@google.com>
649 * parser.c (cp_parser_single_declaration): Added check for storage
650 class other than sc_none in parsed declaration, and a flag to indicate
651 if the call is part of an explicit template specialization parse.
652 * (cp_parser_explicit_specialization): Specialization check flag added
653 to call to cp_parser_single_declaration(), set true.
654 * (cp_parser_template_declaration_after_export): Specialization check
655 flag added to call to cp_parser_single_declaration(), set false.
656 * pt.c (check_explicit_specialization): Added code to copy visiblity
657 and linkage from the templated function to the explicit specialization.
659 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
661 * typeck.c (build_binary_op): For templates build the
662 expression in pieces to avoid the assert in build2_stat.
663 (get_member_function_from_ptrfunc):
664 Change over to using POINTER_PLUS_EXPR and convert
665 the second operand to sizetype.
666 * typeck2.c (build_m_component_ref): Likewise.
667 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
668 instead of PLUS_EXPR for pointers.
669 (build_new_1): Likewise.
670 (build_vec_delete_1): Likewise.
671 (build_vec_delete): Likewise.
672 * class.c (build_base_path): Likewise.
673 (build_base_path): Likewise.
674 (convert_to_base_statically): Likewise.
675 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
676 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
677 instead of PLUS_EXPR.
678 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
679 instead of PLUS_EXPR for pointers.
680 * call.c (build_special_member_call): Likewise.
681 * rtti.c (build_headof): Likewise.
682 Use sizetype instead of ptrdiff_type_node.
683 (tinfo_base_init): Create a POINTER_PLUS_EXPR
684 instead of PLUS_EXPR for pointers.
685 * except.c (expand_start_catch_block): Do a
686 NEGATIVE and then a POINTER_PLUS_EXPR instead
688 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
689 PLUS_EXPR on pointer types over to use
690 POINTER_PLUS_EXPR and remove the conversion
691 to the pointer types.
692 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
693 adding to a pointer type. Use size_int instead of
694 ssize_int. Convert the index to sizetype before
695 adding it to the pointer.
697 2007-06-15 Mark Mitchell <mark@codesourcery.com>
699 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
700 (DECL_ANON_UNION_VAR_P): New macro.
701 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
702 than DECL_VAR_MARKED_P, to keep track of which variables we have
704 * decl.c (redeclaration_error_message): Complain about redeclaring
705 anonymous union members at namespace scope.
706 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
708 2007-06-14 Geoff Keating <geoffk@apple.com>
710 * decl2.c (determine_visibility): Ensure that functions with
711 hidden types as parameters are hidden.
714 * decl2.c (determine_visibility): Remove duplicate code for
717 2007-06-12 Ian Lance Taylor <iant@google.com>
720 * init.c (avoid_placement_new_aliasing): New static function.
721 (build_new_1): Call it.
723 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
725 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
726 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
728 2007-06-08 Jakub Jelinek <jakub@redhat.com>
731 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
732 on init, the non-decl cond operand and increment value.
734 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
737 * decl.c (check_initializer): Report an error when a brace enclosed
738 initializer is used for a non-aggregate type in C++98.
739 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
741 (grokdeclarator): Likewise.
742 (move_fn_p): Likewise.
743 * typeck.c (check_return_expr): Likewise.
744 * call.c (reference_binding): Likewise.
745 * error.c (cp_cpp_error): Likewise.
746 * pt.c (check_default_tmpl_args): Likewise.
748 * lex.c (init_reswords): Likewise.
749 * parser.c (p_parser_primary_expression): Likewise.
750 (TOKEN_PRECEDENCE): Likewise.
751 (cp_parser_init_declarator): Likewise.
752 (cp_parser_ptr_operator): Likewise.
753 (cp_parser_parameter_declaration): Likewise.
754 (cp_parser_enclosed_template_argument_list): Likewise.
755 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
756 (cp_parser_next_token_ends_template_argument_p): Likewise.
758 2007-06-04 Simon Baldwin <simonb@google.com>
760 * decl.c (grokdeclarator): Readability change. Moved case labels
761 into direct switch statement scope.
763 2007-06-04 Paolo Carlini <pcarlini@suse.de>
765 * call.c (convert_like_real): Remove pointless code.
767 2007-05-31 Mark Mitchell <mark@codesourcery.com>
769 * decl.c (get_atexit_fn_ptr_type): New function.
770 (get_atexit_node): Use it.
771 (start_cleanup_fn): Likewise.
772 (register_dtor_fn): Use the object's destructor, instead of a
773 separate cleanup function, where possible.
774 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
775 (atexit_fn_ptr_type_node): New macro.
776 * decl2.c (build_cleanup): Use build_address.
778 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
780 * typeck.c (build_binary_op): Include types in error.
782 2007-05-31 Jakub Jelinek <jakub@redhat.com>
785 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
786 needs runtime initialization.
788 2007-05-31 Paolo Carlini <pcarlini@suse.de>
791 * semantics.c (finish_trait_expr): Complete the types.
793 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
794 Douglas Gregor <doug.gregor@gmail.com>
795 Pedro Lamarao <pedro.lamarao@mndfck.org>
796 Howard Hinnant <howard.hinnant@gmail.com>
800 * typeck.c (comptypes): Don't consider rvalue and lvalue
801 reference types to be equivalent.
802 (check_return_expr): Move from certain lvalues when returning
804 * decl.c (grokdeclarator): Implement reference collapsing.
805 (copy_fn_p): Don't consider constructors taking rvalue references
806 to be copy constructors.
808 * call.c (conversion): New "rvaluedness_matches_p" member.
809 (convert_class_to_reference): Require reference type as first
810 parameter instead of base type.
811 (reference_binding): Add logic to handle rvalue references.
812 (implicit_conversion): Update inaccurate comment.
813 (convert_like_real): Disable creation of temporaries that are
814 impossible to initialize for types with move constructors.
815 (build_over_call): Elide move constructors when possible.
816 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
817 (maybe_handle_ref_bind): Return conversion instead of type node.
818 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
819 determine preferred conversion sequences.
820 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
821 (LOOKUP_PREFER_RVALUE): New.
822 (DECL_MOVE_CONSTRUCTOR_P): New.
823 (struct cp_declarator): Add "reference" member for reference
824 types, with new "rvalue_ref" flag.
825 (cp_build_reference_type): Declare.
826 (move_fn_p): Declare.
827 * error.c (dump_type_prefix): Format rvalue reference types
828 correctly in error messages.
829 * except.c (build_throw): Move from certain lvalues when
831 * mangle.c (write_type): Mangle rvalue references differently
832 than regular references.
833 * parser.c (make_reference_declarator): Add boolean parameter for
835 (cp_parser_make_indirect_declarator): New.
836 (cp_parser_new_declarator_opt): Call
837 cp_parser_make_indirect_declarator.
838 (cp_parser_conversion_declarator_opt): Ditto.
839 (cp_parser_declarator): Ditto.
840 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
842 * pt.c (tsubst): Implement reference collapsing.
843 (maybe_adjust_types_for_deduction): Implement special template
844 parameter deduction rule for rvalue references.
845 (type_unification_real): Update calls to
846 maybe_adjust_types_for_deduction.
847 (try_one_overload): Ditto.
848 (unify_pack_expansion): Ditto.
849 * tree.c (lvalue_p_1): Handle rvalue reference types.
850 (cp_build_reference_type): New.
852 2007-05-30 Jakub Jelinek <jakub@redhat.com>
855 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
856 variables that need runtime initialization.
858 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
861 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
862 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
863 case POSTDECREMENT_EXPR>): Return the error_mark_node
864 if either the real or imaginary parts would an
867 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
868 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
871 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
872 token is a closing brace, false if there are no tokens left.
873 (cp_parser_namespace_alias_definition): Only consume the next token if
874 it is a closing brace.
876 * parser.c (cp_parser_class_specifier): Likewise.
878 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
880 * semantics.c (finish_member_declaration): Fix a typo in the
883 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
895 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
896 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
897 * pt.c (check_for_bare_parameter_packs): Return bool indicated
898 whether everything was okay. Fix indentation.
899 (push_template_decl_real): Check for bare parameter packs in
900 function parameters; where errors occur, mark the parameter types
901 with ERROR_MARK_NODEs to avert ICEs.
902 (coerce_template_parameter_pack): New.
903 (coerce_template_parms): Moved parameter pack coercion into
904 coerce_template_parameter_pack, and permit it anywhere in the
905 template parameter list (not just at the end). Parameter and
906 argument indices can vary (somewhat) separately now, so add
907 PARM_IDX and ARG_IDX.
908 (fn_type_unification): Don't set an argument pack as incomplete if
909 no argument pack was deduced.
910 (type_unification_real): If a type parameter is a parameter pack
911 and has not otherwise been deduced, it will be deduced to an empty
913 (more_specialized_fn): Use the actual lengths of the argument
914 lists when comparing against expansions.
915 * semantics.c (finish_member_declaration): If a field's type has
916 bare parameter packs, error and set its type to ERROR_MARK_NODE.
918 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
921 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
923 2007-05-22 Ollie Wild <aaw@google.com>
925 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
926 (unqualified_namespace_lookup): Adds check for hidden types.
928 2007-05-22 Ollie Wild <aaw@google.com>
930 * decl.c (duplicate_decls): Verify namespace names are unique.
932 2007-05-21 Mark Mitchell <mark@codesourcery.com>
934 * decl.c (cxx_maybe_build_cleanup): Handle
935 __attribute__((cleanup)).
937 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
939 * cvt.c (cp_convert_and_check): Don't check warnings if the
942 2007-05-18 Geoffrey Keating <geoffk@apple.com>
944 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
946 2007-05-14 Paolo Carlini <pcarlini@suse.de>
949 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
950 type only if is a class type (5.2.8/4).
952 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
954 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
955 * decl.c (grokdeclarator): Use unsigned_type_for instead of
956 c_common_unsigned_type.
958 2007-05-11 Silvius Rus <rus@google.com>
960 * cp/typeck.c (build_indirect_ref): Add call to
961 strict_aliasing_warning.
962 (build_reinterpret_cast_1): Condition call to
963 strict_aliasing_warning.
965 2007-05-11 Jan Hubicka <jh@suse.cz>
967 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
968 * decl2.c (start_objects): ctors and dtors are no longer public.
969 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
971 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
973 * typeck.c (build_unary_op): Remove code that used to
974 handle non lvalue increments/decrements.
976 2007-05-07 Mike Stump <mrs@apple.com>
978 * parser.c (check_empty_body): Add.
979 (cp_parser_iteration_statement): Add call to check_empty_body.
981 2007-05-05 Geoffrey Keating <geoffk@apple.com>
984 * mangle.c (write_mangled_name): Mangle static variable names.
985 (write_unqualified_name): Use local-source-name for
986 namespace-scope static variables.
988 2007-05-04 Dirk Mueller <dmueller@suse.de>
990 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
993 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
996 * decl2.c (constrain_class_visibility):
997 Use strip_pointer_or_array_types instead of strip_array_types.
999 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1002 * decl.c (reshape_init_r): Don't reshape the first element if it
1003 is a pointer to member function.
1005 2007-04-27 Simon Baldwin <simonb@google.com>
1007 * decl.c (grokparms): Changed message format from %qD to %qE.
1009 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1011 * error.c (maybe_warn_variadic_templates): Variadic templates are
1012 now in C++0x, so only warn about them in C++98 mode.
1014 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1017 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1018 integeral types from vectors types.
1020 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1023 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1024 for type dependent OMP_CLAUSE_DECLs.
1026 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1029 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1030 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1031 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1032 * init.c (build_zero_init): Adjust, as
1033 COMPLEX_TYPE is now a SCALAR_TYPE.
1034 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1035 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1037 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1039 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1040 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1041 (trait_expr_value): Adjust.
1043 2007-04-23 Simon Baldwin <simonb@google.com>
1045 * decl.c (grokparms): Added new error for duplicate function
1046 parameters names in function prototypes, to match gcc behavior.
1048 2007-04-23 Jan Hubicka <jh@suse.cz>
1050 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1053 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1055 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1056 instead of checking GIMPLE_STMT_P in chain_next.
1058 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1061 * call.c (convert_for_arg_passing): Convert bitfields to their
1064 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1067 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1069 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1072 * cp/decl2.c (constrain_class_visibility):
1073 Do not warn about the use of anonymous namespace in the main input file.
1075 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1077 * cp-tree.h (current_template_parms): Fix typo in comment.
1079 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1081 * cp-tree.h, error.c: Fix comment typos.
1083 2007-04-13 Jason Merrill <jason@redhat.com>
1086 * call.c (reference_binding): Add c_cast_p parm. If true,
1087 add quals to TO as needed to make it reference-compatible.
1089 2007-04-11 Jan Hubicka <jh@suse.cz>
1091 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1092 that we are not processing template_decl.
1094 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1097 * class.c (build_base_path): Ensure that the converted pointer has
1098 the same cv-qualification as the input.
1100 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1102 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1104 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1106 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1108 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1109 * tree.c (cp_add_pending_fn_decls): Remove.
1110 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1112 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1114 Revert change removing staticp.
1116 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1118 * cp-objcp-common.c (cxx_staticp): Remove.
1119 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1120 * cp-tree.h (cxx_staticp):
1122 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1124 * class.c (check_for_override): Don't remove dllmport attribute
1127 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1130 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1131 type issue error and return early.
1133 2007-03-30 Jason Merrill <jason@redhat.com>
1136 * typeck.c (cp_type_readonly): New fn.
1137 * cp-tree.h: Declare it.
1138 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1139 (cp_finish_decl): Not here.
1141 2007-03-31 Richard Guenther <rguenther@suse.de>
1143 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1146 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1151 * parser.c (declarator_can_be_parameter_pack): New.
1152 (cp_parser_template_parameter): Only parse the `...' if the
1153 declarator can be a parameter pack.
1154 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1156 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1157 types (they could be used as array bounds).
1158 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1159 (tsubst_pack_expansion): Handle failure to expand parameter
1162 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1165 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1166 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1167 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1168 (CLASS_TYPE_NON_UNION_P): Add.
1169 (struct lang_type_class): Add has_complex_dflt.
1170 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1171 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1172 * cp-tree.def: Add TRAIT_EXPR.
1173 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1174 * lex.c (struct resword): Add __has_nothrow_assign,
1175 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1176 __has_trivial_constructor, __has_trivial_copy,
1177 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1178 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1179 __is_pod, __is_polymorphic, __is_union.
1180 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1181 (cp_parser_trait_expr): New.
1182 * semantics.c (finish_trait_expr, trait_expr_value
1183 classtype_has_nothrow_copy_or_assign_p): New.
1184 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1186 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1187 * class.c (check_bases, check_field_decl, check_bases_and_members):
1188 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1189 * pt.c (uses_template_parms, tsubst_copy_and_build,
1190 value_dependent_expression_p, type_dependent_expression_p): Deal with
1192 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1194 2007-03-29 Richard Guenther <rguenther@suse.de>
1196 * tree.c (cp_walk_subtrees): Do not set input_location.
1198 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1201 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1204 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1206 * parser.c (struct cp_parser): Update comment for
1207 greater_than_is_operator_p.
1208 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1209 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1210 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1211 !GREATER_THAN_IS_OPERATOR_P.
1212 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1213 `>>' operators that will become two `>' tokens in C++0x.
1214 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1215 mode, allowing it to terminate default arguments.
1216 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1217 `>>' like two consecutive `>' tokens.
1218 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1219 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1220 ends a template argument.
1222 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1224 * decl.c (redeclaration_error_message): Complain when redeclaring
1225 a friend function with default template arguments (C++0x mode only).
1226 * cp-tree.h (check_default_tmpl_args): Declare.
1227 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1228 template arguments in function templates. Add support for checking
1229 the default template arguments of friend templates.
1230 (push_template_decl_real): Fix call to check_default_tmpl_args.
1231 (type_unification_real): If a template parameter has not been
1232 deduced but provides a default template argument, substitute into
1233 that default template argument.
1234 * parser.c (cp_parser_init_declarator): When declaring (but not
1235 defining!) a function template in C++0x mode, check for default
1238 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1241 * decl.c (grokdeclarator): Deal with cv-qualified function type
1242 typedefs in the same way for member and non-member functions.
1244 2007-03-26 Dirk Mueller <dmueller@suse.de>
1246 * parser.c (cp_parser_member_declaration): Pedwarn
1247 about stray semicolons after member declarations.
1249 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1252 * pt.c (instantiate_decl): Set in_system_header.
1254 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1256 * cp-tree.h (current_tempalte_parms): Improve documentation.
1257 * pt.c (current_template_args): Likewise.
1260 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1261 not consume tokens when failing.
1263 2007-03-22 Jim Wilson <wilson@specifix.com>
1264 Mark Mitchell <mark@codesourcery.com>
1267 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1268 consistent with FROM.
1270 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1272 * error.c (dump_expr): Handle dependent names that designate types.
1273 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1275 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1277 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1279 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1281 * cvt.c (cp_convert_and_check) : Define.
1282 * cp-tree.h (cp_convert_and_check): Declare.
1283 * call.c (convert_conversion_warnings): Rename to
1284 conversion_null_warnings. The warning for floating-point to
1285 integer is handled by convert_and_check in convert_like_real.
1286 (convert_like_real): convert_conversion_warnings was renamed as
1287 conversion_null_warnings.
1288 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1289 overflow and changes of value during conversion.
1291 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1294 * parser.c (cp_parser_statement): If 'namespace' is found, this
1295 only can be a namespace alias definition, so parse it now.
1296 (cp_parser_namespace_alias_definition): if we find an open brace
1297 instead of '=', then this is actually a misplaced namespace
1300 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1303 * decl.c (cxx_init_decl_processing): Move command-line options
1304 processing to c-opts.c.
1306 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1308 * ptree.c (cxx_print_type): Use formatting markup for integers
1309 when printing template parameter index/level/orig level.
1310 (cxx_print_xnode): Ditto.
1311 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1312 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1313 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1315 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1316 rather than a HOST_WIDE_INT.
1317 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1318 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1320 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1321 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1322 IN_BASE_INITIALIZER bool bitfields.
1323 (struct cp_declarator): Make KIND a 4-bit field. Make
1324 PARAMETER_PACK_P a bool bitfield just after KIND.
1325 * pt.c (uses_parameter_packs): Destroy the pointer set.
1326 (make_pack_expansion): Ditto.
1327 (check_for_bare_parameter_packs): Ditto.
1328 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1330 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1333 * call.c (convert_default_arg): Instead of copying the node,
1336 2007-03-15 Dirk Mueller <dmueller@suse.de>
1339 * call.c (convert_conversion_warnings): New..
1340 (convert_like_real): .. factored out from here.
1341 (convert_conversion_warnings): Add warning about
1342 false being converted to NULL in argument passing.
1344 2007-03-14 Dirk Mueller <dmueller@suse.de>
1346 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1347 (finish_do_body): Warn about empty body in do/while statement.
1349 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1351 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1353 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1356 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1359 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1361 * cp/repo.c (init_repo): Initialize random_seed saved options.
1362 (finish_repo): Adjust.
1364 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1367 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1370 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1372 * decl.c (compute_array_index_type): New warning flag warn_vla.
1374 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1377 * call.c (convert_default_arg): Copy non-constant arguments.
1379 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1382 * parser.c (cp_parser_postfix_expression): Disallow compound
1383 literals in constant expressions.
1386 * semantics.c (finish_typeof): Use unlowered_expr_type.
1388 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1391 * cp-tree.h (unlowered_expr_type): New function.
1392 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1393 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1394 (unlowered_expr_type): New function.
1395 (build_unary_op): Disallow predecrements of bool bitfields.
1396 * call.c (build_conditional_expr): Use unlowered_expr_type.
1397 * pt.c (type_unification_real): Likewise.
1399 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1402 * typeck.c (check_return_expr): Check for bare parameter packs.
1403 (comptypes): Compare template parameter packs and
1404 type pack expansions.
1405 * decl.c (grokdeclarator): Deal with the declaration of function
1407 (grokparms): Verify that the (optional) function parameter pack is
1408 at the end of the parameter list.
1409 (xref_basetypes): Handle pack expansions in the base class.
1410 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1411 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1412 (NONTYPE_ARGUMENT_PACK): New.
1413 (TYPE_PACK_EXPANSION): New.
1414 (EXPR_PACK_EXPANSION): New.
1415 (ARGUMENT_PACK_SELECT): New.
1416 * cp-objcp-common.c (cp_tree_size): Compute size of
1417 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1418 ARGUMENT_PACK_SELECT.
1419 * error.c (dump_template_argument): Print template argument packs.
1420 (dump_template_argument_list): Ditto.
1421 (dump_template_parameter): Dump `...' for template type parameter
1423 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1424 (dump_parameters): Print function parameter packs.
1425 (dump_template_parms): Print template argument packs.
1426 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1427 (maybe_warn_variadic_templates): New.
1428 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1429 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1430 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1432 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1433 (write_template_arg): Write argument packs as separate arguments.
1434 * cp-tree.h (struct template_parm_index_s): Add flag that
1435 indicates that the template parameter is actually a parameter
1437 (struct tree_argument_pack_select): New.
1438 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1439 (union lang_tree_node): Add argument_pack_select.
1440 (FUNCTION_PARAMETER_PACK_P): New.
1441 (PACK_EXPANSION_P): New.
1442 (PACK_EXPANSION_PATTERN): New.
1443 (SET_PACK_EXPANSION_PATTERN): New.
1444 (PACK_EXPANSION_PARAMETER_PACKS): New.
1445 (ARGUMENT_PACK_P): New.
1446 (ARGUMENT_PACK_ARGS): New.
1447 (SET_ARGUMENT_PACK_ARGS): New.
1448 (ARGUMENT_PACK_INCOMPLETE_P): New.
1449 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1450 (TEMPLATE_PARM_PARAMETER_PACK): New.
1451 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1452 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1453 (ARGUMENT_PACK_SELECT_INDEX): New.
1454 (ARGUMENT_PACK_SELECT_ARG): New.
1455 (struct cp_declarator): Add parameter_pack_p flag.
1456 (maybe_warn_variadic_templates): Declare.
1457 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1458 indicate a template parameter pack.
1459 (uses_parameter_packs): Declare.
1460 (template_parameter_pack_p): Declare.
1461 (template_parms_variadic_p): Declare.
1462 (make_pack_expansion): Declare.
1463 (check_for_bare_parameter_packs): Declare.
1464 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1465 sizeof... expressions.
1466 (pp_cxx_expression): Print pack expansions and non-type argument
1468 (pp_cxx_exception_specification): Print pack expansions.
1469 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1470 (pp_cxx_ctor_initializer): Print pack expansions.
1471 (pp_cxx_type_id): Print pack expansions.
1472 (pp_cxx_template_argument_list): Print argument packs.
1473 (pp_cxx_template_parameter): Print ellipsis for template parameter
1475 * pt.c (comp_template_parms): Compare template parameter packs.
1476 (template_parameter_pack_p): New.
1477 (template_parms_variadic_p): New.
1478 (template_args_variadic_p): New.
1479 (make_ith_pack_parameter_name): New.
1480 (struct find_parameter_pack_data): New.
1481 (find_parameter_packs_r): New.
1482 (uses_parameter_packs): New.
1483 (make_pack_expansion): New.
1484 (check_for_bare_parameter_packs): New.
1485 (expand_template_argument_pack): New.
1486 (reduce_template_parm_level): Propagate parameter pack flag.
1487 (process_template_parm): Add is_parameter_pack parameter to state
1488 when the parameter is actually a parameter pack. Create template
1489 parameter packs when is_parameter_pack is true.
1490 (current_template_args): The argument for a template parameter
1491 pack is an argument pack containing a single pack expansion.
1492 (process_partial_specialization): When checking that non-type
1493 argument expressions do not involve template parameters, loop over
1494 the arguments in argument packs separately.
1495 (push_template_decl_real): Check that the type of the declaration
1496 does not have any bare parameter packs. Check that primary
1497 templates have no more than one parameter pack, and that it comes
1498 at the end of the template parameter list.
1499 (convert_template_argument): Handle coercions for pack expansion
1500 expressions by coercing the pattern then rebuilding the expansion.
1501 (coerce_template_parms): When coercing the arguments for a
1502 variadic template, pack "extra" arguments into an argument pack.
1503 (coerce_template_template_parms): Cannot coerce between parameter
1504 packs and non-pack parameters.
1505 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1506 (comp_template_args): Expand all template arguments packs before
1507 comparing template argument lists.
1508 (mangle_class_name_for_template): Make argument packs as separate
1510 (for_each_template_parm_r): No need to handle BASELINK.
1511 (instantiate_class_template): Handle pack expansions in the base
1513 (tsubst_pack_expansion): New.
1514 (tsubst_template_args): Handle substitutions of argument packs and
1515 pack expansion into template argument lists.
1516 (tsubst_decl): Expand function parameter packs into separate
1517 function parameters.
1518 (tsubst_arg_types): Expand a type pack expansion into separate
1520 (tsubst_exception_specification): Handle pack expansions in
1521 exception specifiers.
1522 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1523 replacing a template parameter with its argument. If we encounter
1524 a substitution for an argument pack, just return the parameter
1526 (tsubst_copy): sizeof(X...) returns the number of elements in
1527 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1528 PARM_DECL is a parameter pack.
1529 (tsubst_expr): Expression pack expansions and argument packs
1530 cannot show up here; they will all be handled through function
1531 calls, sizeof, and template argument lists.
1532 (tsubst_copy_and_build): sizeof(X...) returns the number of
1533 elements in parameter pack X. Handle pack expansions in TREE_LIST
1534 and CONSTRUCTOR nodes.
1535 (fn_type_unification): Handle "incomplete" explicit template
1536 argument lists that specify some of the arguments for a template
1538 (type_unification_real): Unify arguments against pack expansions.
1539 (template_parm_level_and_index): New, helper function.
1540 (unify_pack_expansion): New.
1541 (unify): Unify argument packs on an argument-by-argument basis,
1542 handling variadic argument packs as well.
1543 (more_specialized_fn): Handle unification of function parameter
1544 packs. All things being equal, prefer non-variadic function
1545 templates to variadic function templates.
1546 (more_specialized_class): Prefer the variadic class template
1547 partial specialization that binds fewer arguments to a parameter
1549 (regenerate_decl_from_template): Expand function parameter packs
1550 into separate parameters.
1551 (instantiate_decl): Ditto.
1552 (tsubst_initializer_list): Handle pack expansions for base-class
1554 (dependent_type_p_r): Determine dependent types in argument packs
1555 and pack expansions.
1556 (value_dependent_expression_p): Determine value-dependence of
1557 non-type argument packs.
1558 (dependent_template_arg_p): Handle argument packs.
1559 * semantics.c (finish_cond): Check for bare parameter packs.
1560 (finish_expr_stmt): Ditto.
1561 (finish_for_expr): Ditto.
1562 (finish_switch_cond): Ditto.
1563 (finish_mem_initializers): Ditto.
1564 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1566 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1567 * parser.c (make_declarator): Declarator is not an expansion.
1568 (make_pointer_declarator): Transfer parameter pack flag to outer
1570 (make_reference_declarator): Ditto.
1571 (make_ptrmem_declarator): Ditto.
1572 (make_call_declarator): Ditto.
1573 (make_array_declarator): Ditto.
1574 (cp_parser_postfix_expression): Allow pack expansion expressions
1575 in the argument list for a call expression.
1576 (cp_parser_parenthesized_expression_list): Add new parameter
1577 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1578 into separate arguments."
1579 (cp_parser_new_placement): Allow pack expansion expressions.
1580 (cp_parser_new_initializer): Ditto.
1581 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1582 base-class initializer expansion.
1583 (cp_parser_mem_initializer): Ditto.
1584 (cp_parser_template_parameter_list): Keep track of whether the
1585 template parameter is a template parameter pack.
1586 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1587 template parameter pack.
1588 (cp_parser_type_parameter): Ditto.
1589 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1591 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1592 this declarator is a parameter pack.
1593 (cp_parser_parameter_declaration): The ellipsis does not end the
1594 parameter declaration, because it might be a parameter pack. Parse
1595 the ellipsis to indicate a parameter pack.
1596 (cp_parser_initializer): Allow pack expansions.
1597 (cp_parser_initializer_list): Allow ellipsis to create an
1598 initializer expansion.
1599 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1601 (cp_parser_type_id_list): Allow ellipsis to create an exception
1602 specifier expansion.
1603 (cp_parser_attribute_list): Don't allow pack expansions.
1604 (cp_parser_functional_cast): Allow pack expansions.
1605 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1606 compute the length of a parameter pack.
1607 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1608 end a template argument.
1609 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1610 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1613 2007-03-09 Dirk Mueller <dmueller@suse.de>
1615 * cp/call.c (build_new_op): Call warn_logical_operator.
1617 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1620 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1623 * pt.c (any_template_arguments_need_structural_equality_p):
1626 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1628 * decl.c (grokdeclarator): Disable warnings for anonymous
1631 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1633 * typeck2.c (readonly_error): Always emit a hard error.
1634 Remove last argument.
1635 * cp-tree.h (readonly_error): Adjust prototype.
1636 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1637 * typeck.c (build_unary_op): Likewise.
1638 (build_modify_expr): Likewise.
1640 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1643 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1645 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1648 * parser.c (struct cp_parser): New IN_IF_STMT.
1649 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1650 returning if parsing the body of an 'if' statement or issuing an
1651 error and continuing.
1652 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1654 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1656 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1659 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1662 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1664 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1665 Objective-C++. Don't exit early if -shared-libgcc needs to be
1668 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1670 * typeck.c (common_base_type): Delete unused function.
1672 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1674 * Make-lang.in: Add dummy lang.install-pdf target.
1676 2007-03-01 Simon Baldwin <simonb@google.com>
1679 * decl.c (check_tag_decl): Added new warning for typedef ignored
1680 when it precedes an otherwise valid non-typedef declaration.
1682 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1684 * typeck.c (build_function_call): Store converted arguments
1685 in a stack-allocated array instead of building a list.
1686 (convert_arguments): Store arguments in the array passed in as an
1687 argument, and return the actual number of arguments.
1688 * call.c (build_call): Delete, and replace with...
1689 (build_call_n, build_call_a): New.
1690 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1691 (build_over_call): Store converted arguments in a stack-allocated
1692 array instead of building a list.
1693 (build_cxx_call): Pass arguments in an array instead of as a list.
1694 (build_java_interface_fn_ref): Rewrite to avoid constructing
1696 * tree.h: Update declarations to reflect above changes.
1697 * method.c (use_thunk): Use a stack-allocated array to hold
1698 the arguments instead of a list.
1699 * rtti.c (throw_bad_cast): Update call to cxx_call.
1700 (throw_bad_typeid): Likewise.
1701 (build_dynamic_cast_1): Likewise.
1702 * init.c (build_builtin_delete_call): Use build_call_n.
1703 * decl.c (expand_static_init): Likewise.
1704 * except.c (cp_protect_cleanup_actions): Likewise.
1705 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1706 (gimplify_must_not_throw_expr): Likewise.
1707 (cxx_omp_apply_fn): Use build_call_a.
1709 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1711 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1712 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1714 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1716 * cp-tree.h (static_ctors): Remove.
1717 * cp-tree.h (static_dtors): Likewise.
1718 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1719 refactoring of tree_map hierarchy.
1720 (decl_shadowed_for_var_insert): Likewise.
1721 * semantics.c (expand_body): Use c_expand_body.
1722 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1723 * decl2.c (static_ctors): Remove.
1724 (static_dtors): Likewise.
1725 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1726 objc_generate_static_init_call. Do not call static_[cd]tors.
1727 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1729 (cp_write_global_declarations): Likewise.
1731 2007-02-23 Richard Guenther <rguenther@suse.de>
1733 * class.c (note_name_declared_in_class): Make declaration
1734 changes meaning a pedwarn.
1736 2007-02-22 Michael Matz <matz@suse.de>
1739 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1740 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1741 dump_function_decl): Guard emitting outer scopes by new flag.
1742 * cp-lang.c (cxx_dwarf_name): New function.
1743 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1744 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1746 (push_template_decl_real, lookup_template_class): Remove calls
1749 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1751 * call.c (build_new_method_call): Ensure that explicit calls of
1752 destructors have type "void".
1754 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1756 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1757 and -Walways-true with -Waddress.
1758 * cvt.c (convert_to_void): Replace unconditional warning with
1761 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1763 * decl.c, tree.c: Fix comment typos.
1765 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1768 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1769 statement expression if we had an error mark node.
1771 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1772 Brooks Moses <brooks.moses@codesourcery.com>
1773 Lee Millward <lee.millward@codesourcery.com>
1775 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1776 Change class to tcc_vl_exp.
1778 * call.c (build_call): Use build_call_list instead
1780 (build_over_call): Likewise.
1781 (build_new_method_call): Use build_min_non_dep_call_list
1782 instead of build_min_non_dep.
1784 * error.c (dump_call_expr_args): New function.
1785 (dump_aggr_init_expr_args): New function.
1786 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1787 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1789 * cvt.c (convert_to_void): Use build_call_array instead
1790 of build3; use new AGGR_INIT_EXPR accessor macros.
1792 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1793 instead of TREE_CODE_LENGTH.
1795 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1796 AGGR_INIT_EXPR accessor macros.
1798 * cp-gimplify.c (cp_gimplify_init_expr): Use
1799 AGGR_INIT_EXPR_SLOT to set the slot operand.
1801 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1802 (AGGR_INIT_EXPR_SLOT): New macro.
1803 (AGGR_INIT_EXPR_ARG): New macro.
1804 (aggr_init_expr_nargs): New macro.
1805 (AGGR_INIT_EXPR_ARGP): New macro.
1806 (aggr_init_expr_arg_iterator): New.
1807 (init_aggr_init_expr_arg_iterator): New.
1808 (next_aggr_init_expr_arg): New.
1809 (first_aggr_init_expr_arg): New.
1810 (more_aggr_init_expr_args_p): New.
1811 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1812 (stabilize_aggr_init): New declaration.
1813 (build_min_non_dep_call_list): Likewise.
1815 * tree.c (process_aggr_init_operands): New function.
1816 (build_aggr_init_array) New function.
1817 (build_cplus_new): Update to use new CALL_EXPR and
1818 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1819 build_aggr_init_array.
1820 (build_min_non_dep_call_list) New function.
1821 (build_min_nt): Assert input code parameter is not a variable
1822 length expression class.
1823 (build_min, build_min_non_dep): Likewise.
1824 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1825 to check for equality instead of recursing. Handle tcc_vl_exp
1827 (stabilize_call): Update to only handle CALL_EXPRs, not
1828 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1829 (stabilize_aggr_init): New function.
1830 (stabilize_init): Use it.
1832 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1833 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1834 AGGR_INIT_EXPR accessor macros and argument iterators.
1836 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1837 build_vl_exp. Iterate through the operands, recursively
1838 processing each one.
1839 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1840 CALL_EXPR accessor macros.
1841 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1842 tree code classes. Use TREE_OPERAND_LENGTH instead of
1845 * semantics.c (finish_call_expr): Use build_nt_call_list
1846 instead of build_nt.
1847 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1848 accessor macros. Use build_call_array to construct the
1849 CALL_EXPR node instead of build3
1851 * decl2.c (build_offset_ref_call_from_tree): Use
1852 build_nt_call_list and build_min_non_dep_call_list instead
1853 of build_min_nt and build_min_non_dep.
1855 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1856 Use build_nt_call_list instead of build_min_nt.
1858 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1861 * call.c (build_conditional_expr): Improve error message.
1863 2007-02-13 Dirk Mueller <dmueller@suse.de>
1865 * friend.c (do_friend): Annotate warning about friend
1866 declarations in templates with OPT_Wnon_template_friend.
1867 Convert informal message from warning() to inform().
1869 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1870 Mark Mitchell <mark@codesourcery.com>
1873 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1874 instantiations for variables.
1876 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1879 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1880 Check warn_unused_value just once.
1882 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1885 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1886 (fn_type_unificiation): Likewise.
1887 (get_bindings): Likewise.
1889 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1892 * decl.c (finish_function): Use DECL_REPLACEABLE.
1893 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1895 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1897 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1899 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1901 * decl.c (grokvardecl): Don't error if !have_tls.
1902 (grokdeclarator): Likewise.
1903 * parser.c (cp_parser_omp_threadprivate): Likewise.
1905 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1908 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1909 parameters and result decls in omp clauses.
1910 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1913 2007-02-05 Dirk Mueller <dmueller@suse.de>
1916 * parser.c (cp_parser_class_specifier): Always initialize bases.
1918 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1920 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1921 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1922 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1924 * semantics.c (finish_omp_atomic): Store a whole expression node
1925 in operand 1, and integer_zero_node in operand 0, for dependent
1926 OMP_ATOMIC. Rewrite to make flow easier to understand.
1928 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1930 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1932 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1934 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1935 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1937 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1939 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1940 keyword warning to -Wc++0x-compat.
1942 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1944 * decl.c (grokdeclarator): Update documentation.
1946 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1949 * decl.c (grokdeclarator): If __thread is used together with
1950 a storage class other than extern and static, clear thread_p
1951 after issuing diagnostics and fall through to checking the
1954 2007-01-30 Roger Sayle <roger@eyesopen.com>
1956 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1957 calculating the size of an array (to avoid recursive errors).
1959 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1962 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1964 * call.c (convert_like_real): Don't warn when converting to
1967 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1969 * decl.c (pop_label): Replace warning with call to
1970 warn_for_unused_label.
1972 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1975 * semantics.c (finish_pseudo_destructor_expr): Check the
1976 destrutor name by calling check_dtor_name.
1978 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1980 * lex.c (D_CPP0X): Rename.
1982 (reswords): D_CPP0X -> D_CXX0X.
1983 (init_reswords): Ditto.
1984 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1985 of C++0x keywords as identifiers.
1987 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1990 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1993 2007-01-23 Ian Lance Taylor <iant@google.com>
1995 * typeck.c (convert_for_assignment): Only warn about a = b = c
1996 when converting to bool.
1998 2007-01-23 Roger Sayle <roger@eyesopen.com>
2000 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2002 * typeck.c (ignore_overflows): Remove the remaining uses of
2003 TREE_CONSTANT_OVERFLOW.
2005 2007-01-20 Jan Hubicka <jh@suse.cz>
2007 * decl2.c (start_objects, start_static_storage_duration_function):
2008 Do not make the functions uninlinable.
2010 2007-01-17 Ian Lance Taylor <iant@google.com>
2012 * class.c (add_method): Call VEC_reserve_exact rather than passing
2013 a negative size to VEC_reserve.
2015 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2018 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2020 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2023 * decl.c (make_typename_type): If the qualified name is not a
2024 type, issue an error.
2025 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2028 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2030 * rtti.c: Include target.h.
2031 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2032 don't emit typeinfo for fundamental types as weak.
2033 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2035 2007-01-08 Richard Guenther <rguenther@suse.de>
2037 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2039 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2041 * call.c (standard_conversion): Pass flag to
2042 vector_types_convertible_p to disallow emission of note.
2043 * typeck.c (convert_for_assignment): Pass flag to
2044 vector_types_convertible_p to allow emission of note.
2045 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2046 to disallow emission of note.
2048 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2051 * typeck.c (build_binary_op): Call overflow_warning if
2052 TREE_OVERFLOW_P is true for the result and not for any of the
2055 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2058 * class.c (add_method): Don't wait until template
2059 instantiation time to complain about duplicate methods.
2061 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2064 * semantics.c (finish_unary_op_expr): Warn only if result
2065 overflowed and operands did not.
2067 2007-01-05 Ian Lance Taylor <iant@google.com>
2069 * typeck.c (build_binary_op): Warn about comparing a non-weak
2072 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2074 * pt.c (tsubst): Propagate the need for structural equality checks
2075 when reducing the level of template parameters.
2077 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2079 * pt.c: Fix a comment typo.
2081 2007-01-02 Ian Lance Taylor <iant@google.com>
2083 * semantics.c (maybe_convert_cond): Optionally warn when using an
2084 assignment as a condition.
2085 * typeck.c (convert_for_assignment): Optionally warn about
2086 assigning the result of an assignment to a bool.
2088 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2090 * pt.c (canonical_template_parms): Correct typo in comment.
2092 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2094 * typeck.c (structural_comptypes): Renamed from "comptypes".
2095 (comptypes): Use canonical type information to perform fast type
2096 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2097 canonical type comparison returns the same results as we would see
2098 from the current, structural check. Support COMPARE_STRUCTURAL
2099 when we need structural checks.
2100 * decl.c (typename_compare): Fix comment.
2101 (build_typename_type): TYPENAME_TYPE nodes require structural
2102 equality checks, because they resolve different based on the
2104 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2105 require structural equality checks (for now).
2106 (build_ptrmemfunc_type): Build the canonical pointer to member
2108 (compute_array_index_type): Whenever we build a new index type
2109 to represent the size of an array in a template, we need to mark
2110 this index type as requiring structural equality. This goes for
2111 arrays with value-dependent sizes with the current ABI, or all
2113 * tree.c (cplus_array_hash): New.
2114 (struct cplus_array_info): New.
2115 (cplus_array_compare): New.
2116 (cplus_array_htab): New.
2117 (build_cplus_array_type_1): Use a hash table to cache the array
2118 types we build. Build the canonical array type for each array
2120 (cp_build_qualified_type_real): When building a cv-qualified array
2121 type, use the hash table of array types and build canonical array
2123 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2124 use structural equality (for now).
2125 * cp-tree.h (COMPARE_STRUCTURAL): New.
2126 * pt.c (canonical_template_parms): New.
2127 (canonical_type_parameter): New.
2128 (process_template_parm): Find the canonical type parameter.
2129 (lookup_template_class): When we have named the primary template
2130 type, set the canonical type for our template class to the primary
2131 template type. If any of the template arguments need structural
2132 equality checks, the template class needs structural equality
2134 (tsubst): When reducing the level of a template template
2135 parameter, we require structural equality tests for the resulting
2136 parameter because its template parameters have not had their types
2137 canonicalized. When reducing a template type parameter, find the
2138 canonical reduced type parameter.
2139 (any_template_arguments_need_structural_equality_p): New.